OCR Tax Invoice API

OCR Upload API

Use this API to Extract data from the Invoice/Delivery order & Bill of Entry & E-invoice QR code

Upload API

NameDescription

API

Upload

URL

Method Type

POST

Headers

KeyValuesMandatory

Authorization

JWT {{token}}

Yes

subid

Will be shared during POC.

Yes

productid

arap

Yes

mode

Buyer

Yes

Body

form_data

file_url

file

Select file - you can upload are - PDF/JPEG/PNG

document_type

Action

Hit the Send button.

Response

Note - Response may vary as per data available in the Invoice - In key value and Line item

{
    "data": {
        "invoices": [
            {
                "field_data": {
                    "currency": {
                        "value": "INR",
                        "accuracy": 0.0
                    },
                    "buyer_gstin": {
                        "value": "03AAICM5508J1ZI",
                        "accuracy": 71.3
                    },
                    "buyer_pan_number": {
                        "value": "AAICM5508J",
                        "accuracy": 99.88749623298645
                    },
                    "ewaybill_number": {
                        "value": "691548424357",
                        "accuracy": 99.96246099472046
                    },
                    "invoice_amount": {
                        "value": 4298376.56,
                        "accuracy": 94.1
                    },
                    "invoice_date": {
                        "value": "08/04/2023",
                        "accuracy": 93.6
                    },
                    "invoice_number": {
                        "value": "24183001003678",
                        "accuracy": 94.1
                    },
                    "po_number": {
                        "value": "24183000",
                        "accuracy": 94.1
                    },
                    "invoice_due_date": {
                        "value": "08/04/2023",
                        "accuracy": 94.1
                    },
                    "payment_term": {
                        "value": "30",
                        "accuracy": 94.1
                    },
                    "irn": {
                        "value": "IRN887292f8b4469c62a933bc56a6a8e131a8ebb88id2059fd93796ce2c2blbe",
                        "accuracy": 99.77746605873108
                    },
                    "ship_to_gstin": {
                        "value": "03AAICM5508J1ZI",
                        "accuracy": 99.84920024871826
                    },
                    "ship_to_name": {
                        "value": "TOPPAN SPECIALITY FILMS PRIVATE LTD",
                        "accuracy": 95.97364783287048
                    },
                    "supplier_gstin": {
                        "value": "24AAACR5055K1ZD",
                        "accuracy": 42.3
                    },
                    "pan_number": {
                        "value": "AAACR5055K",
                        "accuracy": 99.80529546737671
                    },
                    "total_igst": {
                        "value": 655684.56,
                        "accuracy": 99.9909281730651
                    },
                    "total_cgst": {
                        "value": 655684.56,
                        "accuracy": 99.99092817306519
                    },
                    "total_sgst": {
                        "value": 655684.56,
                        "accuracy": 99.99092817306519
                    },
                    "total_taxable": {
                        "value": 3642692.0,
                        "accuracy": 84.7
                    },
                    "total_discount": {
                        "value": 6584.56,
                        "accuracy": 93.8
                    },
                    "rounding_amount": {
                        "value": 0.38,
                        "accuracy": 84.7
                    },
                    "supplier_address": {
                        "value": "PO Motikhavdi\nMeghpar Padana Gagva\nJamnagar, Gujarat (24) , 361140",
                        "accuracy": 88.9
                    },
                    "buyer_address": {
                        "value": "419 BHAI MOHAN SINGH NAGAR VILLAGE RAILMAJRA TEHSIL BALACHAUR SHAHID BHAGAT SINGH NAGAR ",
                        "accuracy": 96.73346143502457
                    },
                    "supplier_name": {
                        "value": "Reliance Industries Limited",
                        "accuracy": 93.6
                    },
                    "buyer_name": {
                        "value": "TOPPAN SPECIALITY FILMS PRIVATE LTD",
                        "accuracy": 93.3
                    },
                    "ship_to_address": {
                        "value": "419 BHAI MOHAN SINGH NAGAR\nVILLAGE RAILMAJRA\nTEHSIL BALACHAUR\nNAWANSHAHR, PUNJAB (03) , 144533",
                        "accuracy": 87.3
                    },
                    "total_tax_amount": {
                        "value": 655684.56,
                        "accuracy": 93.8
                    },
                    "supplier_gstin_status": {
                        "value": true,
                        "accuracy": 100
                    },
                    "supplier_einvoice_status": {
                        "value": true,
                        "accuracy": 100
                    }
                },
                "table_data": [
                    [
                       {
                            "item_total_amount": {
                                "value": 30.00,
                                "accuracy": 85.2
                            },
                            "item_description": {
                                "value": "Item01 :",
                                "accuracy": 71.7
                            },
                            "item_hsn": {
                                "value": "996601",
                                "accuracy": 72.6
                            },
                            "item_unit_price": {
                                "value": 2750.00,
                                "accuracy": 51.8
                            },
                            "item_cgst_rate": {
                                "value": 6.0,
                                "accuracy": 0
                            },
                            "item_cgst_value": {
                                "value": 165.0,
                                "accuracy": 0
                            },
                            "item_sgst_rate": {
                                "value": 6.0,
                                "accuracy": 0
                            },
                            "item_sgst_value": {
                                "value": 165.0,
                                "accuracy": 0
                            },
                            "item_quantity": {
                                "value": 1,
                                "accuracy": 0
                            },
                            "item_taxable_value": {
                                "value": 2750.0,
                                "accuracy": 0
                            },
                            "item_uom": {
                                "value": "Liters",
                                "accuracy": 86.9
                            },
                            "item_igst_rate": {
                                "value": 18.0,
                                "accuracy": 0
                            },
                            "item_igst_value": {
                                "value": 289.08,
                                "accuracy": 0
                            }
                        },
                        {
                            "item_total_amount": {
                                "value": 840.00,
                                "accuracy": 85.2
                            },
                            "item_description": {
                                "value": "Item01",
                                "accuracy": 85.2
                            },
                            "item_hsn": {
                                "value": "996601",
                                "accuracy": 72.7
                            },
                            "item_unit_price": {
                                "value": 750.00,
                                "accuracy": 59.0
                            },
                            "item_cgst_rate": {
                                "value": 6.0,
                                "accuracy": 0
                            },
                            "item_cgst_value": {
                                "value": 45.0,
                                "accuracy": 0
                            },
                            "item_sgst_rate": {
                                "value": 6.0,
                                "accuracy": 0
                            },
                            "item_sgst_value": {
                                "value": 45.0,
                                "accuracy": 0
                            },
                            "item_quantity": {
                                "value": 1,
                                "accuracy": 0
                            },
                            "item_taxable_value": {
                                "value": 750.0,
                                "accuracy": 0
                            },
                            "item_uom": {
                                "value": "Liters",
                                "accuracy": 86.9
                            },
                            "item_igst_rate": {
                                "value": 18.0,
                                "accuracy": 0
                            },
                            "item_igst_value": {
                                "value": 289.08,
                                "accuracy": 0
                            }
                        },
                    ]
                ],
                "file_url": [
                    "https://qa-arapback.mastersindia-einv.com/api/v2/get-presigned-file/?file=invoiceannotation/img_387_0003e18343ce8bef187bd767ac68_page0.jpg",
                    "https://qa-arapback.mastersindia-einv.com/api/v2/get-presigned-file/?file=invoiceannotation/img_387_01cd90e073acfe6e4a6b00ac09_page1.jpg"
                ],
                "file_status": "duplicate for 594720341085781510",
                "file_name": "Invoice-3.pdf",
                "qr_status": "QR Success"
            }
        ],
        "request_status": "completed"
    },
    "message": "Data Extracted Successfully",
    "status_code": 200,
    "success": true
}

