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/listsnames it, such asUnitor5305. - 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.jsonimport { 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