---
title: Spain NID Verification
slug: mena-apis/spain-nid-verification
description: Learn how the National ID Card (NID) issued in Bangladesh plays a vital role in identity verification and citizenship. Discover how the NID Verification API can assist organizations in verifying NID information efficiently. Explore its diverse application
createdAt: 2023-10-17T08:17:01.634Z
---

## Introduction

The National ID Verification plays a crucial role in a wide range of administrative, financial, and government activities in Spain, such as financial transactions, banking, insurance, telecommunications, employment, healthcare, government services, and more. As such, the accuracy and validity of the information associated with a DNI is of utmost importance.

## What is NID

The **Documento Nacional de Identidad (DNI)**, commonly known as the Spanish National Identity Card, is an official identification document issued to Spanish citizens. It serves as proof of identity and is widely used for accessing government, financial, commercial, and other public and private services.

The DNI contains personal information such as the holder's name, surname, date of birth, nationality, sex, DNI number, photograph, and other identifying information. It also incorporates electronic functionality that can be used for secure identification and electronic authentication.

The **Spanish National Police (Policía Nacional)**, under the Ministry of the Interior, is responsible for the issuance and administration of the DNI.

## Overview of NID

The Spanish National Identity Card, commonly known as the **DNI**, is an official identification document issued to Spanish citizens. It serves as proof of identity and is used for various administrative, financial, legal, and commercial purposes.

**1. Purpose:**

- The primary purpose of the DNI is to establish and verify the identity of Spanish citizens.
- It is widely used for government services, banking and financial transactions, insurance, telecommunications, employment, healthcare, travel, and other identity-dependent services.

**2. Issuing Authority:**

- The **National Police (Policía Nacional)**, under Spain's Ministry of the Interior, is responsible for issuing the DNI.

## Spain NID Verification API

The Spain National ID Verification API enables organizations, businesses, and developers to verify Spanish DNI information for identity verification, compliance, fraud prevention, and customer onboarding purposes.

Our DNI Verification API is designed to simplify the verification of Spanish identity information by enabling organizations to cross-reference information provided by individuals against available authoritative records and verification sources, helping confirm the authenticity and validity of the identity information.

## API Applications

### B2B (Business-to-Business) Applications:

**Know Your Customer (KYC) Compliance:** B2B organizations, particularly financial institutions, fintech companies, and regulated businesses, can use DNI verification as part of their KYC and customer onboarding processes.

**Supplier and Vendor Verification:** Companies can verify the identities of suppliers, vendors, contractors, and business representatives, particularly when entering into sensitive or high-value commercial relationships.

**HR and Employee Verification:** Organizations can use DNI verification to confirm the identity information of prospective employees and support employee onboarding and employee verification processes.

**Secure Access Control:** Organizations can use DNI verification as part of identity and access-control processes, helping ensure that only authorized individuals can access restricted facilities, systems, or information.

**Healthcare:** Healthcare providers can use DNI verification to confirm patient identities during registration, appointments, and medical procedures, helping reduce identity-related errors.

**Education:** Educational institutions can use DNI verification to confirm the identities of students and maintain accurate student and academic records.

**Real Estate and Property Transactions:** Real estate companies, financial institutions, and property service providers can use DNI verification to verify the identities of buyers, sellers, landlords, tenants, and other parties involved in property-related transactions.

### B2C (Business-to-Consumer) Applications:

**User Registration and Onboarding:** When individuals register for online services such as banking, fintech, e-commerce, telecommunications, or other digital platforms, DNI verification can be used to verify the identity information provided by the user.

**Age Verification:** Businesses can use DNI information, particularly date-of-birth information where available and permitted, to support age verification for services subject to age restrictions.

**Loan and Credit Application:** Financial institutions and lending platforms can use DNI verification to confirm applicant identity during loan, credit, and other financial application processes.

**e-Government Services:** Government agencies and service providers can use DNI verification to authenticate individuals and support access to government and public services.

**Insurance Verification:** Insurance companies can use DNI verification to confirm the identities of policyholders, beneficiaries, and claimants, helping improve the accuracy of insurance-related processes and reduce identity-related fraud.

## API Details

### Sample cURL

