Document Verification
Compliance Screening
Document Verification
POST
Document Verification
Extract and verify data from identity documents, proof of address, company charters, and bank ownership documents using AI-powered document processing.
Overview
The document verification endpoints use AI (LLM) to extract structured data from uploaded document images. Supported document types:- ID Documents: Passports, national IDs, driver’s licenses
- Proof of Address: Utility bills, bank statements, government letters
- Company Charters: Corporate registration documents
- Bank Ownership: Bank account ownership verification documents
Endpoints
| Document Type | Endpoint | Description |
|---|---|---|
| ID Document | POST /kyc/documents/id | Extract data from ID documents |
| Proof of Address | POST /kyc/documents/proof-of-address | Extract data from address proof documents |
| Company Charter | POST /kyc/documents/company-charter | Extract data from company charter documents |
| Bank Ownership | POST /kyc/documents/bank-ownership | Extract data from bank ownership documents |
Authentication
Requireskyc:create permission. Include your Bearer token in the Authorization header.
Request Body Parameters
Supported Image Formats
- JPEG (
image/jpeg) - PNG (
image/png) - PDF (
application/pdf)
Request Example
ID Document
Proof of Address
Response Format
Success Response - ID Document
Success Response - Proof of Address
Success Response - Company Charter
Success Response - Bank Ownership
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Always "success" when extraction completes |
verification_id | string | Unique identifier for this verification |
document_type | string | Type of document processed |
extracted_data | object | Extracted structured data (varies by document type) |
confidence_scores | object | Confidence scores for extracted fields |
processing_time_ms | integer | Total processing time in milliseconds |
timestamp | string | ISO 8601 timestamp of the extraction |
Extracted Data Fields
ID Document Fields
| Field | Type | Description |
|---|---|---|
full_name | string | Full name from document |
document_number | string | Document ID number |
document_type | string | Type of ID (Passport, Driver’s License, etc.) |
nationality | string | Nationality/country code |
date_of_birth | string | Date of birth (YYYY-MM-DD) |
expiry_date | string | Expiry date (YYYY-MM-DD) |
issue_date | string | Issue date (YYYY-MM-DD) |
issuing_authority | string | Authority that issued the document |
Proof of Address Fields
| Field | Type | Description |
|---|---|---|
address | string | Full address |
city | string | City name |
state | string | State/province |
postal_code | string | Postal/ZIP code |
country | string | Country code |
document_date | string | Date on document (YYYY-MM-DD) |
utility_type | string | Type of utility (if applicable) |
account_holder_name | string | Name on the account |
Company Charter Fields
| Field | Type | Description |
|---|---|---|
company_name | string | Registered company name |
registration_number | string | Company registration number |
incorporation_date | string | Date of incorporation (YYYY-MM-DD) |
registered_address | string | Registered business address |
city | string | City |
state | string | State/province |
country | string | Country code |
legal_form | string | Legal form (Corporation, LLC, etc.) |
authorized_capital | string | Authorized capital amount |
directors | array | Array of director objects |
Bank Ownership Fields
| Field | Type | Description |
|---|---|---|
account_holder_name | string | Name on the account |
account_number | string | Account number (may be masked) |
bank_name | string | Bank name |
account_type | string | Type of account (Checking, Savings, etc.) |
routing_number | string | Bank routing number |
statement_date | string | Statement date (YYYY-MM-DD) |
address | string | Address associated with account |
Error Responses
400 Bad Request - Invalid Image Format
400 Bad Request - Missing Images
400 Bad Request - Invalid Base64
500 Internal Server Error - Processing Failed
Status Codes
| Code | Description |
|---|---|
| 200 | Success - Document processed and data extracted |
| 400 | Bad Request - Invalid parameters or image format |
| 401 | Unauthorized - Missing or invalid token |
| 403 | Forbidden - Insufficient permissions |
| 500 | Internal Server Error |
Usage Examples
Python Example
JavaScript Example
Best Practices
- Image Quality: Use high-quality images (minimum 300 DPI) for best results
- File Size: Keep images under 10MB for optimal performance
- Multiple Pages: For multi-page documents (PDFs), include all pages in the images array
- Confidence Scores: Review confidence scores before using extracted data
- Manual Verification: Always verify extracted data manually for critical operations
- Error Handling: Implement proper error handling for processing failures
Performance
- Typical Response Time: 2-5 seconds per document
- Rate Limits: Subject to API rate limiting (1,000 requests per 5 minutes)
- File Size Limits: Maximum 10MB per image
- Concurrent Processing: Process multiple documents in separate requests
LLM Provider Options
AWS Bedrock (Default)
- Provider:
"bedrock"(default) - Model: Uses default Bedrock model
- Use Case: Production deployments on AWS
OpenAI
- Provider:
"openai" - Model: Specify model (e.g.,
"gpt-4o") - Use Case: High-precision extraction, specific model requirements
Integration Tips
- Pre-processing: Ensure images are properly oriented and well-lit
- Batch Processing: Process multiple documents in separate requests
- Caching: Consider caching verification IDs for reference
- Validation: Validate extracted data against business rules before use