Scanning receipts and customize JSON response

Message: Hi, This is regard to OCR API for scanning receipts that should identify the following fields and return the result in the JSON format:

Summary fields:

  • Merchant/Vendor name
  • Address - Date
  • Bill/Invoice No
  • GST/Tax No:

Table fields:

  • Item name
  • Quantity/Qty
  • Price/Rate
  • Amount

We need the JSON output in the above fields(format) where we can pick the values from key:value pair for the above Summary & Table fields. Just like the AWS Textract API does, where we can pick up the fields value from the result return by the API in the below JSON format. This should be applicable to any formats of receipt we scan with OCR API. We do not want to implement logic identifying which line items and words corresponds to Vendor, Date, Bill No etc… Same should be applicable to table fields where we can get the item name, qty, rate amount etc… in the JSON result from OCR API.

I hope the concept is clear with you, that is after scanning any receipt using OCR API the
result should be in the below JSON format. We would definitely be using the OCR API if the requirement mentioned in this message is fulfilled.

JSON Format:

{ “error”: false, “msg”: “File parsed successful…”,
“vendor”: “LIQUOR WORLD”,
“address”: “123 Avenue, NYC-11231”,
“billno”: “12/453”,
“billdate”: “28/05/2022”,
“gstno”: “GSTIN1234567890”,
{ “item_name”: “Absolut 750 M1”, “quantity”: “2”, “rate”: “2800” },
{ “item_name”: “Gordons Gin Bottle 700”, “quantity”: “1”, “rate”: “2000”}
“success”: true }

Awaiting your earliest reply! Regards,

1 Like

Currently some of our users achieve this by feeding the OCR API results into regular expressions.

The OCR API itself is “only” an OCR service, it does not have support for automatic field assignments yet.

First, If we ask you to do the automatic field assignment, as a customize solution, will you be able to do that??

Second, Is it possible if you could you just send data table response in key value pairs with ‘Table’ as the main JSON element??

The rest we will take care of.
Awaiting your earliest reply