You can use this JSON Response in your ERP or Software as per your requirement

Fields OCR Extract

The table will explain the Field Name with Descriptions, Type, and example

TypeField NameFiled keyData Type

Key Value pair

Currency

currency

String

Invoice No.

invoice_number

String

Invoice Date

invoice_date

String

Invoice Due Date

invoice_due_date

String

PO No

po_number

String

Payment Terms

payment_term

String

IRN

irn

String

Invoice Type

invoice_type

String

E Way Bill Number

ewaybill_number

String

Supplier Name

supplier_name

String

Supplier Pan

pan_number

String

Supplier GSTIN

supplier_gstin

String

Supplier Address

supplier_address

String

Buyer Address

buyer_address

String

Buyer Name

buyer_name

String

Buyer Pan

buyer_pan_number

String

Buyer GSTIN

buyer_gstin

String

Ship to GSTIN

ship_to_gstin

String

Shipping Address

ship_to_address

String

Ship to name

ship_to_name

String

Ship to Place

place_of_supply

String

Total Discount

total_discount

Integer

Total Taxable Value

total_taxable

Integer

CGST Amount

total_cgst_amount

Integer

SGST Amount

total_sgst_amount

Integer

IGST Amount

total_igst_amount

Integer

Total Tax Amount

total_tax_amount

Integer

Invoice Amount

invoice_amount

Integer

Round Off

rounding_amount

Integer

Supplier GSTIN Status

supplier_gstin_status

boolean

Supplier einvoice Status

supplier_einvoice_status

boolean

Table

Line Item Description

item_description

String

Line Item UOM

item_uom

String

Line Item HSN

item_hsn

String

Line Item Unit Price

item_unit_price

Integer

Line Item Quantity

item_quantity

Integer

Line Item Discount

item_discount

Integer

Line Item Taxable Value

item_taxable_value

Integer

Line Item IGST value

item_igst_value

Integer

Line Item IGST rate

item_igst_rate

Integer

Line Item CGST rate

item_cgst_rate

Integer

Line Item CGST value

item_cgst_value

Integer

Line Item SGST rate

item_sgst_rate

Integer

Line Item SGST value

item_sgst_value

Integer

Line Item Total Amount

item_total_amount

Integer

QR Data

Qr Supplier Gstin

qr_supplier_gstin

String

Qr Buyer Gstin

qr_buyer_gstin

String

Qr Invoice Number

qr_invoice_number

String

Qr Invoice Date

qr_invoice_date

String

Qr Invoice Value

qr_invoice_value

String

Qr Total Item

qr_total_item

String

Qr Hsn Code

qr_hsn_code

String

Qr Hash Code

qr_hash_code

String

Need Help in Getting Started Request a Demo or try our Invoice OCR Software or API

Response Form is JSON

What is JSON - stands for JavaScript Object Notation, which is a lightweight format for storing and transporting data. JSON is often used when data is sent from a server to a web page, or when data needs to be parsed and manipulated in various programming languages.

Field data is a term that refers to the data collected from a field.

  1. Field name is a term that refers to the name of a field in a data structure, such as a JSON object, an array, a table, or a form. A field name identifies the type or meaning of the data stored in the field.

  2. Value is a term that refers to the data stored in a field. A value can be a string, a number, an object, an array, a boolean, or null.

  3. Accuracy is a term that refers to the degree of closeness of a measured or calculated value to its true value. It is a confidence level or score of the model to a particular field it generates once it detects or extracts the value of a field on a particular place inside the invoice.

Table data is a term that refers to the data that is organized in a tabular format, such as rows and columns.

Last updated