Skip to content

API reference

Answer one of your codes

Mappings API

PUT/v1/mappings/codes/{list}/{code}

Your code, as your files write it, means official on the official list. Every mapping of yours reads it after its own code table. Only invoices made from now on read the new answer.

Path parameters

  • liststringRequired

    An official list, as GET /v1/mappings/codes/lists names it, such as Unit or 5305.

  • codestringRequired

    Your code, exactly as your files write it.

Request body

application/json, required

  • officialstringRequired

    A code on list.

Status codes

Status Meaning
200 {version, code}: the book’s new version and the answer as saved.
400 list is not an official list, code is empty or too long, or official is not on list (invalid_code_book_entry). Nothing was saved.
401 No usable credential was sent (invalid_credentials).
501 This deployment keeps no database, so nothing can be saved (no_database).
PUT/v1/mappings/codes/{list}/{code}
Example
curl -X PUT https://api.certinvo.com/v1/mappings/codes/$CODE_LIST/${LIST}_CODE \
  -H "Authorization: Bearer $CERTINVO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @body.json
import { readFile } from 'node:fs/promises'

const codeList = 'value'
const {list}Code = 'value'

const response = await fetch(`https://api.certinvo.com/v1/mappings/codes/${codeList}/${{list}Code}`, {
  method: 'PUT',
  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

code_list = "value"
{list}_code = "value"

response = requests.put(
    f"https://api.certinvo.com/v1/mappings/codes/{code_list}/{{list}_code}",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
    data=open("body.json", "rb"),
)
print(response.status_code, response.text)
200
No response body.
Success response
PUT
/v1/mappings/codes/{list}/{code}
Answer one of your codes
All
›AuthenticationRequiredBearerAuth

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

›Variables2
›Headers2
›Bodyapplication/json
›Code Snippet
curl -X PUT "https://api.certinvo.com/v1/mappings/codes/{list}/{code}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "official": "string"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close