Accounts Payable Automation: Turn Invoices Into Structured Data

InvoicesReceiptsPurchase ordersPacking slipsCredit memos

The problem

AP teams lose hours every week re-keying vendor names, invoice numbers, line items, and totals from PDFs and scans into accounting software. It's repetitive, error-prone, and it gets worse — not better — as invoice volume grows.

Generic OCR tools make this harder, not easier: they hand back a wall of raw text or loose key-value pairs, and you still have to write the code that turns that into "total = 4,125.60."

How Dokyumi solves it

Define an invoice schema once — vendor name, invoice number, dates, PO number, line items, total — or let AI infer it from a sample invoice. Select that schema by slug when calling the shared extraction endpoint.

Call the endpoint directly from your AP tool with the invoice file and schema slug. The response contains structured data, a model-reported confidence map, and validation details. Route review results before posting anything to your ledger.

Example schema and result

A real schema shape for accounts payable documents, and the JSON you get back from one extraction.

Example schema definition

{
  "slug": "ap-invoice-parser",
  "name": "AP Invoice Parser",
  "description": "Extracts vendor, line items, and totals from vendor invoices and receipts",
  "ocr_mode": "standard",
  "fields": [
    {
      "key": "vendor_name",
      "type": "string",
      "required": true
    },
    {
      "key": "invoice_number",
      "type": "string",
      "required": true
    },
    {
      "key": "invoice_date",
      "type": "date",
      "required": true
    },
    {
      "key": "due_date",
      "type": "date",
      "required": false
    },
    {
      "key": "po_number",
      "type": "string",
      "required": false
    },
    {
      "key": "subtotal",
      "type": "currency",
      "required": false
    },
    {
      "key": "tax_amount",
      "type": "currency",
      "required": false
    },
    {
      "key": "total",
      "type": "currency",
      "required": true
    },
    {
      "key": "line_items",
      "type": "array",
      "required": false
    }
  ]
}

Result — POST /api/v1/extract

{
  "id": "7e08ab8a-90da-4ffd-8c8d-b6fe8d253985",
  "status": "completed",
  "request_id": "b0d4b0b3-162f-4e72-b70f-b050f1d73e6e",
  "schema": "ap-invoice-parser",
  "data": {
    "vendor_name": "Acme Supply Co.",
    "invoice_number": "INV-88213",
    "invoice_date": "2026-06-02",
    "due_date": "2026-07-02",
    "po_number": "PO-40021",
    "subtotal": 3820,
    "tax_amount": 305.6,
    "total": 4125.6,
    "line_items": [
      {
        "description": "Industrial filters",
        "quantity": 10,
        "line_total": 2400
      },
      {
        "description": "Replacement seals",
        "quantity": 20,
        "line_total": 920
      },
      {
        "description": "Freight",
        "quantity": 1,
        "line_total": 500
      }
    ]
  },
  "confidence": {
    "vendor_name": 0.99,
    "invoice_number": 0.98,
    "total": 0.99,
    "po_number": 0.94
  },
  "validation": {
    "valid": true,
    "errors": [],
    "low_confidence_fields": []
  },
  "meta": {
    "processing_time_ms": 1180,
    "page_count": 1,
    "credits_used": 1,
    "ocr_cached": false,
    "model": "anthropic/claude-sonnet-4"
  }
}

How it works

1

Define your AP schema

Describe an invoice/receipt schema once, or let AI infer it from a sample document you upload.

2

Call the shared endpoint

Send the invoice file and schema slug directly from your AP software.

3

Inspect the structured response

Review vendor, line-item, total, and PO data alongside the confidence map and validation details.

4

Route review before your ledger

Resolve validation errors and low-confidence fields before posting to your accounting system; upload-site submissions can also use a configured webhook.

Accounts Payable FAQ

Does Dokyumi match invoices to purchase orders?+
Dokyumi extracts the PO number and any other fields you define — matching that number against your open PO list is logic you run on your side using the API response. There's no built-in PO-matching engine today.
Does it integrate directly with QuickBooks, NetSuite, or Bill.com?+
Not with a native pre-built connector. Direct API extractions return JSON in the response, and upload-site submissions can use a configured webhook, so you can build an integration into your AP or ERP system.
Can it handle invoices from hundreds of different vendors?+
Yes — extraction is schema-first, not template-based. You define the fields you want, and the same schema can work across vendor formats as long as those fields appear on the page.
What if an invoice is missing a field, like a PO number?+
It comes back empty and is flagged in the validation output so you know to check the source document — the rest of the extraction still completes.
Does resubmitting the same invoice cost extra?+
Yes. Every extraction consumes page-weighted credits. For an identical file, cached OCR can reduce processing work and often improve response time, but it does not make the extraction free.

Stop re-keying invoices by hand.

25 free credits every month — one credit covers a document up to 5 pages, with no credit card or AWS account required.