PDFCraft
Extraction guide

Extract a remittance advice PDF to JSON

Everything below is the response the live API returned for a remittance advice, generated when this page was built. Not a description of what it would return — the output itself, including what it scored low on.

Who this is for

Accounts-receivable and cash-application teams reconciling a single payment against many invoices.

The job, in the words people search for: “match remittance advice to open invoices automatically”.

What makes this shape awkward

The interesting content is a table of invoice numbers and the amount paid against each — and the deductions column is frequently blank, which is a shape that makes naive header detection give up.

The measured result

Pages read1
Time15 ms (15 ms/page)
Labelled fields found unprompted4
Tables1 (14 rows)
Inputremittance-advice.pdf (25 KB — synthetic, generated from a spec in the repo; real documents of this type cannot be published)

Fields, with a schema

Ask for the fields you want by the label printed on the page. Each answer carries the text exactly as printed (raw), the value coerced to the type you asked for, a confidence, and a bounding box you can draw on the page to check it.

curl -X POST https://api.pdfcraft.dev/v1/extract \
  -H "Authorization: Bearer $PDFCRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": "<base64 of your remittance advice>",
    "schema": {
      "payment_reference": "string",
      "payment_date": "date",
      "total_paid": "currency"
    }
  }'

What came back

Fieldrawvalueconfidence
payment_referencePAY-2026-0455"PAY-2026-0455"60%
payment_date2026-03-20"2026-03-20"70%
total_paidGBP 41,002.1841002.18 GBP70%

Every label it found without being asked

Send no schema and you get all of these, keyed by the label as printed. Useful for discovering what a new supplier’s layout actually contains before you write a schema against it.

Payment Reference, Payment Date, Payment Method, Total Paid

Tables

Invoice · Invoice date · Gross · Deduction · Paid · 14 rows × 5 columns · page 1

Table confidence 90%. Header confidence 100% — the first row was promoted out of the data.

InvoiceInvoice dateGrossDeductionPaid
INV-2026-041002026-02-012,608.0086.002,522.00
INV-2026-041012026-02-022,868.00141.002,727.00
INV-2026-041022026-02-038,078.00—8,078.00

First 3 of 14 rows.

With options.rows_as_objects, the same row keyed by its header:

{
  "Invoice": "INV-2026-04100",
  "Invoice date": "2026-02-01",
  "Gross": "2,608.00",
  "Deduction": "86.00",
  "Paid": "2,522.00"
}

What this does not do

Try it on your own remittance advice

The playground takes a file and shows the same JSON, with every bounding box drawn over the page. No key and no signup for the first few; a free key gives you 100 pages a month.

Related