Skip to Content
DocsInvoice

Ratify AI — Invoice Processing API

POST https://api.ratifyai.in/ocr

Ratify AI’s Process Invoice endpoint allows you to submit and extract data from unstructured invoice into valuable business insights. The Process a Invoice endpoint enables you to submit the following image formats: .heif,.png, .pdf,.jpeg,.jpg, and retrieve extracted data in JSON format. The max file size is 10mb, min file size is 0kb.

API Request

curl -i 'https://api.ratifyai.in/ocr/v1/invoice' \ --header 'Client-Id: <YOUR_CLIENT_ID>' \ --header 'Authorization: Bearer <YOUR_TOKEN>' \ --form 'file=@"/home/img_1.jpg"'

API Response

The processed document response.

{ "rid": string, "img": string, // URL (signed) "status": string, // "Success" | "Failed" "supplier": { "add": { "score": number, "text": string }, "name": { "score": number, "text": string }, "gst": { "score": number, "text": string }, "pan": { "score": number, "text": string } }, "recipient": { "add": { "score": number, "text": string }, "name": { "score": number, "text": string } "gst": { "score": number, "text": string }, "pan": { "score": number, "text": string } }, "invoice": { "invoice_no": { "score": number, "text": string }, "invoice_date": { "score": number, "text": string // format: dd-MMM-yy (string, not date) }, "po_number": { "score": number, "text": string }, "po_date": { "score": number, "text": string // format: dd-MMM-yy (string, not date) } }, "items": [ { "score": number, "extr_table_data": { "headers": string[], "rows": Array<string[]> }, "per_html": string // raw HTML table } ], "totals": { "amount": { "score": number, "text": string | number // basic amount sum }, "sgst": { "score": number, "text": string | number }, "cgst": { "score": number, "text": string | number }, "igst": { "score": number, "text": string | number }, "total_amount": { "score": number, "text": string | number // grand total } }, "initiatedAt": number // epoch milliseconds }

contact support to enable any additional fields on your account.