---
id: "chahv"
kind: "datatype"
status: "stable"
is_pii: true
categories: ["pii", "persons"]
country: ["CH"]
langs: ["de", "fr", "it"]
quality: 83
url: "http://registry.apicrafter.io/datatype/chahv"
---

# Swiss AHV Number (`chahv`)

Swiss AHV (Alters- und Hinterlassenenversicherung) social security number

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons)
- Countries: Switzerland (CH)
- Languages: German (de), French (fr), Italian (it)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^756\.?\d{4}\.?\d{4}\.?\d{2}$
```

## Examples

- `756.9217.0769.85` — AHV/AVS number format (EAN-13 check digit)

## Mappings

- dpv: `pd:OfficialID`
- fta: `IDENTITY.SSN_CH`
- purview: `Swiss Social Security Number AHV`, `Switzerland SSN AHV number`
- stdnum: `ch.ssn`

## Metacrafter rules

4 rules: 2 match the field name, 2 match values.

- `chahvfield` (field, `ch/ch_persons.yaml`)
- `chahvvalue` (data, `ch/ch_persons.yaml`)
- `ch_pii_chahvfield` (field, `pii/ch/ch_pii.yaml`)
- `ch_pii_chahvvalue` (data, `pii/ch/ch_pii.yaml`)

## Supported by tools

- `awsglue`
- `azureailanguage`
- `databricks`
- `dataprep`
- `fta`
- `metacrafter`
- `microsoftpurview`
- `pythonstdnum`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Swiss_social_security_number>

## Quality

Score 83/100. Missing: second example, negative example, translation.

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