{
  "info": {
    "name": "DocXtract API v3.1",
    "_postman_id": "00000000-0000-4000-8000-000000000001",
    "description": "AI-powered document extraction — structured JSON from invoices, KYC, HR, and financial documents.\n\nGenerated from docs/public/openapi.yaml by tools/gen-postman.rb — do not edit by hand.\nRegenerate after changing the spec.\n\nBase URL: https://api.docxtract.io (note: no /api prefix)\nSet the `api_key` variable in the environment before sending requests.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.docxtract.io"
    },
    {
      "key": "job_id",
      "value": "",
      "description": "Parent job id, or chunk job id for process.php"
    }
  ],
  "item": [
    {
      "name": "Extraction",
      "description": "Synchronous single-document extraction",
      "item": [
        {
          "name": "Extract structured data from a document",
          "request": {
            "method": "POST",
            "header": [

            ],
            "url": {
              "raw": "{{base_url}}/v3.1/documents",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v3.1",
                "documents"
              ]
            },
            "description": "Upload a PDF or image and receive structured JSON.",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": "",
                  "description": "PDF, JPG, or PNG. Maximum 10 MB. Maximum 150 pages."
                },
                {
                  "key": "options",
                  "type": "text",
                  "value": "{\"model\":\"invoice\",\"store_db\":true}",
                  "description": "JSON-encoded options object, sent as a form field (a string, not a nested part). See the `ExtractOptions` schema.",
                  "disabled": false
                }
              ]
            }
          },
          "response": [
            {
              "name": "200 — Extraction complete (synchronous path)",
              "code": 200,
              "status": "200",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "202 — Document was split for multi-page processing. `data` is the chunk manifest — call `proces…",
              "code": 202,
              "status": "202",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "400 — ",
              "code": 400,
              "status": "400",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "401 — ",
              "code": 401,
              "status": "401",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "402 — ",
              "code": 402,
              "status": "402",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "413 — ",
              "code": 413,
              "status": "413",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "422 — ",
              "code": 422,
              "status": "422",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "429 — ",
              "code": 429,
              "status": "429",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "500 — ",
              "code": 500,
              "status": "500",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "503 — ",
              "code": 503,
              "status": "503",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            }
          ]
        }
      ]
    },
    {
      "name": "Multi-page",
      "description": "Split / process / collect flow for PDFs above the page threshold",
      "item": [
        {
          "name": "Process one chunk of a split document",
          "request": {
            "method": "POST",
            "header": [

            ],
            "url": {
              "raw": "{{base_url}}/v3.1/process?job_id={{job_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v3.1",
                "process"
              ],
              "query": [
                {
                  "key": "job_id",
                  "value": "{{job_id}}",
                  "description": "Chunk job id (not the parent job id). May also be sent as a form field.",
                  "disabled": false
                }
              ]
            },
            "description": "Call once per chunk `job_id` from the `202` manifest. Chunks may be processed sequentially or in parallel.",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "job_id",
                  "type": "text",
                  "value": "",
                  "description": "Alternative to the query parameter.",
                  "disabled": true
                },
                {
                  "key": "options",
                  "type": "text",
                  "value": "{\"model\":\"invoice\"}",
                  "description": "Same JSON-encoded options as `documents`. The form field must be named exactly `options`.",
                  "disabled": false
                }
              ]
            }
          },
          "response": [
            {
              "name": "200 — Chunk processed, or replayed if already done. `data` is always `null` — the extracted con…",
              "code": 200,
              "status": "200",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "400 — Missing `job_id`, malformed `options`, or unknown model.",
              "code": 400,
              "status": "400",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "401 — ",
              "code": 401,
              "status": "401",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "402 — ",
              "code": 402,
              "status": "402",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "404 — ",
              "code": 404,
              "status": "404",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "409 — Another request holds the single-flight claim on this chunk. Retry shortly; a stuck claim…",
              "code": 409,
              "status": "409",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "410 — ",
              "code": 410,
              "status": "410",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "422 — ",
              "code": 422,
              "status": "422",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "429 — ",
              "code": 429,
              "status": "429",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "500 — ",
              "code": 500,
              "status": "500",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            }
          ]
        },
        {
          "name": "Collect the stitched multi-page result",
          "request": {
            "method": "GET",
            "header": [

            ],
            "url": {
              "raw": "{{base_url}}/v3.1/result?job_id={{job_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v3.1",
                "result"
              ],
              "query": [
                {
                  "key": "job_id",
                  "value": "{{job_id}}",
                  "description": "Parent job id from the `202` manifest.",
                  "disabled": false
                },
                {
                  "key": "finalize",
                  "value": "false",
                  "description": "When true, permanently deletes all extracted data for this job after responding. Irreversible.",
                  "disabled": true
                }
              ]
            },
            "description": "Streams every completed chunk through the JSON stitcher in page order and returns the combined result."
          },
          "response": [
            {
              "name": "200 — Combined result. `status` is `complete` or `partial`.",
              "code": 200,
              "status": "200",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "400 — Missing `job_id`.",
              "code": 400,
              "status": "400",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "401 — ",
              "code": 401,
              "status": "401",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "404 — ",
              "code": 404,
              "status": "404",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "410 — ",
              "code": 410,
              "status": "410",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "429 — ",
              "code": 429,
              "status": "429",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "500 — ",
              "code": 500,
              "status": "500",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            }
          ]
        }
      ]
    },
    {
      "name": "Discovery",
      "description": "Capability and health checks that do not consume credits",
      "item": [
        {
          "name": "List document models available to this key",
          "request": {
            "method": "GET",
            "header": [

            ],
            "url": {
              "raw": "{{base_url}}/v3.1/models",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v3.1",
                "models"
              ]
            },
            "description": "Returns the prompt templates (document types) the authenticated key may use."
          },
          "response": [
            {
              "name": "200 — Allowed models for this key.",
              "code": 200,
              "status": "200",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "401 — Missing, invalid, inactive, or expired key.",
              "code": 401,
              "status": "401",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "405 — Method not allowed — use GET.",
              "code": 405,
              "status": "405",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "500 — ",
              "code": 500,
              "status": "500",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            }
          ]
        },
        {
          "name": "Service health",
          "request": {
            "method": "GET",
            "header": [

            ],
            "url": {
              "raw": "{{base_url}}/v3.1/health",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v3.1",
                "health"
              ]
            },
            "description": "Unauthenticated liveness check. Reports API version and database connectivity.",
            "auth": {
              "type": "noauth"
            }
          },
          "response": [
            {
              "name": "200 — Service status.",
              "code": 200,
              "status": "200",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            }
          ]
        },
        {
          "name": "Verify an API key is active",
          "request": {
            "method": "GET",
            "header": [

            ],
            "url": {
              "raw": "{{base_url}}/v3.1/authorised",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v3.1",
                "authorised"
              ]
            },
            "description": "Lightweight key check — confirms a key is active without processing a document. Use this to validate a key at integration setup time."
          },
          "response": [
            {
              "name": "200 — Key status.",
              "code": 200,
              "status": "200",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            },
            {
              "name": "401 — ",
              "code": 401,
              "status": "401",
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": ""
            }
          ]
        }
      ]
    }
  ]
}
