Skip to content

API reference

Save a mapping configuration

Mappings API

POST/v1/mappings

Stores a reviewed mapping config as a new, immutable version for the credential’s company, and records the person who confirmed it.

A mapping config says how your own export files (CSV, Excel, your JSON or XML, SAP IDoc) become invoices.

Where the config comes from

This route does not create the draft. A draft is produced from a customer sample file, a person reviews it, and you send the reviewed document as config.

The version is the config’s own version field. Every invoice mapped with it later carries that value as meta.mappingConfigVersion. A draft is named <source>-0.0.0-draft, so rename it to the version you go live with as part of the review.

Versions never change

A frozen config is never replaced or deleted. To change it, freeze a new version. Sending a version this company already froze returns 409 and leaves the existing version unchanged.

Request body

application/json, required

  • confirmedBystring (email)Required

    The email address of the person who reviewed this config. They must already be a user of the credential's workspace and must have access to this company. This API does not create users.

  • configobjectRequired

    The reviewed mapping config, stored exactly as sent. Its version is the version being frozen. It must pass every check that applies when a config is loaded for use. A config refused here could never have been used.

Response

A 201 answer carries these fields.

  • versionstringRequired
  • confirmedBystring (uuid)Required

    The stored user id of the person who confirmed it.

  • confirmedAtstring (date-time)Required

Status codes

Status Meaning
201 The version was frozen. The body says what was frozen, who confirmed it and when. The config is now usable as the mappingVersion of a mapped-file /v1/conversions operation for this company only.
400 The request was refused and nothing was stored: - invalid_json: the body is not JSON. - invalid_mapping_config: the config does not load. detail names the JSON Pointer that failed and the rule it broke. - unknown_confirming_user: no person who may confirm for this company was named. The same code covers a missing confirmedBy, an unknown address, a person from another workspace, and a person without access to this company.
401 No usable credential was sent (invalid_credentials). The company is taken from the credential only. A company field in the body is ignored.
409 This company already froze that version (mapping_config_exists). The existing version is unchanged. Freeze a new version instead.
POST/v1/mappings
Example
curl -X POST https://api.certinvo.com/v1/mappings \
  -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`, {
  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",
    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
application/json
{
  "version": "string",
  "confirmedBy": "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a",
  "confirmedAt": "2026-09-17T09:30:00Z"
}
Success response
POST
/v1/mappings
Save a mapping configuration
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" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "confirmedBy": "string",
  "config": {}
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close