---
id: "es_nss"
kind: "datatype"
status: "draft"
is_pii: true
categories: ["pii", "persons"]
country: ["ES"]
langs: ["es"]
quality: 75
url: "http://registry.apicrafter.io/datatype/es_nss"
---

# Spanish social security number (`es_nss`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Spanish social security affiliation number (número de la Seguridad Social): a two-digit province code, seven or eight digits and two check digits, optionally separated by slashes.

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons)
- Countries: Spain (ES)
- Languages: Spanish (es)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^\d{2}/?\d{7,8}/?\d{2}$
```

## Mappings

- dpv: `pd:OfficialID`
- purview: `Spain social security number (SSN)`, `EU Social Security Number (SSN) or Equivalent ID`, `EU social security number or equivalent identification`

## Supported by tools

- `amazonmacie`
- `awsglue`
- `azureailanguage`
- `microsoftpurview`
- `nightfall`
- `snowflake`

## Sources

- doc: <https://learn.microsoft.com/en-us/purview/sit-defn-spain-social-security-number>

## Quality

Score 75/100. Missing: examples, negative example, translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/es_nss.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/ES/persons/es_nss.yaml>
