{
  "id": "es_dni",
  "kind": "datatype",
  "status": "draft",
  "name": "Spanish national identity document number (DNI)",
  "doc": "Documento Nacional de Identidad, the identity number of Spanish citizens: eight digits and a check letter, which is the number modulo 23 looked up in TRWAGMYFPDXBNJZSQVHLCKE. The same value is the person's tax number (NIF). Foreigners receive an NIE instead.",
  "parent": "esnif",
  "is_pii": true,
  "categories": [
    "pii",
    "persons"
  ],
  "country": [
    "ES"
  ],
  "langs": [
    "es"
  ],
  "classification": "identifier",
  "regexp": "^\\d{8}-?[A-Z]$",
  "checksum": "es_dni",
  "examples": [
    {
      "value": "12442144H",
      "description": "Synthetic number with a valid check digit",
      "valid": true
    },
    {
      "value": "85103532J",
      "description": "Synthetic number with a valid check digit",
      "valid": true
    },
    {
      "value": "54362315-K",
      "description": "python-stdnum test value, with a hyphen before the letter",
      "valid": true
    },
    {
      "value": "12442144A",
      "description": "Check letter does not match",
      "valid": false
    },
    {
      "value": "12442144H7",
      "description": "One character too many",
      "valid": false
    }
  ],
  "mappings": {
    "dpv": "pd:OfficialID",
    "google_dlp": "SPAIN_DNI_NUMBER",
    "purview": [
      "Spain DNI",
      "EU national identification number"
    ],
    "stdnum": "es.dni"
  },
  "links": [
    {
      "type": "wikipedia",
      "url": "https://en.wikipedia.org/wiki/Documento_Nacional_de_Identidad_(Spain)"
    },
    {
      "type": "wikipedia",
      "url": "https://es.wikipedia.org/wiki/Documento_nacional_de_identidad_(Espa%C3%B1a)"
    },
    {
      "type": "other",
      "url": "https://arthurdejong.org/python-stdnum/doc/2.2/stdnum.es.dni.html"
    },
    {
      "type": "other",
      "url": "https://docs.dataprep.ai/user_guide/clean/clean_es_dni.html"
    }
  ],
  "translations": {
    "es": {
      "name": "Documento Nacional de Identidad (DNI)"
    }
  },
  "detected_by": {
    "tools": [
      "amazonmacie",
      "awsglue",
      "azureailanguage",
      "databricks",
      "dataprep",
      "googledlp",
      "ibmguardium",
      "microsoftpurview",
      "nightfall",
      "pythonstdnum",
      "snowflake"
    ]
  },
  "quality": {
    "score": 100,
    "missing": []
  },
  "source": {
    "path": "data/datatypes/ES/persons/es_dni.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/ES/persons/es_dni.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/ES/persons/es_dni.yaml"
  },
  "urls": {
    "html": "http://registry.apicrafter.io/datatype/es_dni",
    "json": "http://registry.apicrafter.io/api/v1/datatypes/es_dni.json"
  }
}