---
id: "uic_wagon_number"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["transport"]
langs: ["common"]
quality: 100
url: "http://registry.apicrafter.io/datatype/uic_wagon_number"
---

# UIC wagon number (European Vehicle Number) (`uic_wagon_number`)

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

Twelve-digit number of a railway vehicle, such as a freight wagon, coach or locomotive, in the numbering system of the International Union of Railways (UIC), now the European Vehicle Number (EVN). Digits 1-2 give the vehicle type and interoperability, digits 3-4 the country of registration (before 2006, the owning railway), digits 5-8 the type of vehicle and digits 9-11 the serial number. Digit 12 is a check digit computed with the Luhn algorithm. On the vehicle the groups are separated by spaces and the check digit by a hyphen. Not to be confused with the UIC station code (uiccode).

- Personal data (PII): no
- Categories: Transportation (transport)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^\d{2}[ .-]?\d{2}[ .-]?(?:\d[ .]?){7}-?\d$
```

Check digit algorithm: `luhn`

## Examples

- `21 81 2471 217-3` — Example from the Wikipedia article
- `21.81.2471.217-3` — The same number with dots
- `218124712173` — The same number without separators
- `21 81 2471 217-4` (invalid example) — Wrong check digit
- `21 81 2471 21-3` (invalid example) — Eleven digits

## Mappings

- autotype: `uic`

## Supported by tools

- `autotype`

## Translations

- ru: Номер вагона UIC (European Vehicle Number): Двенадцатизначный номер железнодорожного подвижного состава по системе UIC; последняя цифра контрольная (алгоритм Луна).

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/UIC_wagon_numbers>
- other: <https://github.com/congy/AutoType/blob/master/data_release/uic.txt>

## Quality

Score 100/100.

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