Skip to main content

Responses

Extract endpoint response formats for both synchronous (200 OK) and asynchronous (202 Accepted) extraction modes with confidence scores.

Synchronous (200 OK)

Returned when async is false (default). The response blocks until extraction is complete.

200 — Synchronous response

{
  "id": "ext_8f2k4n1m",
  "document_id": "doc_3j7x9p2q",
  "schema_id": "sch_abc123",
  "status": "complete",
  "data": {
    "vendor_name": "Acme Corp",
    "invoice_number": "INV-2024-0847",
    "total_amount": 14250.00,
    "due_date": "2024-03-15",
    "line_items": [
      {
        "description": "Enterprise license (annual)",
        "quantity": 1,
        "unit_price": 12000.00
      },
      {
        "description": "Implementation services",
        "quantity": 15,
        "unit_price": 150.00
      }
    ]
  },
  "confidence": {
    "overall": 0.94,
    "fields": {
      "vendor_name": 0.99,
      "invoice_number": 0.98,
      "total_amount": 0.96,
      "due_date": 0.91,
      "line_items": 0.87
    }
  },
  "metadata": {
    "pages": 2,
    "language": "en",
    "document_type": "invoice",
    "processing_time_ms": 3420
  }
}

Asynchronous (202 Accepted)

Returned when async: true or webhook_url is set. Poll /v1/jobs/:id for progress.

202 — Asynchronous response

{
  "id": "ext_8f2k4n1m",
  "job_id": "job_v4w2x8y1",
  "status": "processing",
  "estimated_time_ms": 5000,
  "poll_url": "/v1/jobs/job_v4w2x8y1"
}