Skip to content

API reference

Replay a draft on the newest version

Mappings API

POST/v1/mappings/drafts/{id}/rebase

Makes a draft whose version was saved over since (mapping_moved_on on its finalize) again from the newest version of its mapping: the same samples, the newest version’s fields carried over, then your own decisions applied again in order. The old draft is let go and the new one answers, with replayed, how many of your decisions were applied again; any that no longer apply are named in notApplied. A draft that starts from the newest version is answered as it is, with replayed: 0.

Path parameters

  • idstring (uuid)Required

    The draft's id.

Status codes

Status Meaning
200 The draft, as GET /v1/mappings/drafts/{id} answers it, with replayed.
401 No usable credential was sent (invalid_credentials).
404 This company has no such draft (unknown_mapping_draft), or the newest version cannot be read (unknown_mapping_config).
409 The draft is finalized already (mapping_draft_finalized).
POST/v1/mappings/drafts/{id}/rebase
Example
curl -X POST https://api.certinvo.com/v1/mappings/drafts/$DRAFT_ID/rebase \
  -H "Authorization: Bearer $CERTINVO_API_KEY"
const draftId = '3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a'

const response = await fetch(`https://api.certinvo.com/v1/mappings/drafts/${draftId}/rebase`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
  },
})
console.log(response.status, await response.json())
import os

import requests

draft_id = "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a"

response = requests.post(
    f"https://api.certinvo.com/v1/mappings/drafts/{draft_id}/rebase",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)
200
No response body.
Success response
POST
/v1/mappings/drafts/{id}/rebase
Replay a draft on the newest version
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Variables1
›Headers2
›Body
›Code Snippet
curl -X POST "https://api.certinvo.com/v1/mappings/drafts/{id}/rebase" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close