Skip to content

API reference

Merge one mapping into another

Mappings API

POST/v1/mappings/merges

Merges the mapping from into the mapping into. Every decision of from that into does not contradict is kept in version, the next version of into: a field into does not fill, another column read for the same field (kept as a second name of it, aliases), a column left out, its system, its code answers. Then from is retired into into. When from adds nothing, no version is saved and from is retired as a copy. A decision of from that contradicts one of into’s is a question for a person: the merge is refused, naming each place, and nothing is saved or retired. Two mappings of different file formats are never merged; give them one system instead.

Request body

application/json, required

  • fromstringRequired
  • intostringRequired
  • versionstringRequired

    The next version of into.

  • confirmedBystring (email)Required
  • whystring

    Optional. Why, in words. Recorded as why from was retired; without it, the record says which version it was merged into.

Status codes

Status Meaning
200 {version, existing: true, retired}: from added nothing, so no version was saved; version is the newest of into.
201 {version, confirmedBy, confirmedAt, retired}: the version saved, and the retirement of from.
400 The body is not a merge (invalid_merge, invalid_json), the merged mapping does not load (invalid_mapping_config), or no person who may act here was named (unknown_confirming_user).
401 No usable credential was sent (invalid_credentials).
404 You have no saved mapping of one of those names (unknown_mapping_config).
409 from contradicts into (merge_conflict, detail.conflicts names each place and why), one of them is retired (mapping_retired), or that version is saved already (mapping_config_exists). Nothing was saved or retired.
POST/v1/mappings/merges
Example
curl -X POST https://api.certinvo.com/v1/mappings/merges \
  -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/merges`, {
  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/merges",
    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/merges
Merge one mapping into another
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/merges" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "from": "string",
  "into": "string",
  "version": "string",
  "confirmedBy": "string",
  "why": "string"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close