Upload a sample document to map fields on
POST
/v1/extraction-templates/samples
const url = 'http://localhost:8080/v1/extraction-templates/samples';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"sample":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Body of POST /v1/extraction-templates/samples: the sample PDF’s bytes as base64.
object
sample
string
Examplegenerated
{ "sample": "example"}Responses
Section titled “Responses”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
isScanned
required
boolean
pages
required
Array<object>
object
pageNo
required
integer | string format: int32
width
required
number | string format: double
height
required
number | string format: double
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"}