Didit Database Validation API
Overview
Verifies personal data and identity documents against trusted government and financial databases. Prevents synthetic identity fraud and ensures identity authenticity.
Key constraints:
- - Requires at least the national ID/document number for the target country
- Coverage: 18 countries (primarily Latin America + Spain)
- Results:
full_match, partial_match, or INLINECODE2 - Only charged per successful query — no charge if insufficient data
Matching methods:
| Method | Description | Starting Price |
|---|
| 1x1 | Single data source validation | $0.05 |
| 2x2 |
Two data sources cross-validation | $0.30 |
API Reference: https://docs.didit.me/standalone-apis/database-validation
Feature Guide: https://docs.didit.me/core-technology/database-validation/overview
Supported Countries: https://docs.didit.me/core-technology/database-validation/database-validation-supported-countries
Authentication
All requests require x-api-key header. Get your key from Didit Business Console → API & Webhooks, or via programmatic registration (see below).
Getting Started (No Account Yet?)
If you don't have a Didit API key, create one in 2 API calls:
- 1. Register:
POST https://apx.didit.me/auth/v2/programmatic/register/ with INLINECODE5 - Check email for a 6-character OTP code
- Verify:
POST https://apx.didit.me/auth/v2/programmatic/verify-email/ with {"email": "you@gmail.com", "code": "A3K9F2"} → response includes INLINECODE8
To add credits: GET /v3/billing/balance/ to check, POST /v3/billing/top-up/ with {"amount_in_dollars": 50} for a Stripe checkout link.
See the didit-verification-management skill for full platform management (workflows, sessions, users, billing).
Endpoint
CODEBLOCK0
Headers
| Header | Value | Required |
|---|
| INLINECODE12 | Your API key | Yes |
| INLINECODE13 |
application/json |
Yes |
Body (JSON)
| Parameter | Type | Required | Description |
|---|
| INLINECODE15 | string | Yes | Universal ID number — auto-maps to correct country field |
| INLINECODE16 |
string | No | First name for matching |
|
last_name | string | No | Last name for matching |
|
date_of_birth | string | No | DOB in
YYYY-MM-DD (required for some countries) |
|
issuing_state | string | No | ISO 3166-1 alpha-3 country code |
|
save_api_request | boolean | No | Save in Business Console |
|
vendor_data | string | No | Your identifier for session tracking |
The id_number field auto-maps to the correct country-specific field:
| Country | Mapped Field | Document | Format |
|---|
| ARG | INLINECODE24 | DNI | — |
| BOL |
document_number | CI | — |
| BRA |
tax_number | CPF | 11 digits |
| CHL |
personal_number | RUT | — |
| COL |
personal_number | Cedula | — |
| CRI |
personal_number | Cedula | — |
| DOM |
personal_number | Cedula | 11 digits |
| ECU |
personal_number | Cedula | 10 digits |
| ESP |
personal_number | DNI/NIE | — |
| GTM |
document_number | DPI | — |
| HND |
document_number | DNI | — |
| MEX |
personal_number | CURP | 18 chars |
| PAN |
document_number | Cedula | — |
| PER |
personal_number | DNI | 8 digits |
| PRY |
document_number | CI | — |
| SLV |
document_number | DUI | — |
| URY |
personal_number | CI | — |
| VEN |
document_number | Cedula | — |
Example
CODEBLOCK1
CODEBLOCK2
Response (200 OK)
CODEBLOCK3
Status Values & Handling
| Status | Meaning | Action |
|---|
| INLINECODE42 | Full match against government records | Identity confirmed |
| INLINECODE43 |
No match found | Identity could not be verified |
|
"In Review" | Partial match or insufficient data | Review screened_data and validations |
Error Responses
| Code | Meaning | Action |
|---|
| INLINECODE45 | Invalid request | Check ID number format for target country |
| INLINECODE46 |
Invalid API key | Verify
x-api-key header |
|
403 | Insufficient credits | Top up at business.didit.me |
Matching Logic
Name Matching
| Result | Criteria |
|---|
| Full Match | Full name concatenation at 85% similarity (Levenshtein), OR First + Last both full match |
| Partial Match |
Any single name component full match |
|
No Match | No component reaches 70% similarity |
Individual name components use 70% Levenshtein threshold. Example: "Christophel" vs "Christopher" = Full Match; "Chris" vs "Christopher" = No Match.
1x1 Decision
| Match Type | Name | ID Number |
|---|
| INLINECODE49 | Full Match | Full Match |
| INLINECODE50 |
Partial Match | Full Match |
|
no_match | All other combinations | — |
2x2 Decision
Requires matching against 2 independent data sources:
| Match Type | Condition |
|---|
| INLINECODE52 | Both sources confirm name + ID |
| INLINECODE53 |
One source confirms |
|
no_match | Neither source confirms |
DOB and ID number matching is exact only — no fuzzy matching.
Warning Tags
| Tag | Description |
|---|
| INLINECODE55 | Missing required data — provide ID number, name, and country |
| INLINECODE56 |
Partial match found — requires investigation |
|
DATABASE_VALIDATION_NO_MATCH | No match found in government records |
When COULD_NOT_PERFORM_DATABASE_VALIDATION fires, session goes to "In Review". Validation auto-retriggers once missing data is provided.
Supported Countries
| Country | Method | Coverage | Required Input |
|---|
| Argentina | 1x1 | 95% | Document number |
| Bolivia |
1x1 | 95% | Document number + DOB |
| Brazil | 1x1 | 95% | Tax number (CPF) |
| Chile | 1x1 | 95% | Personal number (RUT) |
| Colombia | 1x1 | 95% | Document number + type |
| Costa Rica | 1x1 | 95% | Personal number |
| Dominican Republic | 1x1 | 95% | Personal number |
| Ecuador | 1x1 / 2x2 | 90-96% | Personal number |
| El Salvador | 1x1 | 95% | Document number + DOB |
| Guatemala | 1x1 | 95% | Document number |
| Honduras | 1x1 | 95% | Document number |
| Mexico | 1x1 | 95% | Personal number (CURP) |
| Panama | 1x1 | 95% | Document number + DOB |
| Paraguay | 1x1 | 95% | Document number |
| Peru | 1x1 / 2x2 | 95-99% | Personal number |
| Spain | 1x1 | 95% | Personal number + doc type + expiry |
| Uruguay | 1x1 | 95% | Personal number + DOB |
| Venezuela | 1x1 | 95% | Document number |
Utility Scripts
validate_database.py: Validate identity against government databases from the command line.
CODEBLOCK4
Didit 数据库验证 API
概述
根据可信的政府和金融数据库验证个人数据和身份证件。防止合成身份欺诈,确保身份真实性。
关键限制:
- - 至少需要目标国家的国民身份证/证件号码
- 覆盖范围:18个国家(主要为拉丁美洲 + 西班牙)
- 结果:fullmatch(完全匹配)、partialmatch(部分匹配)或 no_match(不匹配)
- 仅按成功查询收费 — 数据不足时不收费
匹配方法:
两个数据源交叉验证 | $0.30 |
API 参考: https://docs.didit.me/standalone-apis/database-validation
功能指南: https://docs.didit.me/core-technology/database-validation/overview
支持的国家: https://docs.didit.me/core-technology/database-validation/database-validation-supported-countries
身份验证
所有请求都需要 x-api-key 标头。从 Didit 业务控制台 → API 和 Webhooks 获取您的密钥,或通过编程方式注册(见下文)。
快速入门(还没有账户?)
如果您没有 Didit API 密钥,可通过 2 次 API 调用创建一个:
- 1. 注册: POST https://apx.didit.me/auth/v2/programmatic/register/,附带 {email: you@gmail.com, password: MyStr0ng!Pass}
- 检查电子邮件 获取 6 字符 OTP 验证码
- 验证: POST https://apx.didit.me/auth/v2/programmatic/verify-email/,附带 {email: you@gmail.com, code: A3K9F2} → 响应中包含 api_key
添加积分: GET /v3/billing/balance/ 检查余额,POST /v3/billing/top-up/ 附带 {amountindollars: 50} 获取 Stripe 结账链接。
有关完整平台管理(工作流、会话、用户、计费),请参阅 didit-verification-management 技能。
端点
POST https://verification.didit.me/v3/database-validation/
标头
| 标头 | 值 | 必需 |
|---|
| x-api-key | 您的 API 密钥 | 是 |
| Content-Type |
application/json |
是 |
请求体(JSON)
| 参数 | 类型 | 必需 | 描述 |
|---|
| idnumber | 字符串 | 是 | 通用身份证号码 — 自动映射到正确的国家字段 |
| firstname |
字符串 | 否 | 用于匹配的名字 |
| last_name | 字符串 | 否 | 用于匹配的姓氏 |
| date
ofbirth | 字符串 | 否 | 出生日期,格式为 YYYY-MM-DD(某些国家必需) |
| issuing_state | 字符串 | 否 | ISO 3166-1 alpha-3 国家代码 |
| save
apirequest | 布尔值 | 否 | 保存在业务控制台中 |
| vendor_data | 字符串 | 否 | 用于会话跟踪的标识符 |
id_number 字段自动映射到正确的国家特定字段:
| 国家 | 映射字段 | 证件 | 格式 |
|---|
| ARG | documentnumber | DNI | — |
| BOL |
documentnumber | CI | — |
| BRA | tax_number | CPF | 11 位数字 |
| CHL | personal_number | RUT | — |
| COL | personal_number | 身份证 | — |
| CRI | personal_number | 身份证 | — |
| DOM | personal_number | 身份证 | 11 位数字 |
| ECU | personal_number | 身份证 | 10 位数字 |
| ESP | personal_number | DNI/NIE | — |
| GTM | document_number | DPI | — |
| HND | document_number | DNI | — |
| MEX | personal_number | CURP | 18 个字符 |
| PAN | document_number | 身份证 | — |
| PER | personal_number | DNI | 8 位数字 |
| PRY | document_number | CI | — |
| SLV | document_number | DUI | — |
| URY | personal_number | CI | — |
| VEN | document_number | 身份证 | — |
示例
python
import requests
response = requests.post(
https://verification.didit.me/v3/database-validation/,
headers={x-api-key: YOURAPIKEY, Content-Type: application/json},
json={
id_number: 12345678,
first_name: Carlos,
last_name: Garcia,
issuing_state: PER,
},
)
print(response.json())
typescript
const response = await fetch(https://verification.didit.me/v3/database-validation/, {
method: POST,
headers: { x-api-key: YOURAPIKEY, Content-Type: application/json },
body: JSON.stringify({
id_number: 12345678,
first_name: Carlos,
last_name: Garcia,
issuing_state: PER,
}),
});
响应(200 OK)
json
{
request_id: a1b2c3d4-...,
database_validation: {
status: Approved,
matchtype: fullmatch,
issuing_state: PER,
validation_type: 1x1,
screened_data: {
personal_number: 12345678,
first_name: Carlos,
last_name: Garcia
},
validations: {
fullname: fullmatch,
identificationnumber: fullmatch
}
}
}
状态值及处理
| 状态 | 含义 | 操作 |
|---|
| Approved | 与政府记录完全匹配 | 身份已确认 |
| Declined |
未找到匹配 | 无法验证身份 |
| In Review | 部分匹配或数据不足 | 检查 screened_data 和 validations |
错误响应
| 代码 | 含义 | 操作 |
|---|
| 400 | 无效请求 | 检查目标国家的身份证号码格式 |
| 401 |
无效的 API 密钥 | 验证 x-api-key 标头 |
| 403 | 积分不足 | 在 business.didit.me 充值 |
匹配逻辑
姓名匹配
| 结果 | 条件 |
|---|
| 完全匹配 | 全名拼接85%相似度(Levenshtein),或名字+姓氏均完全匹配 |
| 部分匹配 |
任何单个姓名组件完全匹配 |
|
不匹配 | 没有组件达到70%相似度 |
单个姓名组件使用70% Levenshtein 阈值。示例:Christophel vs Christopher = 完全匹配;Chris vs Christopher = 不匹配。
1x1 决策
| 匹配类型 | 姓名 | 身份证号码 |
|---|
| fullmatch | 完全匹配 | 完全匹配 |
| partialmatch |
部分匹配 | 完全匹配 |
| no_match | 所有其他组合 | — |
2x2 决策
需要与2个独立数据源进行匹配:
| 匹配类型 | 条件 |
|---|
| fullmatch | 两个数据源均确认姓名+身份证 |
| partialmatch |
一个数据源确认 |
| no_match | 两个数据源均未确认 |
出生日期和身份证号码匹配为精确匹配 — 无模糊匹配。
警告标签
| 标签 | 描述 |
|---|
| COULDNOTPERFORMDATABASEVALIDATION | 缺少必需数据 — 提供身份证号码、姓名和国家 |
| DATABASEVALIDATIONPARTIAL_MATCH |
发现部分匹配 — 需要调查 |
| DATABASE
VALIDATIONNO_MATCH | 在政府记录中未找到匹配 |
当触发 COULDNOTPERFORMDATABASEVALIDATION 时,会话进入审核中状态。一旦提供缺失数据,验证将自动重新触发。
支持的国家
| 国家 | 方法 | 覆盖率