{
  "id": "nif",
  "kind": "datatype",
  "status": "stable",
  "name": "NIF por nombre de campo",
  "doc": "ES datatype for 'NIF por nombre de campo' (nif) from rules in context 'finances'. The Spanish tax identification number (Número de Identificación Fiscal, NIF) is a unique identifier assigned to individuals and entities for tax purposes in Spain. For individuals, it consists of 8 digits followed by a check letter. For foreigners, it may start with X, Y, Z, K, L, or M followed by 7 digits and a check letter. The total length is 9 characters.",
  "is_pii": true,
  "categories": [
    "finances"
  ],
  "country": [
    "ES"
  ],
  "langs": [
    "es"
  ],
  "classification": "identifier",
  "regexp": "^([0-9]{8}|[XYZKLM][0-9]{7})[TRWAGMYFPDXBNJZSQVHLCKE]$",
  "examples": [
    {
      "value": "12345678Z",
      "description": "Spanish NIF for a Spanish citizen with 8 digits and check letter",
      "valid": true
    },
    {
      "value": "X1234567L",
      "description": "Spanish NIF for a foreigner starting with X followed by 7 digits and check letter",
      "valid": true
    },
    {
      "value": "87654321X",
      "description": "Another valid Spanish NIF format",
      "valid": true
    }
  ],
  "mappings": {
    "google_dlp": "SPAIN_NIF_NUMBER",
    "presidio": "ES_NIF",
    "schema_org": "taxID",
    "stdnum": "es.nif"
  },
  "links": [
    {
      "type": "wikipedia",
      "url": "https://es.wikipedia.org/wiki/N%C3%BAmero_de_identificaci%C3%B3n_fiscal"
    },
    {
      "type": "doc",
      "url": "https://www.agenciatributaria.es/AEAT.internet/Inicio/Ayuda/Modelos__Procedimientos_y_Servicios/Comun/Preguntas_frecuentes/Identificacion_y_Domicilio_Fiscal/Preguntas_frecuentes_sobre_NIF_NIE_CIF.shtml"
    }
  ],
  "translations": {
    "en": {
      "name": "Spanish Tax Identification Number (NIF)"
    },
    "es": {
      "name": "Número de Identificación Fiscal (NIF)"
    }
  },
  "detected_by": {
    "tools": [
      "amazonmacie",
      "awsglue",
      "azureailanguage",
      "googledlp",
      "ibmknowledgecatalog",
      "metacrafter",
      "openmetadata",
      "presidio",
      "pythonstdnum"
    ],
    "metacrafter_rules": [
      {
        "rule": "es_tax_esniffield",
        "type": "field",
        "match": "text",
        "file": "es/es_tax.yaml"
      },
      {
        "rule": "es_tax_esnifvalue",
        "type": "data",
        "match": "ppr",
        "file": "es/es_tax.yaml"
      }
    ]
  },
  "quality": {
    "score": 95,
    "missing": [
      "negative example"
    ]
  },
  "source": {
    "path": "data/datatypes/ES/finances/nif.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/ES/finances/nif.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/ES/finances/nif.yaml"
  },
  "urls": {
    "html": "http://registry.apicrafter.io/datatype/nif",
    "json": "http://registry.apicrafter.io/api/v1/datatypes/nif.json"
  }
}