Skip to content

API reference

Turn a file into your own JSON

Mappings API

POST/v1/mappings/transformations

Reads a file through an activated mapping card that names one of your target models, and answers your JSON: one document per invoice in the file. The whole file is refused when any document cannot be filled, naming each field, as a batch is. Nothing is stored and nothing is validated: your model is yours to check.

Request body

application/json, required

  • mappingVersionstringRequired
  • datastring (byte)Required

    The file, base64-encoded.

Status codes

Status Meaning
200 {documents}, in your model.
400 The body is not a transformation (invalid_json), the file does not read the card’s way (unreadable_file), fields cannot be filled (unmappable_payload), the card reads no file (config_reads_no_file), the card names no target model of yours (not_a_target_mapping), or the model it names is not registered (unknown_target_model).
401 No usable credential was sent (invalid_credentials).
404 This company activated no such card (unknown_mapping_config).
413 The file, once read, holds more than one request may carry (file_too_large_to_read). Nothing was transformed.
POST/v1/mappings/transformations
Example
curl -X POST https://api.certinvo.com/v1/mappings/transformations \
  -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/transformations`, {
  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/transformations",
    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
POST
/v1/mappings/transformations
Turn a file into your own JSON
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/transformations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mappingVersion": "string",
  "data": "string"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close