Motor Insurance OCR API
API Description
Objective
The Motor Insurance OCR API extracts the textual data from an image of a motor insurance document and returns it in a JSON format. It includes:
- Name of the Insured,
- Chassis Number,
- Engine Number,
- Make,
- Model,
- Variant or Sub-Type or Body Type,
- Hypothecated or Lease To or Financier,
- Insured Declared Value(IDV),
- Policy Start Date,
- Policy End Date.
| Input | Output |
|---|---|
| An image or PDF file containing a motor insurance document | The textual information extracted from the document |
API URL
https://ind-engine.thomas.hyperverge.co/v1/readMotorInsurance
Overview
The 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.
Authentication
You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.
API Request Details
Method - POST
Headers
| Parameter | Mandatory or Optional | Type | Description | Valid Values |
|---|---|---|---|---|
| content-type | Mandatory | string | This parameter defines the media type for the request payload. | multipart/form-data |
appId | Mandatory | string | The application ID shared by HyperVerge | Not Applicable - this is a unique value. |
appKey | Mandatory | string | The application key shared by HyperVerge | Not Applicable - this is a unique value. |
transactionId | Mandatory | string | The unique ID for the customer journey. | Not Applicable - this is a unique value related to a transaction in your application. |
Inputs
The following table provides the complete information on the parameters used in the request body for the API call.
| Parameter | Mandatory or Optional | Description |
|---|---|---|
image | Mandatory | The image file containing the motor insurance document. |
- If you send multiple files in the same API request, the OCR extraction will be performed only on one of the files. Kindly send only one file in a request to avoid confusion.
- If the PDF file has multiple pages, only the first page will be considered for the OCR extraction.
Request Sample
The following code shows a standard curl request for the API.
curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/readMotorInsurance' \
--header 'Content-Type: multipart/form-data' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--form 'image=@"<path_to_image_file>"'
Document Sample
The following is a sample motor insurance document.

Success Response
The following is a successful response sample:
{
"status": "success",
"statusCode": 200,
"result": {
"details": {
"policyNumber": {
"value": "POL123456789",
"conf": 0.98
},
"policyHolderName": {
"value": "John Doe",
"conf": 0.95
},
"vehicleNumber": {
"value": "KA01AB1234",
"conf": 0.97
},
"policyStartDate": {
"value": "2023-01-01",
"conf": 0.96
},
"policyEndDate": {
"value": "2024-01-01",
"conf": 0.96
},
"premiumAmount": {
"value": "5000.00",
"conf": 0.95
}
}
},
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
Success Response Details
| 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 motor insurance document |
| details | object | Contains the extracted fields with their values and confidence scores |
| metaData | object | Contains request and transaction identifiers |
Failure Response Sample
When the image is not of a motor insurance document, the JSON output might contain null or random values.
Error Response Sample
The following are the sample error responses for the API.
- Missing Input Image
- Image Size Issue
- Incorrect Document Type
{
"status": "failure",
"statusCode": 400,
"error": "API call requires one input image",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
{
"status": "failure",
"statusCode": 400,
"error": "image size cannot be greater than 6 MB",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
{
"status": "failure",
"statusCode": 422,
"error": "Document Not Detected"
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}
Failure and Error Response Details
A failure or error response from the module 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 |
|---|---|---|
| 400 | No Image input | The request missed the image input. |
| 400 | image size cannot be greater than 6MB | The image size is larger than the allowed limit. |
| 422 | Document Not Detected | The image file in the request is not a valid motor insurance document. |
| 5xx | Internal Server Error | There was an error with HyperVerge's server. Please contact the HyperVerge team. |