Quickstart

This guide walks through the most common integration pattern: upload a document, submit it for extraction with Document Insights, and read the structured output.

Prerequisites — you have an API key. See Authentication.


1

Upload a document

Upload your document to get a fileId that you reference in all downstream calls.

$curl https://api.plextera.com/api/public/v1/files \
> -H "Authorization: api-key YOUR_API_KEY" \
> -F "file=@lab-result.pdf"
1{
2 "id": "file_01JY7M4ZVX5R1P3M3Q0TA1S7ZM",
3 "name": "lab-result.pdf",
4 "mimeType": "application/pdf",
5 "sizeBytes": 63877,
6 "createdAt": "2026-04-07T10:05:00Z"
7}
2

Submit an extract job

Pass the fileId to the extract endpoint. Optionally include a hubId to target a specific Document Insights hub, or let Plextera route automatically.

metadata is optional, but when provided its keys and values must be non-empty strings. hubId is optional; if provided, it must reference an enabled hub in your organization.

$curl -X POST https://api.plextera.com/api/public/v1/document-insights/jobs/extract \
> -H "Authorization: api-key YOUR_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "document": { "fileId": "file_01JY7M4ZVX5R1P3M3Q0TA1S7ZM" },
> "metadata": { "customerDocumentId": "lab-42" }
> }'

The job is created with status: QUEUED. Save the id — you’ll need it in the next step.

1{
2 "id": "dijob_01JY7M5V3JTEV46W5ASAAH0A0Y",
3 "status": "QUEUED",
4 "outputAvailable": false,
5 ...
6}
3

Wait for completion

Poll the job until status reaches a terminal state (COMPLETED, FAILED, or REJECTED):

$curl https://api.plextera.com/api/public/v1/document-insights/jobs/dijob_01JY7M5V3JTEV46W5ASAAH0A0Y \
> -H "Authorization: api-key YOUR_API_KEY"

Once outputAvailable: true, the output field is populated.

Instead of polling, set up an event subscription to receive a webhook push when the job completes — no polling loop needed.

4

Read the output

The output.fields array contains each extracted field with its typed value, confidence score, and page placement:

1{
2 "output": {
3 "fieldCount": 3,
4 "fields": [
5 {
6 "id": "field_01",
7 "name": "labName",
8 "type": "text",
9 "value": "Quest Diagnostics",
10 "metadata": {
11 "extracted": true,
12 "confidence": 1.0,
13 "page": 1,
14 "placement": { "x": 43, "y": 12, "width": 22, "height": 4 }
15 }
16 }
17 ]
18 }
19}
5

(Optional) Submit feedback

If a field value is incorrect, submit a correction. Feedback is surfaced to the hub team for model improvement.

Feedback messages are required and can contain up to 1024 characters.

$curl -X POST https://api.plextera.com/api/public/v1/document-insights/jobs/dijob_01JY7M5V3JTEV46W5ASAAH0A0Y/feedback \
> -H "Authorization: api-key YOUR_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "fieldId": "field_03",
> "message": "Collection date should be 2026-04-05, not 2026-04-06."
> }'

Next steps

  • Authentication — API key format and usage guidelines
  • Events — replace polling with webhook push notifications
  • API Reference — full endpoint reference with interactive examples