API SuiteDocument OCR (ML)
PAN OCR
Extract structured fields from a PAN card image. Server-side multipart POST with Bearer auth.
API reference
Try itLoading playground…
Loading…
AuthorizationBearer <token>
JWT Bearer token authentication. Obtain a token from the KwikID dashboard.
In: header
filestring
flags?string
Optional JSON string. Keys: CARD_ORIENT (0/1) corrects orientation; CARD_CROP (0/1) runs document crop before OCR.
unique_id?string
Optional correlation id for logs.
Response Body
curl -X POST "https://__mock__/ocr/pan" \ -F file="string"{
"DOB": "string",
"father_name": "string",
"name": "string",
"pan_number": "string"
}{
"detail": {
"<location>": {
"<field_name>": [
"string"
]
}
},
"message": "string"
}{
"detail": {},
"message": "string"
}Overview
Call POST /ocr/pan with Authorization: Bearer <token> and multipart/form-data containing file (PAN image). Optional flags and unique_id follow OpenAPI. Parse OCR JSON in your backend and never trust raw text without validation rules.
Key features
- Fast capture: Turns a PAN photo into typed fields for forms.
- Pairs with verification: Compare OCR output against Authenticate results.
Implementation
Step 1: Call from your backend
POST /ocr/pan HTTP/1.1
Host: <machine-learning-api-base-url>
Authorization: Bearer <token>
Content-Type: multipart/form-data; boundary=----boundaryAttach file as the scanned image.
Error handling
| HTTP status | When |
|---|---|
| 400 | Unreadable image. |
| 401 | Invalid token. |
Benefits
- Cuts manual PAN typing in mobile onboarding.