> ## Documentation Index
> Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ingest Vendor Output

> Push raw vendor extraction output into a document.

## Overview

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

<Note>
  **Append-only.** Each ingest call appends a new record. Previous data is never overwritten.
</Note>

## Request

<ParamField body="document_id" type="string" required>
  Target document ID (e.g. `doc-abc123`).
</ParamField>

<ParamField body="vendor" type="string">
  Vendor identifier (e.g. `azure_di`, `textract`).
</ParamField>

<ParamField body="payload" type="object">
  Raw vendor output. Any JSON shape accepted.
</ParamField>

<ParamField body="pdf_sha256" type="string">
  SHA-256 hash of the source PDF for optimistic concurrency. Returns 409 on mismatch.
</ParamField>

<ParamField body="capabilities" type="object">
  Capability configuration including `vlm_qwen`, `structural_check`, `sandbox_verify`, `search`, `phases`, and `middleware`.
</ParamField>

<RequestExample>
  ```bash theme={null}
  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": [...] }
    }'
  ```
</RequestExample>

### Response (200)

```json theme={null}
{
  "ok": true,
  "seq": 3,
  "document_id": "doc-abc123"
}
```
