POST a purchase order PDF, scan or photo and get its 18 fields back as JSON, every line item included, with each line, the tax and the order total re-added. $0.02 a page, 50 pages free, 250 pages a job.

Purchase order OCR API that re-adds the lines

The purchase_order preset extracts 18 top-level fields from purchase order files up to 250 pages long, and checks the math across every line and total. You get the parsed result in output.json, output.xlsx and output.csv.

Updated

Example

A hotel linen order with sales tax and freight

po-kittery.pdf is an order from Kittery Point Hotel Group to Tamsin Mill Textiles: 5 lines of bath and bed linen, sales tax and freight. The run re-adds every line, the tax and the order total.

POSTapi.parserkit.com/v1/parse?wait=60

curl "https://api.parserkit.com/v1/parse?wait=60" \
  -H "Authorization: Bearer $PARSERKIT_API_KEY" \
  -F file=@po-kittery.pdf \
  -F preset=purchase_order
response.jsonverified
{
  "id": "job_hruouulez7la2khofsj8",
  "status": "succeeded",
  "preset": "purchase_order",
  "pages": 1,
  "cost_usd": 0.02,
  "verification_status": "verified",
  "data": {
    "po_number": "KPH-7738",
    "issue_date": "2026-10-28",
    "delivery_date": "2026-11-16",
    "currency": "USD",
    "buyer": {
      "name": "Kittery Point Hotel Group",
      "address": "14 Pepperrell Rd, Kittery Point, ME 03905",
      "email": "purchasing@kitterypointhotels.example"
    },
    "supplier": {
      "name": "Tamsin Mill Textiles",
      "address": "1400 Battleground Ave, Greensboro, NC 27408"
    },
    "ship_to": "The Pepperrell Inn, 14 Pepperrell Rd, Kittery Point, ME 03905",
    "bill_to": "Kittery Point Hotel Group, PO Box 412, Kittery, ME 03904",
    "line_items": [
      {
        "sku": "TM-BS-K400",
        "description": "Bath sheet, 400 GSM, white",
        "quantity": 120,
        "unit": "each",
        "unit_price": 18.4,
        "total": 2208
      },
      {
        "sku": "TM-HT-200",
        "description": "Hand towel, 200 GSM, white",
        "quantity": 240,
        "unit": "each",
        "unit_price": 6.15,
        "total": 1476
      },
      {
        "sku": "TM-PC-Q300",
        "description": "Queen pillowcase, 300 thread count",
        "quantity": 96,
        "unit": "pair",
        "unit_price": 11.8,
        "total": 1132.8
      }
    ],
    "subtotal": 7583.8,
    "shipping": 245,
    "taxes": [
      {
        "label": "Sales tax 5.5%",
        "rate": 5.5,
        "base": 7583.8,
        "amount": 417.11
      }
    ],
    "tax_total": 417.11,
    "grand_total": 8245.91,
    "payment_terms": "Net 45",
    "notes": "Deliver to the loading dock between 8 AM and 2 PM. Quote the PO number on every packing slip."
  },
  "verification": {
    "status": "verified",
    "math_balanced": true,
    "coverage": {
      "values": 51,
      "checked": 51
    },
    "checks": [
      {
        "kind": "line_total",
        "path": "line_items[0].total",
        "status": "pass",
        "expected": 2208,
        "actual": 2208,
        "difference": 0,
        "message": "quantity x unit price"
      },
      {
        "kind": "line_total",
        "path": "line_items[1].total",
        "status": "pass",
        "expected": 1476,
        "actual": 1476,
        "difference": 0,
        "message": "quantity x unit price"
      },
      {
        "kind": "line_total",
        "path": "line_items[2].total",
        "status": "pass",
        "expected": 1132.8,
        "actual": 1132.8,
        "difference": 0,
        "message": "quantity x unit price"
      },
      {
        "kind": "line_total",
        "path": "line_items[3].total",
        "status": "pass",
        "expected": 2170,
        "actual": 2170,
        "difference": 0,
        "message": "quantity x unit price"
      },
      {
        "kind": "line_total",
        "path": "line_items[4].total",
        "status": "pass",
        "expected": 597,
        "actual": 597,
        "difference": 0,
        "message": "quantity x unit price"
      },
      {
        "kind": "line_total",
        "path": "taxes[0].amount",
        "status": "pass",
        "expected": 417.109,
        "actual": 417.11,
        "difference": 0.001,
        "message": "tax base x rate"
      }
    ]
  },
  "outputs": [
    {
      "name": "output.json",
      "bytes": 15759
    },
    {
      "name": "output.xlsx",
      "bytes": 10441
    },
    {
      "name": "output.csv",
      "bytes": 634
    }
  ],
  "warnings": []
}

Real response from . Trimmed to 3 of 5 line items and 6 of 9 checks, with bounding boxes, empty fields and file links left out.

Try it on this file

What a purchase order comes back as

The fields of the purchase_order preset, and what the run above returned for po-kittery.pdf.

What a purchase order comes back as
FieldWhat it holdsIn the sample
po_numberPurchase order numberKPH-7738
issue_date, delivery_dateOrder date and requested delivery date2026-10-28, 2026-11-16
buyer, supplierName, address, VAT and tax IDs, email and phone of eachKittery Point Hotel Group; Tamsin Mill Textiles
line_itemsSKU, description, quantity, unit, unit price and total of every line5 lines
subtotal, shippingTotal before tax and shipping, and the freight charge7,583.80; 245.00
taxes, tax_totalEach tax line with its base, rate and amount, and their totalSales tax 5.5%: 417.11
grand_totalOrder total8,245.91
payment_terms, incotermsPayment terms, and Incoterms like FOB RotterdamNet 45; null

