Bank Cheque Book OCR API
EXTRACT TEXT FROM BANK CHEQUE BOOK IMAGES
Description
This API can extract and parse the text from an input Bank cheque book document image and return the information in JSON format. CTS-2010 format cheques from all major Indian banks are supported.

API Details
Request
Type | URL |
---|---|
Post | https://api.attestr.com/api/{version}/public/xtract |
Request Body Parameters
Type | Name | Description | Optional (Default) | Min Version | Max Version |
---|---|---|---|---|---|
String | src | Input image media Id of the front side of the document. To generate a media Id, refer to Image Media Upload | Required | v1 | |
String | additional | Optional. Media Id for the back side image of the document. | Optional | v1 | |
String | type | Document type. Use value as BANK_CHEQUE for bank passbook. | Required | v1 |
Request Header Parameters
Type | Name | Value / Description | Optional (Default) | Min Version | Max Version |
---|---|---|---|---|---|
String | Content-Type | application/json | Required | v1 | |
String | Authorization | Basic {authToken} | Required | v1 |
If you do not have the authentication token, please refer to Register App to generate one.
Sample Request
{
"src":"MX1AloEdDOB7Xgc00d",
"additional":"MX1AloGHE4B7Xgc89h",
"type":"BANK_CHEQUE"
}
Response
Http Status Code 200
Please note that the valid key decides the availability of rest of the keys in the response. If provided PAN image is invalid or low quality, then all keys except valid and message are omitted. If true, remaining keys will have appropriate data.
Key | Description | Type | Min Version | Max Version |
---|---|---|---|---|
valid | True | false if the provided document image is a valid readable document with decent quality | Boolean | v1 | |
message | Message string if the input media image is invalid or of not enough good quality to be read by OCR model | String | v1 | |
data | BankChequebook data object as described below. | Object | v1 |
Bank Cheque Data Object
Key | Description | Type | Min Version | Max Version |
---|---|---|---|---|
signatory | Name of the signatory if available | String | v1 | |
accountNumber | Account number as registered with the bank. | String | v1 | |
bank | Name of the issuing bank | String | v1 | |
branch | Issuing bank branch | String | v1 | |
ifsc | IFSC code of the branch. | String | v1 | |
code | The unique code assigned to each bank. | String | v1 | |
issued | Date on which cheque is issued, if available | Date | v1 | |
issuedTo | Beneficiary name if available | String | v1 |
Sample Response
Sample response for valid document.
{
"valid": true,
"message": null,
"data": {
"signatory": "Gitanjali Raheja",
"accountNumber": "12341231234123",
"bank": "ICICI Bank",
"branch": "BANGALORE - KORAMANGALA",
"code": "ICIC",
"ifsc": "ICIC0000047",
"issued": null,
"issuedTo": null
}
}
Sample response for invalid document image
{
"valid": false,
"message": "Invalid / low quality image"
}
Error Response
Parameter | Type | Description |
---|---|---|
code | Number | Unique error codes for different errors. Always available. |
message | String | Error message describing the error. Always Available. |
details | String | Detail error message. Available only for certain types of errors. |
Error Codes
HTTP Status | Error Code | Error Message |
---|---|---|
400 | 4001 | Malformed data or missing required parameter values |
400 | 4005 | Operation could not be performed due to low credits balance |
401 | 4016 | Invalid client authorization |
403 | 4031 | Unauthorized access |
403 | 4035 | Requested service is not provisioned for your account |
403 | 4039 | Client's IP address is not whitelisted |
403 | 4035 | Requested service is not provisioned for your account |
429 | 4291 | Maximum account rate limit exceeded |
429 | 4292 | Maximum API rate limit exceeded |
429 | 4293 | Maximum account daily limit exceeded |
429 | 4294 | Maximum API daily limit exceeded |
500 | 5001 | Request could not be processed |
Sample Error Response
{
"code": 4001,
"message": "Malformed data or missing required parameter values"
}
Constraints
- Only JPEG, PNG images are supported.
- Minimum image size is 200x200 png for better identification and parsing.
- Maximum allowed image size is 10 MB.