Skip to content

API reference

Choose the mapping for a layout

Mappings API

POST/v1/mappings/layout-choices

Answers 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.layout of 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-choices
Example
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.json
import { 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
POST
/v1/mappings/layout-choices
Choose the mapping for a layout
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Headers2
›Bodyapplication/json
›Code Snippet
curl -X POST "https://api.certinvo.com/v1/mappings/layout-choices" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "layout": "string",
  "mappingVersion": "string"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close