Skip to content

API reference

A kept PDF or image sample's page, as an image

Mappings API

GET/v1/mappings/drafts/{id}/samples/{index}/pages/{page}

The page as PNG, the picture the fields’ boxes are drawn on. Each column read off a page carries box: its page and x0, y0, x1, y1 as fractions of that page from the top left, so a box fits the picture whatever its size. A PDF or image draft is shown, never finalized: such a source goes through Cipher Review.

Path parameters

  • idstring (uuid)Required

    The draft's id.

  • indexintegerRequired

    Which sample of the draft, counting from 0.

  • pageintegerRequired

    Which page, counting from 1.

Status codes

Status Meaning
200 The page, rendered.
401 No usable credential was sent (invalid_credentials).
404 This company has no such draft (unknown_mapping_draft), or the draft has no sample at that place (unknown_sample).
422 The sample is no PDF or image (not_a_document), or has no such page (no_such_page).
503 Cipher did not answer (profiler_unavailable).
GET/v1/mappings/drafts/{id}/samples/{index}/pages/{page}
Example
curl https://api.certinvo.com/v1/mappings/drafts/$DRAFT_ID/samples/$SAMPLE_INDEX/pages/$PAGE \
  -H "Authorization: Bearer $CERTINVO_API_KEY"
const draftId = '3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a'
const sampleIndex = 'value'
const page = 'value'

const response = await fetch(`https://api.certinvo.com/v1/mappings/drafts/${draftId}/samples/${sampleIndex}/pages/${page}`, {
  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"
sample_index = "value"
page = "value"

response = requests.get(
    f"https://api.certinvo.com/v1/mappings/drafts/{draft_id}/samples/{sample_index}/pages/{page}",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)
200
image/png
The body is the file itself (image/png).
Success response
GET
/v1/mappings/drafts/{id}/samples/{index}/pages/{page}
A kept PDF or image sample's page, as an image
All
›AuthenticationRequiredBearerAuth

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

›Variables3
›Headers2
›Code Snippet
curl -X GET "https://api.certinvo.com/v1/mappings/drafts/{id}/samples/{index}/pages/{page}" \
  -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