didit-database-validation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Didit 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
    ,
    partial_match
    , or
    no_match
  • Only charged per successful query — no charge if insufficient data
Matching methods:
MethodDescriptionStarting Price
1x1Single data source validation$0.05
2x2Two data sources cross-validation$0.30

将个人数据及身份证件与可信的政府及金融数据库进行比对验证,防范合成身份欺诈,确保身份真实性。
核心限制:
  • 至少需要目标国家的国家身份证/证件号码
  • 覆盖范围:18个国家(主要为拉美地区及西班牙)
  • 验证结果:
    full_match
    partial_match
    no_match
  • 仅对成功查询收费——数据不足时不收取费用
匹配方式:
方式说明起价
1x1单一数据源验证$0.05
2x2双数据源交叉验证$0.30

Authentication

身份验证

All requests require
x-api-key
header. Get your key from Didit Business Console → API & Webhooks, or via programmatic registration (see below).
所有请求均需携带
x-api-key
请求头。可从Didit Business Console → API & Webhooks获取密钥,或通过程序化注册获取(见下文)。

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
    {"email": "you@gmail.com", "password": "MyStr0ng!Pass"}
  2. Check email for a 6-character OTP code
  3. Verify:
    POST https://apx.didit.me/auth/v2/programmatic/verify-email/
    with
    {"email": "you@gmail.com", "code": "A3K9F2"}
    → response includes
    api_key
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).

如果您还没有Didit API密钥,可通过2个API调用创建:
  1. 注册: 发送
    POST https://apx.didit.me/auth/v2/programmatic/register/
    请求,请求体为
    {"email": "you@gmail.com", "password": "MyStr0ng!Pass"}
  2. 查看邮箱获取6位OTP验证码
  3. 验证: 发送
    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/
请求,请求体为
{"amount_in_dollars": 50}
以获取Stripe结账链接。
如需完整平台管理(工作流、会话、用户、账单),请查看didit-verification-management技能。

Endpoint

接口地址

POST https://verification.didit.me/v3/database-validation/
POST https://verification.didit.me/v3/database-validation/

Headers

请求头

HeaderValueRequired
x-api-key
Your API keyYes
Content-Type
application/json
Yes
请求头是否必填
x-api-key
您的API密钥
Content-Type
application/json

Body (JSON)

请求体(JSON)

ParameterTypeRequiredDescription
id_number
stringYesUniversal ID number — auto-maps to correct country field
first_name
stringNoFirst name for matching
last_name
stringNoLast name for matching
date_of_birth
stringNoDOB in
YYYY-MM-DD
(required for some countries)
issuing_state
stringNoISO 3166-1 alpha-3 country code
save_api_request
booleanNoSave in Business Console
vendor_data
stringNoYour identifier for session tracking
The
id_number
field auto-maps to the correct country-specific field:
CountryMapped FieldDocumentFormat
ARG
document_number
DNI
BOL
document_number
CI
BRA
tax_number
CPF11 digits
CHL
personal_number
RUT
COL
personal_number
Cedula
CRI
personal_number
Cedula
DOM
personal_number
Cedula11 digits
ECU
personal_number
Cedula10 digits
ESP
personal_number
DNI/NIE
GTM
document_number
DPI
HND
document_number
DNI
MEX
personal_number
CURP18 chars
PAN
document_number
Cedula
PER
personal_number
DNI8 digits
PRY
document_number
CI
SLV
document_number
DUI
URY
personal_number
CI
VEN
document_number
Cedula
参数类型是否必填说明
id_number
string通用身份证号码——自动映射到对应国家的字段
first_name
string用于匹配的名字
last_name
string用于匹配的姓氏
date_of_birth
string出生日期,格式为
YYYY-MM-DD
(部分国家必填)
issuing_state
stringISO 3166-1 alpha-3国家代码
save_api_request
boolean是否在Business Console中保存请求记录
vendor_data
string用于会话跟踪的自定义标识符
id_number
字段会自动映射到对应国家的特定字段:
国家映射字段证件类型格式
阿根廷
document_number
DNI
玻利维亚
document_number
CI
巴西
tax_number
CPF11位数字
智利
personal_number
RUT
哥伦比亚
personal_number
Cedula
哥斯达黎加
personal_number
Cedula
多米尼加共和国
personal_number
Cedula11位数字
厄瓜多尔
personal_number
Cedula10位数字
西班牙
personal_number
DNI/NIE
危地马拉
document_number
DPI
洪都拉斯
document_number
DNI
墨西哥
personal_number
CURP18位字符
巴拿马
document_number
Cedula
秘鲁
personal_number
DNI8位数字
巴拉圭
document_number
CI
萨尔瓦多
document_number
DUI
乌拉圭
personal_number
CI
委内瑞拉
document_number
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

