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

# Latvian personal code (`lv_personal_code`)

> **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.

Latvian personal code (personas kods), 11 digits. Codes issued before July 2017 start with the date of birth (DDMMYY), followed by a hyphen, a century digit and four digits. Newer codes start with 32 and carry no date of birth.

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons)
- Countries: Latvia (LV)
- Languages: Latvian (lv)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:(?:0[1-9]|[12]\d|3[01])(?:0[1-9]|1[0-2])\d{2}-?[012]\d{4}|32\d{4}-?\d{5})$
```

## Mappings

- dpv: `pd:OfficialID`
- purview: `Latvia personal code`, `EU national identification number`, `EU Tax Identification Number (TIN)`, `EU Tax identification number`

## Supported by tools

- `awsglue`
- `azureailanguage`
- `microsoftpurview`
- `snowflake`

## Sources

- doc: <https://learn.microsoft.com/en-us/purview/sit-defn-latvia-personal-code>

## Quality

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

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