PDFCraft
Extraction guide

Extract a credit note PDF to JSON

Everything below is the response the live API returned for a credit note, 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-payable and ERP integrations that must net a credit against an original invoice before paying it.

The job, in the words people search for: “parse credit notes against the invoices they reverse”.

What makes this shape awkward

Every money column is negative, and negatives are printed in parentheses as often as with a minus sign. A number parser that does not read accounting notation returns nulls for the entire amount column — or, worse, positives.

The measured result

Pages read1
Time8 ms (8 ms/page)
Labelled fields found unprompted5
Tables1 (6 rows)
Inputcredit-note.pdf (28 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 credit note>",
    "schema": {
      "credit_note_number": "string",
      "against_invoice": "string",
      "issue_date": "date"
    }
  }'

What came back

Fieldrawvalueconfidence
credit_note_numberCN-2026-0912"CN-2026-0912"60%
against_invoiceINV-2026-04817"INV-2026-04817"60%
issue_date2026-04-02"2026-04-02"70%

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.

Credit Note Number, Against Invoice, Issue Date, Reason, Total Credit

Tables

Description · Qty · Unit price · Credit · 6 rows × 4 columns · page 1

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

DescriptionQtyUnit priceCredit
Steel bracket, 40mm2206.00(412.00)
Gasket set2231.00(462.00)
Bearing, sealed1195.00(195.00)

First 3 of 6 rows.

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

{
  "Description": "Steel bracket, 40mm",
  "Qty": "2",
  "Unit price": "206.00",
  "Credit": "(412.00)"
}

What this does not do

Try it on your own credit note

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