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
Target document ID (e.g. doc-abc123).
Vendor identifier (e.g. azure_di, textract).
Raw vendor output. Any JSON shape accepted.
SHA-256 hash of the source PDF for optimistic concurrency. Returns 409 on mismatch.
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"
}