recipe · 6 fieldssale bill / tax invoice
sale bill / tax invoice
extraction api.
A GST tax invoice issued by the firm for goods it sold.
what it reads
the fields.
Rename any of them, drop the ones you don't need, or add the one your form asks for. Each comes back with the text it was read from.
| field | key | type | notes |
|---|---|---|---|
| Invoice no. | invoice_number | Text | — |
| Invoice date | invoice_date | Date | — |
| Firm name | firm_name | Name | Seller (issuer of the invoice) |
| Buyer's name | buyer_name | Name | — |
| HSN code | hsn_codes | Text | All HSN codes on the invoice, separated by commas |
| Invoice amount | invoice_amount | Amount (₹) | Grand total including tax |
the apia sale bill / tax invoice in,
a sale bill / tax invoice in,
json back.
Publish the recipe as a workflow and send it files. Each field returns its value, a clean normalised version, its status, the page and the source text.
curl https://api.patrapi.com/v1/workflows/wf_sale/extractions \
-H "Authorization: Bearer $PATRAPI_KEY" \
-F file=@sale-bill.pdf{ "status": "completed",
"document_type": "sale_bill",
"fields": {
"invoice_number": { "value": …, "status": "present", "page": 1 },
"invoice_date": { "value": …, "status": "present", "page": 1 },
"firm_name": { "value": …, "status": "present", "page": 1 },
"buyer_name": { "value": …, "status": "present", "page": 1 },
"hsn_codes": { "value": …, "status": "present", "page": 1 },
… 1 more
} }