The Document Validation Object
Overview
The Document Validation object represents the process of verifying documents within your Verifik projects. This object contains all the information needed to track and manage document verification requests, including document scanning, OCR processing, and validation results.
Attributes
appRegistration
Type: ObjectId
Required: No
Reference to the AppRegistration object associated with this document validation.
client
Type: ObjectId
Required: No
Reference to the Client object associated with this document validation.
project
Type: ObjectId
Required: No
Reference to the Project object associated with this document validation.
projectFlow
Type: ObjectId
Required: No
Reference to the ProjectFlow object associated with this document validation.
status
Type: String
Required: Yes
The current status of the document validation process. Can be:
"new"- Validation request created but not yet processed (default)"pending"- Document is being processed"completed"- Document validation completed successfully"failed"- Document validation failed"expired"- Validation session has expired
documentType
Type: String
Required: Yes
The type of document being validated:
"id"- National ID card"passport"- Passport"driver_license"- Driver's license"other"- Other document type
country
Type: String
Required: Yes
The country code where the document was issued (e.g., "US", "CO", "MX").
documentData
Type: Object
Required: No
Contains the extracted document data:
firstName- First name from documentlastName- Last name from documentmiddleName- Middle name from documentdocumentNumber- Document numberbirthDate- Birth dateexpirationDate- Document expiration dateissueDate- Document issue dategender- Gendernationality- Nationality
ocrResults
Type: Object
Required: No
Contains OCR processing results:
confidence- OCR confidence scorerawText- Raw extracted textfields- Structured field extraction results
validationResults
Type: Object
Required: No
Contains validation results:
documentAuthenticity- Document authenticity check resultdataConsistency- Data consistency check resultlivenessDetection- Liveness detection resultantiSpoofing- Anti-spoofing detection result
images
Type: Object
Required: No
Contains document images:
frontImage- Front side image (base64)backImage- Back side image (base64)selfieImage- Selfie image for comparison
riskScore
Type: Number
Required: No
Risk assessment score for the validation.
age
Type: String
Required: No
Calculated age from birth date.
backUrl
Type: String
Required: No
URL to redirect back to after validation.
frontUrl
Type: String
Required: No
URL to redirect to front after validation.
createdAt
Type: Date
Required: Yes
Timestamp when the document validation was created.
updatedAt
Type: Date
Required: Yes
Timestamp when the document validation was last updated.
completedAt
Type: Date
Required: No
Timestamp when the document validation was completed successfully.
Example Object
Example Object
{
"_id": "document_validation_123456789",
"appRegistration": "reg_123456789",
"client": "client_123456789",
"project": "project_123456789",
"projectFlow": "flow_123456789",
"status": "completed",
"documentType": "id",
"country": "US",
"documentData": {
"firstName": "John",
"lastName": "Doe",
"middleName": "Michael",
"documentNumber": "123456789",
"birthDate": "1990-01-15",
"expirationDate": "2030-01-15",
"issueDate": "2020-01-15",
"gender": "M",
"nationality": "US"
},
"ocrResults": {
"confidence": 0.95,
"rawText": "US DRIVER LICENSE...",
"fields": {
"firstName": "John",
"lastName": "Doe"
}
},
"validationResults": {
"documentAuthenticity": "passed",
"dataConsistency": "passed",
"livenessDetection": "passed",
"antiSpoofing": "passed"
},
"images": {
"frontImage": "base64_encoded_front_image",
"backImage": "base64_encoded_back_image",
"selfieImage": "base64_encoded_selfie_image"
},
"riskScore": 0.05,
"age": "34",
"backUrl": "https://example.com/back",
"frontUrl": "https://example.com/front",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:32:00Z",
"completedAt": "2024-01-15T10:32:00Z"
}
}
### Features
- **Unique Identification**: Each validation has a unique ID for reference
- **Multiple States**: Support for different validation process states
- **Document Types**: Support for IDs, passports, driver's licenses, and others
- **Extracted Data**: Complete information extracted from the document
- **OCR Processing**: Optical character recognition results
- **Validation Results**: Authenticity and consistency verification
- **Images**: Front, back, and selfie images in base64
- **Risk Assessment**: Risk score for the validation
- **Complete Timestamps**: Record of creation, update, and completion
- **Context Information**: Client, project, and project flow data