Document Validation
Validate document quality, detect document type, and check readability
Overview
The Document Validation API performs comprehensive validation of document images to ensure they meet quality standards for verification workflows. It automatically detects document types, checks readability, identifies faces, determines document sides, and detects whether documents are scanned or original.Key Features
- Automatic Document Type Detection: Identifies PAN, Aadhaar, Passport, Driving License, Voter ID, and RC
- Quality Assessment: Evaluates document readability with confidence scores (0-100)
- Face Detection: Detects presence of faces in documents with photos
- Side Detection: Identifies front, back, or both sides of documents
- Scan Detection: Determines if document is scanned copy or original photo
- Real-time Processing: Typical processing time of 2-5 seconds
Supported Document Types
| Document Type | Code | Description |
|---|---|---|
| PAN Card | ind_pan | Indian PAN Card |
| Aadhaar Card | ind_aadhaar | Indian Aadhaar Card (front/back) |
| Voter ID | ind_voter_id | Indian Voter ID (EPIC) |
| Driving License | ind_driving_license | Indian Driving License |
| Passport | ind_passport | Indian Passport |
| RC | ind_rc | Vehicle Registration Certificate |
Technical Specifications
- Maximum File Size: 3MB
- Supported Formats: JPG, PNG, PDF
- Request Timeout: 50 seconds
Required Information
- document_url: Publicly accessible URL of the document (required)
- doc_type: Expected document type (optional, improves accuracy)
- detect_face: Enable face detection (default: true)
- detect_doc_side: Enable side detection (default: true)
- check_scan: Enable scan detection (default: true)
Response Fields
Core Validation Results
| Field | Type | Description |
|---|---|---|
detected_doc_type | string | Auto-detected document type or “not_detected” |
is_readable | boolean | Whether document is readable and of sufficient quality |
readability_confidence | integer | Quality score (0-100) |
face_detected | boolean | Whether a face was found in the document |
is_scanned | boolean | Whether document appears to be a scanned copy |
detected_doc_side | string | Document side: “front”, “back”, or “both” (if enabled) |
Readability Confidence Scores
- 81-100: Excellent quality - ideal for processing
- 61-80: Acceptable quality - suitable for most use cases
- 31-60: Poor quality - may have issues with OCR/verification
- 0-30: Very poor quality - not recommended for processing
Authorizations
API key issued by KonnectNXT. Pass as Authorization: Bearer <your_api_key>.
Body
Publicly accessible URL of the document image to validate. Must use HTTP or HTTPS protocol. Document should not exceed 3MB.
2048^https?://.+"https://example.com/documents/pan_card.jpg"
Expected document type (optional). When provided, improves accuracy of validation. If omitted, system will auto-detect document type.
ind_pan, ind_aadhaar, ind_voter_id, ind_driving_license, ind_passport "ind_pan"
Enable face detection in the document. Useful for documents that typically contain photos (Aadhaar, Passport, DL).
true
Enable document side detection (front/back/both). Helps identify which side of a two-sided document is provided.
true
Enable scan detection to determine if document is a scanned copy. Useful for distinguishing between original photos and scanned documents.
true
Response
Document validation successful
Overall status of the API
success, error HTTP status code
400
Description of the response or error
"Invalid request parameters"
Number of credits consumed for this operation
x >= 05
Remaining credits in user account after this operation
x >= 095