::::Tabs
:::Tab{title="Pre-Production"}
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/spain/national-id-verify' \
--header 'Content-Type: application/json' \
--header 'Authorization: <----Auth Token----> ' \
--data '{
    "firstName": "Noelia",
    "lastName": "Velasco Araque",
    "dateOfBirth": "1983-05-16",
    "addressLine1": "Carrer Ramat 4",
    "addressLine3": "Gandia",
    "addressLine4": "",
    "addressLine5": "46702",
    "nationalIdNumber": "02251205B",
    "phoneNo": "34695020769",
    "consentObtained": true
}'
```
:::

:::Tab{title="Production"}
```curl
curl --location 'https://api.signzy.app/api/v3/spain/national-id-verify' \
--header 'Content-Type: application/json' \
--header 'Authorization: <----Auth Token----> ' \
--data '{
    "firstName": "Noelia",
    "lastName": "Velasco Araque",
    "dateOfBirth": "1983-05-16",
    "addressLine1": "Carrer Ramat 4",
    "addressLine3": "Gandia",
    "addressLine4": "",
    "addressLine5": "46702",
    "nationalIdNumber": "02251205B",
    "phoneNo": "34695020769",
    "consentObtained": true
}'
```
:::
::::

### Request Body Parameters

| **Parameter**    | **Data Type** | **Required** | **Description**                                            |
| ---------------- | ------------- | ------------ | ---------------------------------------------------------- |
| firstName        | String        | Yes          | First name of the individual                               |
| lastName         | String        | Yes          | Last name of the individual                                |
| dateOfBirth      | Date          | Yes          | Date of birth (format: YYYY-MM-DD)                         |
| addressLine1     | String        | Yes          | Primary residential address line                           |
| addressLine3     | String        | Yes          | City or locality part of the address                       |
| addressLine4     | String        | Optional     | the Province of the address                                |
| addressLine5     | String        | Yes          | Postal code                                                |
| nationalIdNumber | String        | Yes          | Spain Identity Document (DNI) Number of the identity owner |
| phoneNo          | String        | Optional     | the phone number of the identity owner                     |
| consentObtained  | Boolean       | Yes          | Consent from the individual for verification               |

### Sample Response

:::CodeblockTabs
Valid Input 200

```json
{
    "result": {
        "verified": true,
        "matchStatus": "FULL_MATCH",
        "nameMatchScore": "1.000",
        "addressMatchScore": "1.000",
        "verification": {
            "firstName": true,
            "lastName": true,
            "dateOfBirth": true,
            "nationalIdNumber": true,
            "phoneNo": true,
            "addressLine1": false,
            "addressLine3": true,
            "addressLine4": true,
            "addressLine5": false
        }
    },
    "reason": "Request Successful.",
    "code": "S001"
}
```

Invalid Input 200

```json
{
    "result": {
        "verified": false,
        "matchStatus": "NO_MATCH",
        "nameMatchScore": "1.000",
        "addressMatchScore": "0.200",
        "verification": {
            "firstName": true,
            "lastName": true,
            "dateOfBirth": true,
            "nationalIdNumber": true,
            "phoneNo": false,
            "addressLine1": false,
            "addressLine3": true,
            "addressLine4": "",
            "addressLine5": false
        }
    },
    "reason": "Request Successful.",
    "code": "S001"
}
```
:::

### Response Body parameters

| **Parameter**     | **Data Type** | **Description**                                               |
| ----------------- | ------------- | ------------------------------------------------------------- |
| verified          | Boolean       | element verifications                                         |
| matchStatus       | String        | Shows matchStatus                                             |
| nameMatchScore    | Float         | Numerical score (0-1) representing the address match quality. |
| addressMatchScore | Float         | Numerical score (0-1) representing the address match quality. |
| verification      | Object        | Container for detailed results of the verification            |
| firstName         | Boolean       | Result of the first name verification.                        |
| lastName          | Boolean       | Result of the last name verification.                         |
| dateOfBirth       | Boolean       | Result of the dateOfBirth verification.                       |
| nationalIdNumber  | Boolean       | Result of the nationalIdNumber verification.                  |
| phoneNo           | Boolean       | Result of the phoneNo verification.                           |
| addressLine1      | Boolean       | Result of the addressLine1 verification.                      |
| addressLine3      | Boolean       | Result of the addressLine3 verification.                      |
| addressLine4      | Boolean       | Result of the addressLine4 verification.                      |
| addressLine5      | Boolean       | Result of the addressLine5 verification.                      |
| reason            | string        | Explanation of the verification results.                      |
| code              | string        | Status code indicating the outcome.                           |

### Error Code and Response Mapping

:::CodeblockTabs
400 (Bad Request)

```json
{
    "result": {},
    "reason": "firstName is required",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "firstName must be a text value",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "firstName cannot be empty",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for firstName should be: minimum 2 characters",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for firstName should be: maximum 60 characters",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "First name cannot contain numbers.",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "lastName is required",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "lastName must be a text value",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "lastName cannot be empty",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for lastName should be: minimum 2 characters",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for lastName should be: maximum 60 characters",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Last name cannot contain numbers.",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "dateOfBirth is required",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "dateOfBirth must be a text value",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "dateOfBirth cannot be empty",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "dateOfBirth must be in YYYY-MM-DD format",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "dateOfBirth is not a valid calendar date",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "dateOfBirth must be on or after 1901",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "dateOfBirth cannot be a future date",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement1 is required",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement1 must be a text value",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement1 cannot be empty",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for addressElement1 should be: minimum 2 characters",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for addressElement1 should be: maximum 100 characters",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement3 is required",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement3 must be a text value",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement3 cannot be empty",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for addressElement3 should be: minimum 2 characters",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for addressElement3 should be: maximum 60 characters",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement4 must be a text value and cannot be null",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for addressElement4 should be: maximum 60 characters",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement5 is required",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement5 must be a text value",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "addressElement5 cannot be empty",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for addressElement5 should be exactly 5 Digits, numbers only",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "nationalIdNumber is required",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "nationalIdNumber must be a text value",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "nationalIdNumber cannot be empty",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for nationalIdNumber should be: 8 digits followed by a check letter (e.g. 02251205B)",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "phoneNo must be a text value and cannot be null",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "Invalid value for phoneNo should be: 9 digits starting 6-9, optionally prefixed with +34 or 34",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "consent is required",
    "code": "E001"
} ---
{
    "result": {},
    "reason": "consent must be true and of boolean type",
    "code": "E001"
}
```

409(Upstream Down

```json
{
    "result": {},
    "reason": "Upstream error",
    "status": "failure",
    "code": "E401"
}
```

500 (Internal Server Error)

```json
{
    "result": {},
    "reason": "Internal Server Error.",
    "code": "INTERNAL_SERVER_ERROR"
}
```
:::

### Error Response Parameters

| **Field** | **Description**                                    |
| --------- | -------------------------------------------------- |
| `result`  | Always an object (usually empty) in error response |
| `reason`  | Reason for the error.                              |
| `Code`    | Code representing the error scenario.              |



:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.

You can reach out to us at [help@signzy.com](#). We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!
:::