状态值及处理建议

StatusMeaningAction
"Approved"
Full match against government recordsIdentity confirmed
"Declined"
No match foundIdentity could not be verified
"In Review"
Partial match or insufficient dataReview screened_data and validations
状态含义操作建议
"Approved"
与政府记录完全匹配身份已确认
"Declined"
未找到匹配记录身份无法验证
"In Review"
部分匹配或数据不足查看screened_data及验证详情

Error Responses

错误响应

CodeMeaningAction
400
Invalid requestCheck ID number format for target country
401
Invalid API keyVerify
x-api-key
header
403
Insufficient creditsTop up at business.didit.me

状态码含义操作建议
400
请求无效检查目标国家的身份证号码格式
401
API密钥无效验证
x-api-key
请求头
403
余额不足前往business.didit.me进行充值

Matching Logic

匹配逻辑

Name Matching

姓名匹配

ResultCriteria
Full MatchFull name concatenation at 85% similarity (Levenshtein), OR First + Last both full match
Partial MatchAny single name component full match
No MatchNo 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 TypeNameID Number
full_match
Full MatchFull Match
partial_match
Partial MatchFull Match
no_match
All other combinations
匹配类型姓名身份证号码
full_match
完全匹配完全匹配
partial_match
部分匹配完全匹配
no_match
其他所有组合

2x2 Decision

2x2匹配判定

Requires matching against 2 independent data sources:
Match TypeCondition
full_match
Both sources confirm name + ID
partial_match
One source confirms
no_match
Neither source confirms
DOB and ID number matching is exact only — no fuzzy matching.

需要与2个独立数据源进行比对:
匹配类型条件
full_match
两个数据源均确认姓名+身份证号码匹配
partial_match
其中一个数据源确认匹配
no_match
两个数据源均未确认匹配
出生日期(DOB)及身份证号码匹配仅支持精确匹配——不提供模糊匹配。

Warning Tags

警告标签

TagDescription
COULD_NOT_PERFORM_DATABASE_VALIDATION
Missing required data — provide ID number, name, and country
DATABASE_VALIDATION_PARTIAL_MATCH
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.

标签说明
COULD_NOT_PERFORM_DATABASE_VALIDATION
缺少必填数据——请提供身份证号码、姓名及国家信息
DATABASE_VALIDATION_PARTIAL_MATCH
找到部分匹配记录——需进一步核查
DATABASE_VALIDATION_NO_MATCH
政府记录中未找到匹配信息
当触发
COULD_NOT_PERFORM_DATABASE_VALIDATION
标签时,会话状态变为“审核中”。补充缺失数据后,验证将自动重新触发

Supported Countries

支持国家

CountryMethodCoverageRequired Input
Argentina1x195%Document number
Bolivia1x195%Document number + DOB
Brazil1x195%Tax number (CPF)
Chile1x195%Personal number (RUT)
Colombia1x195%Document number + type
Costa Rica1x195%Personal number
Dominican Republic1x195%Personal number
Ecuador1x1 / 2x290-96%Personal number
El Salvador1x195%Document number + DOB
Guatemala1x195%Document number
Honduras1x195%Document number
Mexico1x195%Personal number (CURP)
Panama1x195%Document number + DOB
Paraguay1x195%Document number
Peru1x1 / 2x295-99%Personal number
Spain1x195%Personal number + doc type + expiry
Uruguay1x195%Personal number + DOB
Venezuela1x195%Document number

国家匹配方式覆盖范围必填输入项
阿根廷1x195%证件号码
玻利维亚1x195%证件号码+出生日期
巴西1x195%税号(CPF)
智利1x195%个人号码(RUT)
哥伦比亚1x195%证件号码+类型
哥斯达黎加1x195%个人号码
多米尼加共和国1x195%个人号码
厄瓜多尔1x1 / 2x290-96%个人号码
萨尔瓦多1x195%证件号码+出生日期
危地马拉1x195%证件号码
洪都拉斯1x195%证件号码
墨西哥1x195%个人号码(CURP)
巴拿马1x195%证件号码+出生日期
巴拉圭1x195%证件号码
秘鲁1x1 / 2x295-99%个人号码
西班牙1x195%个人号码+证件类型+有效期
乌拉圭1x195%个人号码+出生日期
委内瑞拉1x195%证件号码

Utility Scripts

实用脚本

validate_database.py: Validate identity against government databases from the command line.
bash
undefined
validate_database.py:通过命令行验证身份与政府数据库的匹配情况。
bash
undefined

Requires: 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
undefined
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
undefined