🇪🇸 Spain
Spain - DNI/NIE verification
Verifies Spanish DNI / NIE against the Dirección General de la Policía records. Authoritative real-time identity lookup for Spain. Real-time lookup, pay-per-call.
POST
Verifies Spanish DNI / NIE against the Dirección General de la Policía records. Didit exposes this service through
POST /v3/database-validation/ so you can verify the submitted data against the authoritative source and receive normalized match results.
Coverage
- Coverage: —
- Country: Spain
- Service ID:
esp_dni - Data domain: Identity
- Category: NationalIDRegistry
Inputs
| Field | Required | Example |
|---|---|---|
personal_number | Yes | SAMPLE-PER-12345 |
document_type | Yes | ID |
expiration_date | Yes | 1990-01-01 |
first_name | No | John |
last_name | No | Doe |
vendor_data | No | user-1234 |
- Required inputs:
personal_number,document_type,expiration_date - Optional inputs:
first_name,last_name,vendor_data - Consent: Not required
- Workflow availability: Available in workflow
- Coverage: —
- Price: $0.20 per successful query
Body parameters
ISO 3166-1 alpha-3 country code for this database service.Example:
ESPArray containing this service ID. Pinning the service keeps the request scoped to this exact database.Example:
esp_dniCountry-specific personal identity number.Example:
SAMPLE-PER-12345Document type to validate against this database service.Allowed values:
ID (national ID).Example: IDexpiration_date value required by this database service.Example: 1990-01-01Given name to validate.Example:
JohnFamily name to validate.Example:
DoeYour stable user reference for this person, such as your internal user ID. Didit uses it to link standalone checks to the same end user and reduce duplicate-detection noise.Example:
user-1234Input rules & validation notes
- Spanish DNI (8 digits + letter) or NIE (X/Y/Z + 7 digits + letter)
personal_numbermust be exactly 9 characters long.personal_numbermust match^(\d{8}[A-Za-z]|[XYZxyz]\d{7}[A-Za-z])$.
How to call it
Returned data
The exact fields surfaced insource_data depend on what the registry returns. The generated example for esp_dni currently documents this normalized shape:
document_typeexpiration_datefirst_namefull_nameidentification_numberlast_name
Pricing & SLAs
Spain - DNI/NIE verification queries are billed only when Didit receives a conclusive result from the validation source.- Per-call price: $0.20 USD.
- Billing: per successful query. You are not charged when the registry is unreachable, when required fields are missing, or when the request is rejected before reaching the source.
- Latency: typical p95 < 2 s.
- Availability: 99.9% per quarter on Didit’s side; downstream source availability varies by country and dataset.