Skip to content

API reference

Test a kept draft on every sample

Mappings API

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

The card over every kept sample, read the way the runtime reads a file, as POST /v1/mappings/tests runs it. The result is kept with the card it ran on: finalize asks for a passing test of the card as it is.

Path parameters

  • idstring (uuid)Required

    The draft's id, as POST /v1/mappings/drafts answered it.

Status codes

Status Meaning
200 {tested, passed, failed, samples}: one entry per sample, in order. A failed sample is an answer about the draft, not an error of this request.
400 The card does not load (invalid_mapping_config), or says nothing about reading a file (config_reads_no_file).
401 No usable credential was sent (invalid_credentials).
404 This company has no such draft (unknown_mapping_draft).
409 mapping_draft_finalized: the draft is finalized and never changes.
413 A sample read into more than one request may hold (file_too_large_to_read).
POST/v1/mappings/drafts/{id}/test
Example
curl -X POST https://api.certinvo.com/v1/mappings/drafts/$DRAFT_ID/test \
  -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}/test`, {
  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}/test",
    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}/test
Test a kept draft on every sample
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}/test" \
  -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