Skip to content

API reference

Retire a mapping, or bring it back

Mappings API

POST/v1/mappings/retirements

Retires every version of one of your mappings by its name, or with restore: true brings it back. A retired mapping is kept: each version is still listed and readable with /v1/mappings/{version}, and an invoice it made still names it. No new file is read through a retired mapping: it is not tried when a file names no mapping, and a file that names one of its versions is refused with 409 mapping_retired. Certinvo retires a mapping itself when it decides exactly what another one decides; such a retirement names no person.

Request body

application/json, required

  • namestringRequired
  • confirmedBystring (email)Required

    The email address of the person who retires it, as for saving a mapping.

  • intostring

    Optional. The other mapping that holds its decisions now.

  • whystring

    Optional. Why, in words.

  • restoreboolean

    Optional. true brings a retired mapping back.

Status codes

Status Meaning
200 The mapping was already retired, or already live. Nothing was written; the body is its state.
201 {name, retired, into, why, by, at}: the row written.
400 The body is not a retirement (invalid_retirement, invalid_json), 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 that name (unknown_mapping_config).
POST/v1/mappings/retirements
Example
curl -X POST https://api.certinvo.com/v1/mappings/retirements \
  -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/retirements`, {
  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/retirements",
    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/retirements
Retire a mapping, or bring it back
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/retirements" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "confirmedBy": "string",
  "into": "string",
  "why": "string",
  "restore": true
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close