didit-database-validation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDidit Database Validation API
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, orpartial_matchno_match - 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
将个人数据及身份证件与可信的政府及金融数据库进行比对验证,防范合成身份欺诈,确保身份真实性。
核心限制:
- 至少需要目标国家的国家身份证/证件号码
- 覆盖范围:18个国家(主要为拉美地区及西班牙)
- 验证结果:、
full_match或partial_matchno_match - 仅对成功查询收费——数据不足时不收取费用
匹配方式:
| 方式 | 说明 | 起价 |
|---|---|---|
| 1x1 | 单一数据源验证 | $0.05 |
| 2x2 | 双数据源交叉验证 | $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
Authentication
身份验证
All requests require header. Get your key from Didit Business Console → API & Webhooks, or via programmatic registration (see below).
x-api-key所有请求均需携带请求头。可从Didit Business Console → API & Webhooks获取密钥,或通过程序化注册获取(见下文)。
x-api-keyGetting Started (No Account Yet?)
快速入门(还没有账号?)
If you don't have a Didit API key, create one in 2 API calls:
- Register: with
POST https://apx.didit.me/auth/v2/programmatic/register/{"email": "you@gmail.com", "password": "MyStr0ng!Pass"} - Check email for a 6-character OTP code
- Verify: with
POST https://apx.didit.me/auth/v2/programmatic/verify-email/→ response includes{"email": "you@gmail.com", "code": "A3K9F2"}api_key
To add credits: to check, with for a Stripe checkout link.
GET /v3/billing/balance/POST /v3/billing/top-up/{"amount_in_dollars": 50}See the didit-verification-management skill for full platform management (workflows, sessions, users, billing).
如果您还没有Didit API密钥,可通过2个API调用创建:
- 注册: 发送请求,请求体为
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
充值方式: 调用查询余额,发送请求,请求体为以获取Stripe结账链接。
GET /v3/billing/balance/POST /v3/billing/top-up/{"amount_in_dollars": 50}如需完整平台管理(工作流、会话、用户、账单),请查看didit-verification-management技能。
Endpoint
接口地址
POST https://verification.didit.me/v3/database-validation/POST https://verification.didit.me/v3/database-validation/Headers
请求头
| Header | Value | Required |
|---|---|---|
| Your API key | Yes |
| | Yes |
| 请求头 | 值 | 是否必填 |
|---|---|---|
| 您的API密钥 | 是 |
| | 是 |
Body (JSON)
请求体(JSON)
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | Universal ID number — auto-maps to correct country field |
| string | No | First name for matching |
| string | No | Last name for matching |
| string | No | DOB in |
| string | No | ISO 3166-1 alpha-3 country code |
| boolean | No | Save in Business Console |
| string | No | Your identifier for session tracking |
The field auto-maps to the correct country-specific field:
id_number| Country | Mapped Field | Document | Format |
|---|---|---|---|
| ARG | | DNI | — |
| BOL | | CI | — |
| BRA | | CPF | 11 digits |
| CHL | | RUT | — |
| COL | | Cedula | — |
| CRI | | Cedula | — |
| DOM | | Cedula | 11 digits |
| ECU | | Cedula | 10 digits |
| ESP | | DNI/NIE | — |
| GTM | | DPI | — |
| HND | | DNI | — |
| MEX | | CURP | 18 chars |
| PAN | | Cedula | — |
| PER | | DNI | 8 digits |
| PRY | | CI | — |
| SLV | | DUI | — |
| URY | | CI | — |
| VEN | | Cedula | — |
| 参数 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| string | 是 | 通用身份证号码——自动映射到对应国家的字段 |
| string | 否 | 用于匹配的名字 |
| string | 否 | 用于匹配的姓氏 |
| string | 否 | 出生日期,格式为 |
| string | 否 | ISO 3166-1 alpha-3国家代码 |
| boolean | 否 | 是否在Business Console中保存请求记录 |
| string | 否 | 用于会话跟踪的自定义标识符 |
id_number| 国家 | 映射字段 | 证件类型 | 格式 |
|---|---|---|---|
| 阿根廷 | | DNI | — |
| 玻利维亚 | | CI | — |
| 巴西 | | CPF | 11位数字 |
| 智利 | | RUT | — |
| 哥伦比亚 | | Cedula | — |
| 哥斯达黎加 | | Cedula | — |
| 多米尼加共和国 | | Cedula | 11位数字 |
| 厄瓜多尔 | | Cedula | 10位数字 |
| 西班牙 | | DNI/NIE | — |
| 危地马拉 | | DPI | — |
| 洪都拉斯 | | DNI | — |
| 墨西哥 | | CURP | 18位字符 |
| 巴拿马 | | Cedula | — |
| 秘鲁 | | DNI | 8位数字 |
| 巴拉圭 | | CI | — |
| 萨尔瓦多 | | DUI | — |
| 乌拉圭 | | CI | — |
| 委内瑞拉 | | Cedula | — |
Example
示例代码
python
import requests
response = requests.post(
"https://verification.didit.me/v3/database-validation/",
headers={"x-api-key": "YOUR_API_KEY", "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": "YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
id_number: "12345678",
first_name: "Carlos",
last_name: "Garcia",
issuing_state: "PER",
}),
});python
import requests
response = requests.post(
"https://verification.didit.me/v3/database-validation/",
headers={"x-api-key": "YOUR_API_KEY", "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": "YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
id_number: "12345678",
first_name: "Carlos",
last_name: "Garcia",
issuing_state: "PER",
}),
});Response (200 OK)
响应示例(200 OK)
json
{
"request_id": "a1b2c3d4-...",
"database_validation": {
"status": "Approved",
"match_type": "full_match",
"issuing_state": "PER",
"validation_type": "1x1",
"screened_data": {
"personal_number": "12345678",
"first_name": "Carlos",
"last_name": "Garcia"
},
"validations": {
"full_name": "full_match",
"identification_number": "full_match"
}
}
}json
{
"request_id": "a1b2c3d4-...",
"database_validation": {
"status": "Approved",
"match_type": "full_match",
"issuing_state": "PER",
"validation_type": "1x1",
"screened_data": {
"personal_number": "12345678",
"first_name": "Carlos",
"last_name": "Garcia"
},
"validations": {
"full_name": "full_match",
"identification_number": "full_match"
}
}
}Status Values & Handling
状态值及处理建议
| Status | Meaning | Action |
|---|---|---|
| Full match against government records | Identity confirmed |
| No match found | Identity could not be verified |
| Partial match or insufficient data | Review screened_data and validations |
| 状态 | 含义 | 操作建议 |
|---|---|---|
| 与政府记录完全匹配 | 身份已确认 |
| 未找到匹配记录 | 身份无法验证 |
| 部分匹配或数据不足 | 查看screened_data及验证详情 |
Error Responses
错误响应
| Code | Meaning | Action |
|---|---|---|
| Invalid request | Check ID number format for target country |
| Invalid API key | Verify |
| Insufficient credits | Top up at business.didit.me |
| 状态码 | 含义 | 操作建议 |
|---|---|---|
| 请求无效 | 检查目标国家的身份证号码格式 |
| API密钥无效 | 验证 |
| 余额不足 | 前往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.
| 匹配结果 | 判断标准 |
|---|---|
| 完全匹配 | 全名拼接后相似度达到85%(Levenshtein算法),或名字+姓氏均完全匹配 |
| 部分匹配 | 任意单个姓名组件完全匹配 |
| 无匹配 | 所有组件相似度均未达到70% |
单个姓名组件采用70%的Levenshtein阈值。示例:"Christophel"与"Christopher" = 完全匹配;"Chris"与"Christopher" = 无匹配。
1x1 Decision
1x1匹配判定
| Match Type | Name | ID Number |
|---|---|---|
| Full Match | Full Match |
| Partial Match | Full Match |
| All other combinations | — |
| 匹配类型 | 姓名 | 身份证号码 |
|---|---|---|
| 完全匹配 | 完全匹配 |
| 部分匹配 | 完全匹配 |
| 其他所有组合 | — |
2x2 Decision
2x2匹配判定
Requires matching against 2 independent data sources:
| Match Type | Condition |
|---|---|
| Both sources confirm name + ID |
| One source confirms |
| Neither source confirms |
DOB and ID number matching is exact only — no fuzzy matching.
需要与2个独立数据源进行比对:
| 匹配类型 | 条件 |
|---|---|
| 两个数据源均确认姓名+身份证号码匹配 |
| 其中一个数据源确认匹配 |
| 两个数据源均未确认匹配 |
出生日期(DOB)及身份证号码匹配仅支持精确匹配——不提供模糊匹配。
Warning Tags
警告标签
| Tag | Description |
|---|---|
| Missing required data — provide ID number, name, and country |
| Partial match found — requires investigation |
| No match found in government records |
Whenfires, session goes to "In Review". Validation auto-retriggers once missing data is provided.COULD_NOT_PERFORM_DATABASE_VALIDATION
| 标签 | 说明 |
|---|---|
| 缺少必填数据——请提供身份证号码、姓名及国家信息 |
| 找到部分匹配记录——需进一步核查 |
| 政府记录中未找到匹配信息 |
当触发标签时,会话状态变为“审核中”。补充缺失数据后,验证将自动重新触发。COULD_NOT_PERFORM_DATABASE_VALIDATION
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 |
| 国家 | 匹配方式 | 覆盖范围 | 必填输入项 |
|---|---|---|---|
| 阿根廷 | 1x1 | 95% | 证件号码 |
| 玻利维亚 | 1x1 | 95% | 证件号码+出生日期 |
| 巴西 | 1x1 | 95% | 税号(CPF) |
| 智利 | 1x1 | 95% | 个人号码(RUT) |
| 哥伦比亚 | 1x1 | 95% | 证件号码+类型 |
| 哥斯达黎加 | 1x1 | 95% | 个人号码 |
| 多米尼加共和国 | 1x1 | 95% | 个人号码 |
| 厄瓜多尔 | 1x1 / 2x2 | 90-96% | 个人号码 |
| 萨尔瓦多 | 1x1 | 95% | 证件号码+出生日期 |
| 危地马拉 | 1x1 | 95% | 证件号码 |
| 洪都拉斯 | 1x1 | 95% | 证件号码 |
| 墨西哥 | 1x1 | 95% | 个人号码(CURP) |
| 巴拿马 | 1x1 | 95% | 证件号码+出生日期 |
| 巴拉圭 | 1x1 | 95% | 证件号码 |
| 秘鲁 | 1x1 / 2x2 | 95-99% | 个人号码 |
| 西班牙 | 1x1 | 95% | 个人号码+证件类型+有效期 |
| 乌拉圭 | 1x1 | 95% | 个人号码+出生日期 |
| 委内瑞拉 | 1x1 | 95% | 证件号码 |
Utility Scripts
实用脚本
validate_database.py: Validate identity against government databases from the command line.
bash
undefinedvalidate_database.py:通过命令行验证身份与政府数据库的匹配情况。
bash
undefinedRequires: pip install requests
依赖:pip install requests
export DIDIT_API_KEY="your_api_key"
python scripts/validate_database.py --id-number 12345678 --country PER --first-name Carlos --last-name Garcia
python scripts/validate_database.py --id-number GARC850315HDFRRL09 --country MEX
undefinedexport DIDIT_API_KEY="your_api_key"
python scripts/validate_database.py --id-number 12345678 --country PER --first-name Carlos --last-name Garcia
python scripts/validate_database.py --id-number GARC850315HDFRRL09 --country MEX
undefined