Checks

What gets checked on a purchase order

  • Every line

    Quantity x unit price = line total, on each line of the order.

  • Tax lines

    Base x rate = amount on each tax line, and the tax lines add up to tax_total.

  • Subtotal

    The line totals add up to the subtotal.

  • Order total

    The line totals plus tax and shipping, minus the order discount, equal the grand total.

  • Tax IDs

    An EU VAT number on the buyer or supplier gets its country format checked, and a US EIN its IRS prefix.

  • Second read

    Fields a failing check names are re-read from a 400 DPI crop, and a new reading stays only if the page prints it and it fixes the sum.

What comes back for a purchase order

The purchase_order preset returns po_number, issue_date, delivery_date, currency, buyer, supplier, ship_to, bill_to, line_items, subtotal, discount_total, shipping, taxes, tax_total, grand_total, payment_terms, incoterms and notes. Both buyer and supplier come back as objects with name, address, vat_id, tax_id, email and phone. Every item in line_items stays in printed order with sku, description, quantity, unit, unit_price and total, plus gl_code, gl_name and gl_confidence when you send gl_accounts.

Alongside output.json and output.xlsx, the job writes output.csv with the document's main list, one row per line and the header fields in front. In our run on po-kittery.pdf, output.csv has one row per line item with the columns po_number, issue_date, supplier.name, currency, sku, description, quantity, unit, unit_price, total. If you also extract other document types, the PDF to JSON API covers all 7 presets: invoice, receipt, bank_statement, resume, purchase_order, bill_of_lading and generic_table.

How the sums are checked

A purchase order is checked by the invoice math. On every line, quantity x unit_price must equal the line total, and the line totals must add up to subtotal. Each tax line's base x rate must equal its amount, the tax lines must add up to tax_total, and the line totals plus tax_total plus shipping minus discount_total must equal grand_total. A sum passes within one minor unit of the currency, which is 0.01 for a currency with 2 decimals. Tax IDs are checked too: a vat_id gets the EU VAT number format of its country checked, and a tax_id holding a US EIN gets its IRS prefix checked, while masked numbers are skipped.

When a check fails, it says what the other values give, what the document says and how far apart they are. Any fields named by a failing check get re-read from a 400 DPI crop; we only keep a new reading when it's printed on the page and fixes the failure, otherwise the job stays a discrepancy. When no check fails, a job with no checked value is unverified, one where every value of a complete document is checked is verified, and anything between is partial.

Matching purchase orders to invoices

The API reads each document on its own and doesn't match purchase orders to invoices, so matching the fields of the two is up to your code. When you parse invoices through the invoice parser API for accounts payable invoices, the invoice preset returns a purchase_order field holding the purchase order number the invoice quotes, and its lines carry sku, description, quantity, unit, unit_price and total, the same line fields a purchase order comes back with.

What it costs

Pages cost $0.02 each, dropping to $0.01 a page past 5,000 pages in a UTC month, so 1,000 one-page purchase orders a month cost $20. The Pro plan is $29 a month or $290 a year with 1,500 pages included, then $0.01 a page. You get $1 in free credit on Google sign-in (50 pages, no card), and failed jobs and exact duplicates cost 0; see the pricing page for the full breakdown.

FAQ

Common questions

Does it read scanned purchase orders and photos?

Yes, the API accepts PDF, JPEG, PNG, WebP, HEIC, TIFF, DOCX, XLSX, CSV, HTML, TXT, EML, MSG and ZIP files up to 25 MB as multipart or 100 MB by file_url or /v1/uploads. Pages with a text layer are read directly from it and pages without one go through OCR, with the counts returned in digital_pages and ocr_pages. In our run on po-kittery.pdf, the job recorded digital_pages 1 and ocr_pages 0.

Which sums does it check on a purchase order?

It checks that quantity x unit_price equals total on each line, that the line totals sum to subtotal, that each tax line's base x rate equals its amount, and that the tax lines sum to tax_total. It also checks that the line totals plus tax_total plus shipping minus discount_total equal grand_total, passing within one minor unit of the currency (0.01 for a 2-decimal currency).

What happens when a purchase order does not add up?

Fields named by a failing check are re-read from a 400 DPI crop, and the new reading is kept only if it's printed on the page and fixes the math. If it doesn't, the job status stays discrepancy and the failing check reports what the other values give, what the document says and how far apart they are.

Can it code purchase order lines to my GL accounts?

Yes. Pass gl_accounts with at most 500 accounts formatted as { code, name, keywords?, description? }, and each line item comes back with gl_code, gl_name and gl_confidence.

How much does purchase order OCR cost?

Pay-as-you-go is $0.02 a page and $0.01 a page after 5,000 pages in a UTC month, or you can use the Pro plan at $29 a month ($290 a year) with 1,500 pages included and $0.01 a page after. DOCX, HTML and email bodies bill 1 page per 3000 characters, XLSX and CSV bill 1 page per 50 rows, and failed jobs and exact duplicates cost 0.

Sources, checked

Start free

Send us your worst scan

Your first $1 is free: 50 pages with every check and export, no card.

Crumpled receipts and a printed bank statement with one line marked in green highlighter, on a dark desk