Bank Passbook OCR API
EXTRACT TEXT FROM INDIAN BANK PASSBOOK DOCUMENT IMAGE
Description
This API can extract and parse the text from an input Indian Bank passbook document image and return the information in JSON format. Computer printed passbooks from all the banks are supported. Old and handwritten passbooks are not 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_PASSBOOK 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_PASSBOOK"
}
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 | BankPassbook data object as described below. | Object | v1 |
Bank Passbook Data Object
Key | Description | Type | Min Version | Max Version |
---|---|---|---|---|
customerId | Customer registration number if available. | String | v1 | |
name | Name of the individual as shown in the document | String | v1 | |
accountNumber | Account number as registered with the bank. | String | v1 | |
address | Address of the account holder if available. | String | v1 | |
branch | Name of the bank branch. | String | v1 | |
ifsc | IFSC code of the branch. | String | v1 | |
micr | MICR code of the branch. | String | v1 | |
branchAddress | Address of the branch if available. | String | v1 | |
opened | Date on which account was opened. Can be in different formats depending on the bank. | Date | v1 |
Sample Response
Sample response for valid document.
{
"valid": true,
"message": null,
"data": {
"customerId": "1231234123",
"name": "Ms. GITANJALI RAHEJA",
"accountNumber": "20102487476",
"address": "JALANASAR TA KALAWAD",
"branch": "Dilsukhnagar",
"ifsc": "SBIN00012345",
"micr": null,
"branchAddress": "Hyderabad",
"opened": "28-01-2011"
}
}
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.