Skip to content

Upload a sample document to map fields on

POST
/v1/extraction-templates/samples
curl --request POST \
--url http://localhost:8080/v1/extraction-templates/samples \
--header 'Content-Type: application/json' \
--data '{ "sample": "example" }'

Takes sample (the PDF’s bytes as base64, ≤ 20 MB), stores it by content hash and returns sampleId with the pages the studio can draw on (size in points, native text or OCR). Idempotent for identical bytes. Administrators only.

Media typeapplication/json

Body of POST /v1/extraction-templates/samples: the sample PDF’s bytes as base64.

object
sample
string
Examplegenerated
{
"sample": "example"
}

OK

Media typeapplication/json

An uploaded studio sample: its id (the content hash) and the pages the studio can draw on.

object
sampleId
required
string
pageCount
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
isScanned
required
boolean
pages
required
Array<object>
object
pageNo
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
width
required
number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
height
required
number | string format: double
/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/
hasNativeText
required
boolean
ocrApplied
required
boolean
engineVersion
required
string
Examplegenerated
{
"sampleId": "example",
"pageCount": 1,
"isScanned": true,
"pages": [
{
"pageNo": 1,
"width": 1,
"height": 1,
"hasNativeText": true,
"ocrApplied": true
}
],
"engineVersion": "example"
}