---
id: "gsrn"
kind: "datatype"
status: "draft"
is_pii: true
categories: ["gs1", "pii"]
langs: ["common"]
quality: 75
url: "http://registry.apicrafter.io/datatype/gsrn"
---

# Global Service Relation Number (GSRN) (`gsrn`)

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

GS1 identification key for the relationship between an organisation that offers a service and a person or party in that service: a provider of the service, such as a caregiver, or a recipient, such as a patient or a loyalty scheme member. Eighteen digits: a GS1 Company Prefix, a service reference and a GS1 check digit. Application Identifier (8017) carries the GSRN of a provider and (8018) the GSRN of a recipient; the element strings are the patterns gs1_ai_8017 and gs1_ai_8018. A GSRN usually identifies a person, so it is treated as personal data.

- Personal data (PII): yes
- Categories: GS1 standards (gs1), Personally identifiable information (pii)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier
- Patterns: `gs1_ai_8017`, `gs1_ai_8018`

## Detection

Regular expression (Python `re`):

```
^\d{18}$
```

Check digit algorithm: `gs1_mod10`

## Examples

- `952876500003104257` — Synthetic value with the GS1 demonstration prefix 952 and a valid check digit
- `952876510000005891` — Synthetic value with the GS1 demonstration prefix 952 and a valid check digit
- `952876500003104258` (invalid example) — Last digit changed: fails the GS1 check digit

## Sources

- doc: <https://ref.gs1.org/ai/8017>
- doc: <https://ref.gs1.org/ai/8018>
- doc: <https://ref.gs1.org/standards/genspecs/>

## Quality

Score 75/100. Missing: mapping (Wikidata, Schema.org, ...), translation, detector coverage.

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