Skip to content
Reading documents 4 min read · LogicSpoke PDF

Extract structured data from receipts with one API call

TL;DR: sys_receipt is a built-in extraction schema that pulls merchant, date, itemized purchases, total, and payment method from any receipt image or PDF — one API call, no schema to write yourself.

Expense reimbursement and bookkeeping both start the same way: someone has a photo of a crumpled receipt and needs the merchant, date, and total in a system somewhere. sys_receipt is a built-in LogicSpoke extraction schema built for exactly that — no need to write your own JSON schema for something this common.

What gets extracted

Field Type Notes
merchant string Business name on the receipt
date date Purchase date
items array of {name, price} Itemized line items
total number Final amount charged
paymentMethod string e.g. "Visa", "Cash"
currency string ISO-ish currency label

The API call

curl -X POST "https://api.logicspoke.com/pdf/v1/pdf/parse/sync" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -F "[email protected]" \
     -F "schemaId=sys_receipt"

Photos work the same as scanned PDFs — image-only input is automatically routed through OCR, no separate configuration needed.

Response:

{
  "success": true,
  "parseId": "parse_abc123",
  "data": {
    "merchant": "Starbucks Coffee",
    "date": "2026-06-15",
    "items": [
      { "name": "Caffe Latte", "price": 4.75 },
      { "name": "Blueberry Scone", "price": 3.50 }
    ],
    "total": 8.25,
    "paymentMethod": "Visa",
    "currency": "USD"
  },
  "usage": { "pages": 1, "creditsUsed": 3 }
}

sys_receipt is tagged as a finance-category schema, so PII redaction (redact) is applied automatically even if you don't set it — card numbers or personal identifiers picked up incidentally on a receipt are stripped before the text reaches the AI model.

Questions

What if the receipt is faded or handwritten?

For low-quality scans or handwritten receipts, pass vision=true to route through Vision mode instead of standard OCR — higher cost (20 credits/page vs the standard OCR rate), better results on hard-to-read documents.

Can I extract additional fields not in the default schema (like tax amount or a loyalty number)?

Yes — pass your own inline schema instead of schemaId=sys_receipt if you need fields the built-in schema doesn't cover. If you'd rather not hand-write JSON Schema, paste a sampleOutput object shaped like the result you want instead — the API infers a schema from the example.

Does this work for batches of receipts (e.g., a monthly expense folder)?

There's no batch endpoint for parsing today — each receipt is a separate /v1/pdf/parse (or /sync) call. See the invoice automation guide for a pattern that handles a folder of documents one at a time via automation tools.

Try it on a real receipt.

Starter credits included on signup. No card required.