{
  "id": "esvat",
  "kind": "datatype",
  "status": "stable",
  "name": "Spanish intra-Community VAT number (NIF-IVA)",
  "doc": "NIF-IVA, the Spanish VAT number for intra-Community trade: ES followed by the 9-character tax identification number (NIF). Spanish citizens use their DNI, eight digits and a check letter. Foreigners use their NIE, which starts with X, Y or Z. Companies and other entities have a NIF that starts with a letter for the legal form (formerly the CIF). The last character is a check digit or a check letter.",
  "parent": "vatin",
  "is_pii": true,
  "categories": [
    "finances"
  ],
  "country": [
    "ES"
  ],
  "langs": [
    "es"
  ],
  "classification": "identifier",
  "regexp": "^ES(?:[A-Z]\\d{7}[A-Z0-9]|\\d{8}[A-Z])$",
  "examples": [
    {
      "value": "ESB64717838",
      "description": "Company, python-stdnum reference value",
      "valid": true
    },
    {
      "value": "ES54362315K",
      "description": "Resident person (DNI), python-stdnum reference value",
      "valid": true
    },
    {
      "value": "ESX5253868R",
      "description": "Foreign person (NIE), python-stdnum reference value",
      "valid": true
    },
    {
      "value": "ES543623150",
      "description": "The first or the last character must be a letter",
      "valid": false
    },
    {
      "value": "ESB6471783",
      "description": "One character short",
      "valid": false
    }
  ],
  "mappings": {
    "fta": "IDENTITY.VAT_ES",
    "schema_org": "vatID",
    "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.gob.es/AEAT.internet/Inicio/Ayuda/Modelos__Procedimientos_y_Servicios/Comun/Informacion_General/Numero_de_Identificacion_Fiscal_NIF_/Numero_de_Identificacion_Fiscal_NIF_.shtml"
    },
    {
      "type": "other",
      "url": "https://arthurdejong.org/python-stdnum/doc/2.2/stdnum.es.nif.html"
    }
  ],
  "translations": {
    "es": {
      "name": "Número de identificación fiscal a efectos del IVA (NIF-IVA)"
    }
  },
  "detected_by": {
    "tools": [
      "awsglue",
      "fta",
      "metacrafter",
      "pythonstdnum"
    ],
    "metacrafter_rules": [
      {
        "rule": "esvatfield",
        "type": "field",
        "match": "text",
        "file": "es/es_tax.yaml"
      },
      {
        "rule": "esvatvalue",
        "type": "data",
        "match": "ppr",
        "file": "es/es_tax.yaml"
      }
    ]
  },
  "quality": {
    "score": 100,
    "missing": []
  },
  "source": {
    "path": "data/datatypes/ES/finances/esvat.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/ES/finances/esvat.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/ES/finances/esvat.yaml"
  },
  "urls": {
    "html": "http://registry.apicrafter.io/datatype/esvat",
    "json": "http://registry.apicrafter.io/api/v1/datatypes/esvat.json"
  }
}