POST
/v1/mappings/layout-choicesAnswers a 409 several_mappings_fit once for every file of that layout. Send the layout the 409 named and the version you chose. From then on a file of that layout goes through that mapping with nothing asked, and through its newest version when it gets a new one. A later answer for the same layout counts over an earlier one. No answer is ever changed or deleted. Two mappings that read a file and decide the same never ask: the newest reads it.
Request body
application/json, required
- layoutstringRequired
The file's layout, exactly as
error.detail.layoutof the 409 named it. - mappingVersionstringRequired
The version you chose, one of
error.detail.versions.
Status codes
| Status | Meaning |
|---|---|
201 |
{layout, name}: the layout and the name of the mapping it goes through from now on. |
400 |
The body has no layout as the 409 named it, or no mappingVersion (invalid_layout_choice). |
401 |
No usable credential was sent (invalid_credentials). |
404 |
This company froze no such version (unknown_mapping_config). |
POST
/v1/mappings/layout-choicesExample
curl -X POST https://api.certinvo.com/v1/mappings/layout-choices \
-H "Authorization: Bearer $CERTINVO_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @body.jsonimport { readFile } from 'node:fs/promises'
const response = await fetch(`https://api.certinvo.com/v1/mappings/layout-choices`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
'Content-Type': 'application/json',
},
body: await readFile('body.json'),
})
console.log(response.status, await response.json())import os
import requests
response = requests.post(
"https://api.certinvo.com/v1/mappings/layout-choices",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
data=open("body.json", "rb"),
)
print(response.status_code, response.text)201
No response body.
Success response