JSON schema
Invoice and receipt JSON schema
By Othmane M., founder of DocuParse API · Last reviewed: 2026-10-20
Every invoice or receipt you send comes back in this shape, whatever the layout. Here is a real result, then every field explained.
Real example
{
"document_type": "invoice",
"document_number": "31293737",
"invoice_id": "31293737",
"receipt_id": null,
"date": "2020-12-15",
"due_date": null,
"currency": "USD",
"merchant": "Nunez Inc",
"merchant_address": "6551 Janet Gardens, Michaelberg, KS 90952",
"merchant_email": null,
"customer": "Alvarez Inc",
"subtotal": "371.51",
"tax": "37.15",
"tax_rate": "10.00",
"discount": null,
"shipping": null,
"total": "408.66",
"payment_method": null,
"notes": null,
"line_items": [
{
"description": "Women's black cocktail dress, size 4",
"quantity": 3,
"price": "19.99",
"line_total": "59.97",
"vat_rate": "10.00"
},
{
"description": "Christmas Dress Grace Karin Sleeveless Christmas dress Red Black size Large",
"quantity": 1,
"price": "9.99",
"line_total": "9.99",
"vat_rate": "10.00"
},
{
"description": "Windsor womens black and Pink Bodycon Sleeveless Dress, Womens Size Small",
"quantity": 1,
"price": "15.83",
"line_total": "15.83",
"vat_rate": "10.00"
},
{
"description": "Lumiere Large Multicolored Orange Short Dress NWT",
"quantity": 4,
"price": "4.99",
"line_total": "19.96",
"vat_rate": "10.00"
},
{
"description": "Xhilaration Womens L Burgandy Boho Embroidered Festival Mini Dress NEW",
"quantity": 4,
"price": "14.95",
"line_total": "59.80",
"vat_rate": "10.00"
},
{
"description": "Johnny Was Medium Linen Wrap Dress Dessert Rose Embroiderd Bohemian",
"quantity": 2,
"price": "89.99",
"line_total": "179.98",
"vat_rate": "10.00"
},
{
"description": "Pre-Owned Women's Nah Nah Dress Size 8 Black Sheer Formal Sexy",
"quantity": 2,
"price": "12.99",
"line_total": "25.98",
"vat_rate": "10.00"
}
]
}Real output: the data object for a 7-line-item invoice. Nothing hand-edited.
Fields
| Field | Type | Can be null | Description |
|---|---|---|---|
| document_type | string | no | invoice, receipt, purchase_order, expense_report or unknown |
| document_number | string | yes | The business number on the document (invoice or receipt number) |
| invoice_id | string | yes | Invoice number, when the document is an invoice |
| receipt_id | string | yes | Receipt or transaction number, when the document is a receipt |
| date | string (YYYY-MM-DD) | yes | Issue date |
| due_date | string (YYYY-MM-DD) | yes | Payment due date |
| currency | string (ISO 4217) | yes | For example USD, EUR |
| merchant | string | yes | Seller or store name |
| merchant_address | string | yes | Seller address as printed |
| merchant_email | string | yes | Seller email |
| customer | string | yes | Buyer name, when printed |
| subtotal | string (2 decimals) | yes | Amount before tax |
| tax | string (2 decimals) | yes | Tax amount |
| tax_rate | string (2 decimals) | yes | Tax rate in percent, e.g. "10.00" |
| discount | string (2 decimals) | yes | Discount amount |
| shipping | string (2 decimals) | yes | Shipping amount |
| total | string (2 decimals) | yes | Final amount |
| payment_method | string | yes | For example card or cash, when printed |
| notes | string | yes | Free-text notes on the document |
| confidence | number (0–100) | no | How consistent the extracted values are with each other |
| needs_review | boolean | no | true when a person should check the result |
| line_items[].description | string | yes | Item text |
| line_items[].quantity | number | yes | Quantity |
| line_items[].price | string (2 decimals) | yes | Unit price |
| line_items[].line_total | string (2 decimals) | yes | Line amount |
| line_items[].vat_rate | string (2 decimals) | yes | Line tax rate in percent |
confidence and needs_review appear in API responses next to these fields. The response envelope is {"success": true, "document_id": "…", "status": "completed", "data": { … }}.
Rules
- Every field is always present; missing values are null, never omitted.
- Money is a string with 2 decimals, so totals never lose precision.
- quantity is a number.
- Dates are ISO 8601 (YYYY-MM-DD).