Consumer Durables Invoice OCR API
The following document highlights the details of the Consumer Durables Invoice OCR API.
API Description
Objective
The Consumer Durables Invoice OCR API extracts information from an image or document of an invoice and returns it in a JSON format. The fields extracted are as follows:
- Invoice Number
- Invoice Date
- Dealer Name
- Dealer Address
- GSTIN Number
- Name of the customer
- Address of the customer
- Phone number of the customer
- Invoice amount in INR
- Asset Details. This is an array where each element is a JSON containing:
- Brand of asset
- Category of asset
- Model Number
- Asset Cost in INR
- CGST Amount
- SGST Amount
- IMEI Number (in case it is a smartphone) or Serial Number (in case of other devices)
| Input | Output |
|---|---|
| An image or PDF file containing the Consumer Durables Invoice | The textual information extracted from the document and converted into a JSON format. The complete list of output fields is provided under the Success Response Details section. |
API URL
https://ind-engine.thomas.hyperverge.co/v1/readConsumerDurableInvoice
API Endpoint
readConsumerDurableInvoice
Overview
The Consumer Durables Invoice OCR API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.
Method - POST
Authentication
You need a unique pair of application ID ( appId ) and application key ( appKey ) from HyperVerge to verify your identity for accessing the Consumer Durables Invoice OCR API.
Headers
| Header | Mandatory / Optional | Description | Input Format |
|---|---|---|---|
| content-type | Mandatory | This parameter defines the media type for the request payload | multipart/form-data |
| appId | Mandatory | The application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab | This should be a unique value |
| appKey | Mandatory | The application key shared by HyperVerge. You can find the details in the dashboard's credentials tab | This should be a unique value |
| transactionId | Mandatory | Unique ID for the customer journey | Any defined unique value mapped to a transaction in your business ecosystem |
Inputs
The following table provides the details of the parameters required for the Consumer Durables Invoice OCR API's request body:
| Parameter | Mandatory / Optional | Type | Description | Input Format | Default Value |
|---|---|---|---|---|---|
image | Mandatory | file | The input image containing the consumer durable invoice for OCR extraction | Image file (JPEG, JPG, PNG, TIF, TIFF) or PDF | Not Applicable |
- If multiple images are sent to the server in the same call, only one of the images will be read. Hence it is advisable to only send one image per call.
- If the PDF file has multiple pages, only the first page will be considered for the OCR extraction.
Request
The following code snippet demonstrates a standard curl request for the Consumer Durables Invoice OCR API:
curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/readConsumerDurableInvoice' \
--header 'appid: <Enter_the_appId-Shared-by-HyperVerge>' \
--header 'appkey: <Enter_the_appKey-shared-by-HyperVerge>' \
--header 'transactionId : <Enter_the_Transaction_ID>' \
--form 'image=@"<path_to_image_file>"'
Document Sample
The following is a Consumer Durable invoice:

Success Response
The following code snippet demonstrates a success response from the Consumer Durables Invoice OCR API:
{
"status": "success",
"statusCode": "200",
"result": {
"details": [
{
"fieldsExtracted": {
"invoiceNumber": {
"value": "<Invoice_Number>"
},
"invoiceDate": {
"value": "<Invoice_Date_in_DD/MM/YYYY_Format>"
},
"dealerName": {
"value": "<Dealer_Name>"
},
"GSTINNumber": {
"value": "<GSTIN_Number>"
},
"customerName": {
"value": "<Customer_Name>"
},
"customerAddress": {
"value": "<Customer_Address>"
},
"customerPhoneNumber": {
"value": "<Customer_Phone_Number>"
},
"invoiceAmount": {
"value": "<Invoice_Amount_in_INR>"
},
"assetDetails": {
"value": [
{
"brand": "<Brand>",
"category": "<Category>",
"modelNumber": "<Model_Number>",
"assetCost": "<Asset_Cost_in_INR>",
"cgstAmount": "<CGST_Amount>",
"sgstAmount": "<SGST_Amount>",
"IMEIOrSerialNumber": "<IMEI_or_Serial_Number>"
}
]
},
"dealerAddress": {
"value": "<Dealer_Address>"
}
},
"type": "<Document_Type>"
}
]
},
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
Success Response Details
The following table outlines the details of the success response from the Consumer Durables Invoice OCR API:
| Parameter | Type | Description |
|---|---|---|
status | string | The status of the request |
statusCode | integer | The HTTP status code returned for the request |
result | object | Contains the extracted details from the CDI document |
details | array | Contains the extracted fields with their values and confidence scores |
fieldsExtracted | object | Contains all the extracted invoice fields and their values |
invoiceNumber | object | The invoice number extracted from the document |
invoiceDate | object | The invoice date extracted from the document |
dealerName | object | The name of the dealer extracted from the document |
dealerAddress | object | The address of the dealer extracted from the document |
GSTINNumber | object | The GSTIN number extracted from the document |
customerName | object | The name of the customer extracted from the document |
customerAddress | object | The address of the customer extracted from the document |
customerPhoneNumber | object | The phone number of the customer extracted from the document |
invoiceAmount | object | The invoice amount extracted from the document |
assetDetails | object | An array containing asset details including brand, category, model number, cost, and tax information |
type | string | The type of document processed |
metaData | object | Contains request and transaction identifiers |
requestId | string | A unique identifier for the request |
transactionId | string | A unique identifier for the transaction |
Failure Response
The following code snippet demonstrates a failure response from the Consumer Durables Invoice OCR API:
{
"status": "failure",
"statusCode": 400,
"error": "API call requires one input image"
}
Error Responses
The following are some error responses from the Consumer Durables Invoice OCR API:
- No Image Input
- Image Size Exceeds Limit of 6MB
- Document Not Detected
{
"status": "failure",
"statusCode": 400,
"error": "API call requires one input image"
}
{
"status": "failure",
"statusCode": 400,
"error": "Image size cannot be greater than 6MB"
}
{
"status": "failure",
"statusCode": 422,
"error": "Document Not Detected"
}
Error Response Details
A failure or error response contains a failure status with a relevant status code and error message.
The following table lists all error responses:
| Status Code | Error Message | Error Description | Error Resolution |
|---|---|---|---|
| 400 | API call requires one input image | The request does not include an input image, which is mandatory for processing. | Ensure the request includes the image parameter with a valid image or PDF file |
| 400 | Image size cannot be greater than 6MB | The provided image exceeds the maximum allowed size of 6MB. | Reduce the image file size to 6MB or less before submitting the request |
| 401 | Missing/Invalid credentials | The request is either missing the mandatory appId and appKey combination or has invalid values | Provide valid appId and appKey credentials in the request |
| 422 | Document Not Detected | The system was unable to detect any document in the provided image. | Ensure the image contains a clear and visible Consumer Durables Invoice document, or contact the HyperVerge team if the issue persists |