Document checks
Overview
The endpoint POST api/v1/documents
allows you to perform verification and fraud analysis of submitted documents. You can upload one or more documents along with optional reference data (e.g., name, date of birth, address, face scan).
This endpoint extracts personal data from the documents and compares it against the provided reference information. If multiple documents are uploaded, it verifies consistency of personal information across all documents.
Request Format
interface DocumentVerificationRequest {
// Required - Array of files to analyse (PNG, JPEG, or PDF)
documents: File[];
// Optional - Reference data for cross-validation
face_scan_image?: File;
full_name?: string;
address_lines?: string;
date_of_birth?: string;
}
Response Format
Once the documents have been analysed (this will take approx. ~10 seconds), you will receive a response in the following JSON format:
{
"processed_at": "string",
"cross_document_check": {
"full_name": {
"detected_values": [
{
"detected_value": "string",
"match_confidence": number, // float between 0 and 1, e.g. 0.95
"block_id": "string"
}
],
"match_confidence": number
},
"address_lines": {
"detected_values": [
{
"detected_value": "string",
"match_confidence": number,
"block_id": "string"
}
],
"match_confidence": number
},
"date_of_birth": {
"detected_values": [
{
"detected_value": "string",
"match_confidence": number,
"block_id": "string"
}
],
"match_confidence": number
},
"doc_face_comparison": {
"detected_values": [
{
"detected_value": "string",
"match_confidence": number,
"block_id": "string"
}
],
"match_confidence": number
}
},
"documents": [
{
"block_id": "string",
"document_category": {
"expected": "BIRTH_CERTIFICATE" | "EDUCATION_CERTIFICATE" | "MARRIAGE_CERTIFICATE" | "OLDER_PERSON_BUS_PASS" | "FREEDOM_PASS" | "BANK_STATEMENT" | "UTILITY_BILL" | "UNIVERSAL_CREDIT"
"detection_confidence": 0,
"detected": "BIRTH_CERTIFICATE" | "EDUCATION_CERTIFICATE" | "MARRIAGE_CERTIFICATE" | "OLDER_PERSON_BUS_PASS" | "FREEDOM_PASS" | "BANK_STATEMENT" | "UTILITY_BILL" | "UNIVERSAL_CREDIT"
},
"extracted": {
"raw_text": {
"detected_value": "string",
"detection_confidence": number,
"expected_value": "string",
"match_confidence": number
},
"full_name": {
"detected_value": "string",
"detection_confidence": number,
"expected_value": "string",
"match_confidence": number
},
"date_of_birth": {
"detected_value": "string",
"detection_confidence": number,
"expected_value": "string",
"match_confidence": number
},
"date_of_letter": {
"detected_value": "string",
"detection_confidence": number,
"expected_value": "string",
"match_confidence": number
},
"address_lines": {
"detected_value": "string",
"detection_confidence": number,
"expected_value": "string",
"match_confidence": number
},
"doc_face_comparison": {
"match_confidence": number
}
}
}
]
}
Coming soon
You will soon be able to perform fraud checks on documents to detect any signs of tampering.
Expected response:
{
processed_at: "string",
documents: [
...
],
integrity_check: {
summary: {
risk_level: "LOW",
total_checks_performed: 5,
checks_failed: 0,
checks_passed: 5,
},
checks: {
metadata: {
timestamp_analysis: {
manipulation_detected: false,
details: {
creation_date: "2025-01-26T19:12:02.479Z",
modification_date: null,
},
},
version_history: {
manipulation_detected: false,
details: {
version_count: 1,
},
},
},
security: {
digital_signature: {
manipulation_detected: false,
details: {
original_signed: true,
current_signed: true,
removal_timestamp: null,
},
},
document_protection: {
manipulation_detected: false,
details: {
protection_level: "RESTRICTED_EDITING",
protection_removed: false,
},
},
},
pdf: {
text_modifications: {
manipulation_detected: false,
details: {
overlay_detected: false,
modified_text_regions: [],
},
},
},
},
},
}