Feel free to reach techsupport@surepass.io for any technical support or guidance.
Authorization
header as Bearer TOKEN
.https://sandbox.surepass.io
https://kyc-api.surepass.io
Header | Required | Description |
---|---|---|
Authorization | Yes | Bearer token for authentication (JWT format) |
Content-Type | Yes | Must be set to multipart/form-data |
Parameter | Type | Required | Description |
---|---|---|---|
file | Image | Yes | Upload Cheque Image |
use_pdf | Boolean | No | Set to true if the file type is PDF |
# Multipart form data with passport image file
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="passport.jpg"
Content-Type: image/jpeg
Parameter | Type | Description |
---|---|---|
data | Object | Container for the OCR results |
data.client_id | String | Unique identifier for this OCR request |
data.ocr_fields | Array | List of extracted document information |
data.ocr_fields[].type | String | Type of document processed (always "international_passport") |
data.ocr_fields[].details | Object | Extracted passport details |
data.ocr_fields[].details.birth_date | String | Date of birth in YYMMDD format |
data.ocr_fields[].details.birth_date_hash | String | Verification hash for birth date |
data.ocr_fields[].details.country_code | String | 3-letter country code of the issuing country |
data.ocr_fields[].details.country | String | Full name of the issuing country |
data.ocr_fields[].details.document_number | String | Passport number |
data.ocr_fields[].details.document_number_hash | String | Verification hash for document number |
data.ocr_fields[].details.document_type | String | Document type (P for passport) |
data.ocr_fields[].details.expiry_date | String | Expiry date in YYMMDD format |
data.ocr_fields[].details.expiry_date_hash | String | Verification hash for expiry date |
data.ocr_fields[].details.final_hash | String | Final verification hash for the MRZ |
data.ocr_fields[].details.name | String | First/given name of the passport holder |
data.ocr_fields[].details.nationality_code | String | 3-letter nationality code |
data.ocr_fields[].details.nationality | String | Full nationality name (may be null) |
data.ocr_fields[].details.optional_data | String | Optional data from the MRZ |
data.ocr_fields[].details.optional_data_hash | String | Verification hash for optional data |
data.ocr_fields[].details.sex | String | Gender (M/F) |
data.ocr_fields[].details.surname | String | Last/family name of the passport holder |
data.ocr_fields[].details.mrz_line_1 | String | First line of the Machine Readable Zone |
data.ocr_fields[].details.mrz_line_2 | String | Second line of the Machine Readable Zone |
status_code | Integer | HTTP status code of the response |
success | Boolean | Indicates if the request was successful |
message | String | Additional information message (null if successful) |
message_code | String | Code indicating the status of the request |
{
"data": {
"client_id": "ocr_international_passport_qDCvjhnuqvclDIyLSmHR",
"ocr_fields": [
{
"type": "international_passport",
"details": {
"birth_date": "111111",
"birth_date_hash": "2",
"country_code": "SVK",
"country": "Slovakia",
"document_number": "PD000000",
"document_number_hash": "5",
"document_type": "P",
"expiry_date": "150104",
"expiry_date_hash": "3",
"final_hash": "0",
"name": "VZOR",
"nationality_code": "5VK",
"nationality": null,
"optional_data": "",
"optional_data_hash": "0",
"sex": "M",
"surname": "SPECIMEN",
"mrz_line_1": "P<SVKSPECIMEN<<VZOR<<<<<<<<<<<<<<<<<<<<<<<<<",
"mrz_line_2": "PD000000<55VK1111112M1501043<<<<<<<<<<<<<<00"
}
}
]
},
"status_code": 200,
"success": true,
"message": null,
"message_code": "success"
}
{
"error": null,
"message": "Your token is invalid. Please ensure that correct token is being used.",
"status_code": 401,
"success": false,
"message_code": "invalid_token"
}
curl --location --request POST 'https://kyc-api.surepass.app/api/v1/ocr/international-passport' \
--form 'file=@""'
{
"data": {
"client_id": "ocr_international_passport_qDCvjhnuqvclDIyLSmHR",
"ocr_fields": [
{
"type": "international_passport",
"details": {
"birth_date": "111111",
"birth_date_hash": "2",
"country_code": "SVK",
"country": "Slovakia",
"document_number": "PD000000",
"document_number_hash": "5",
"document_type": "P",
"expiry_date": "150104",
"expiry_date_hash": "3",
"final_hash": "0",
"name": "VZOR",
"nationality_code": "5VK",
"nationality": null,
"optional_data": "",
"optional_data_hash": "0",
"sex": "M",
"surname": "SPECIMEN",
"mrz_line_1": "P<SVKSPECIMEN<<VZOR<<<<<<<<<<<<<<<<<<<<<<<<<",
"mrz_line_2": "PD000000<55VK1111112M1501043<<<<<<<<<<<<<<00"
}
}
]
},
"status_code": 200,
"success": true,
"message": null,
"message_code": "success"
}