Extract
Receipt
Extract merchant, date, line items, and totals from a receipt.
POST /v1/extract/receipt is tuned for retail and food-service receipts — the kind of document with a header, columnar line items, and a totals block. Use Invoice for B2B invoices.
Request
curl https://api.untangledapi.com/v1/extract/receipt \
-H "x-api-key: $UNTANGLED_KEY" \
-H "content-type: application/json" \
-d '{
"document": {
"text": "BLUE BOTTLE COFFEE\n2026-04-12 09:14\nLatte 5.50\nCroissant 4.25\nSubtotal 9.75\nTax 0.85\nTotal 10.60\nVisa ****1234"
}
}'Response
{
"data": {
"merchant": "BLUE BOTTLE COFFEE",
"transaction_date": "2026-04-12T09:14:00",
"currency": "USD",
"items": [
{ "name": "Latte", "price": 5.50 },
{ "name": "Croissant", "price": 4.25 }
],
"subtotal": 9.75,
"tax": 0.85,
"total": 10.60,
"payment_method": "Visa ****1234"
},
"model": "claude-haiku-4-5",
"usage": {
"inputTokens": 360,
"outputTokens": 120
}
}Fields
| Field | Type | Notes |
|---|---|---|
merchant | string | The store / restaurant name. |
transaction_date | string (ISO 8601) | null | If a time is present it's included; otherwise just the date. |
currency | ISO 4217 | null | |
items[] | array | { name, price, quantity? }. |
subtotal / tax / total | number | null | |
payment_method | string | null | Last four digits if present, otherwise "Cash" / "Card" / etc. |
Tip extraction
Tips are surfaced as a separate field if the document has a clear Tip: line. If the receipt only shows a total-after-tip, we don't infer a tip — use the line-item structure or a Custom schema if you need it.