Feel free to reach techsupport@surepass.io for any technical support or guidance.
use_pdf flag, accommodating a wide range of document input formatsAuthorization header as Bearer TOKEN.https://sandbox.surepass.apphttps://kyc-api.surepass.app| Header | Required | Description |
|---|---|---|
Authorization | Yes | JWT Bearer token. Format: Bearer <YOUR_JWT_TOKEN>. Use the sandbox token for sandbox and the production token for production. |
Content-Type | Yes | Must be set to multipart/form-data. This is required because the request includes a file upload alongside form fields. |
multipart/form-data request body containing both a file upload and an optional form field.| Parameter | Type | Required | Description |
|---|---|---|---|
file | file | Yes | The PAN card document to be processed. Supported formats include common image types and PDF (when use_pdf is true). |
use_pdf | Boolean | Optional | Set to "true" to indicate that the uploaded file is a PDF document. If omitted or set to "false", the file is treated as an image. |
| Parameter | Type | Description |
|---|---|---|
data | object | Contains the OCR result payload for this request. |
data.client_id | string | A server-generated unique session identifier for this OCR request. Can be used for support queries or audit logging. |
data.ocr_fields | array | List of extracted OCR result objects. Each element represents one detected PAN card in the submitted document. |
data.ocr_fields[].document_type | string | The type of document detected. Returns "pan" for PAN cards. |
data.ocr_fields[].pan_number | object | Extracted PAN number field. |
data.ocr_fields[].pan_number.value | string | The extracted PAN number string (e.g., "AAACK1234W"). |
data.ocr_fields[].pan_number.confidence | number | Confidence score for the PAN number extraction, between 0 and 1. Higher values indicate greater certainty. |
data.ocr_fields[].full_name | object | Extracted full name of the PAN card holder. |
data.ocr_fields[].full_name.value | string | The extracted full name as it appears on the PAN card. |
data.ocr_fields[].full_name.confidence | number | Confidence score for the full name extraction, between 0 and 1. |
data.ocr_fields[].father_name | object | Extracted father's name of the PAN card holder. |
data.ocr_fields[].father_name.value | string | The extracted father's name as it appears on the PAN card. |
data.ocr_fields[].father_name.confidence | number | Confidence score for the father's name extraction, between 0 and 1. |
data.ocr_fields[].dob | object | Extracted date of birth of the PAN card holder. |
data.ocr_fields[].dob.value | string | The extracted date of birth in YYYY-MM-DD format. |
data.ocr_fields[].dob.confidence | number | Confidence score for the date of birth extraction, between 0 and 1. |
data.ocr_fields[].dob.yob | boolean | Indicates whether only the year of birth (rather than the full date) is printed on the PAN card. false means the full date of birth was available and extracted. |
status_code | integer | HTTP-equivalent numeric status code. 200 indicates successful OCR processing. |
success | boolean | Top-level flag indicating whether the request was processed successfully. true on success. |
message | string | Human-readable status message. Returns "Success" on successful processing. |
message_code | string | Machine-readable message identifier for programmatic response handling. Returns "success" on success. |
{
"data": {
"client_id": "ocr_pan_advanced_rbuveglhYUiyyMyuzLTR",
"ocr_fields": [
{
"document_type": "pan",
"pan_number": {
"value": "AAAPK1234W",
"confidence": 0.99
},
"full_name": {
"value": "Akku Yadav",
"confidence": 0.98
},
"father_name": {
"value": "NEERAJ",
"confidence": 0.98
},
"dob": {
"value": "1998-01-10",
"confidence": 0.99,
"yob": false
}
}
]
},
"status_code": 200,
"success": true,
"message": "Success",
"message_code": "success"
}{
"data": null,
"status_code": 401,
"success": false,
"message": "Unauthorized",
"message_code": "unauthorized"
}Authorization header is missing, malformed, or the JWT token is expired or invalid. Verify that a valid Bearer token for the correct environment (sandbox or production) is included in the request.confidence scores to decide whether to auto-populate form fields or flag them for manual review — a threshold of 0.90 or above is a reasonable starting point for auto-filldob.yob before displaying or validating the date of birth: if true, only the year is available and downstream date-of-birth validation logic should be adjusted accordinglycurl --location 'https://kyc-api.surepass.app/api/v1/ocr/pan-advanced' \
--header 'Authorization: Bearer <token>' \
--form 'file=@""' \
--form 'use_pdf=""'{
"data": {
"client_id": "ocr_pan_advanced_rbuveglhYUiyyMyuzLTR",
"ocr_fields": [
{
"document_type": "pan",
"pan_number": {
"value": "AAAPK1234W",
"confidence": 0.99
},
"full_name": {
"value": "Akku Yadav",
"confidence": 0.98
},
"father_name": {
"value": "NEERAJ",
"confidence": 0.98
},
"dob": {
"value": "1998-01-10",
"confidence": 0.99,
"yob": false
}
}
]
},
"status_code": 200,
"success": true,
"message": "Success",
"message_code": "success"
}