Skip to main content
POST
/
v1
/
documents
/
ingest
curl -X POST https://api.okrapdf.com/v1/documents/ingest \
  -H "Authorization: Bearer okra_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document_id": "doc-abc123",
    "vendor": "azure_di",
    "payload": { "pages": [...] }
  }'

Overview

Push raw vendor output (OCR, layout, etc.) into a document. Each call appends a new record — previous data is never overwritten.
Append-only. Each ingest call appends a new record. Previous data is never overwritten.

Request

document_id
string
required
Target document ID (e.g. doc-abc123).
vendor
string
Vendor identifier (e.g. azure_di, textract).
payload
object
Raw vendor output. Any JSON shape accepted.
pdf_sha256
string
SHA-256 hash of the source PDF for optimistic concurrency. Returns 409 on mismatch.
capabilities
object
Capability configuration including vlm_qwen, structural_check, sandbox_verify, search, phases, and middleware.
curl -X POST https://api.okrapdf.com/v1/documents/ingest \
  -H "Authorization: Bearer okra_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document_id": "doc-abc123",
    "vendor": "azure_di",
    "payload": { "pages": [...] }
  }'

Response (200)

{
  "ok": true,
  "seq": 3,
  "document_id": "doc-abc123"
}