---
id: "de_leitweg_id"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["finances", "government"]
country: ["DE"]
langs: ["common"]
quality: 90
url: "http://registry.apicrafter.io/datatype/de_leitweg_id"
---

# German e-invoice routing ID (Leitweg-ID) (`de_leitweg_id`)

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

Leitweg-ID, the address of a public contracting authority that receives electronic invoices in Germany, given as the buyer reference (BT-10) of an XRechnung. It has three parts separated by hyphens: a coarse address of 2 to 12 digits that starts with the state code (01 to 16) or 99 for the federal administration, an optional fine address of up to 30 letters and digits, and two check digits by ISO 7064 MOD 97-10.

- Personal data (PII): no
- Categories: Finances and banking (finances), Government related (government)
- Countries: Germany (DE)
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:0[1-9]|1[0-6]|99)\d{0,10}(?:-[0-9A-Z]{1,30})?-\d{2}$
```

Check digit algorithm: `iso7064_mod97_10`

## Examples

- `991-03730-19` — python-stdnum reference value
- `16055000-A1B2C3-61` — Synthetic ID with a fine address and valid check digits
- `991-03730-18` (invalid example) — Check digits do not match
- `1-03730-19` (invalid example) — The coarse address starts with two digits

## Mappings

- stdnum: `de.leitweg`

## Translations

- de: Leitweg-ID
- ru: Маршрутный идентификатор электронного счёта Германии (Leitweg-ID): Адрес государственного заказчика для получения электронных счетов (XRechnung) - грубый адрес из 2-12 цифр, необязательный точный адрес и две контрольные цифры ISO 7064 MOD 97-10.

## Sources

- doc: <https://leitweg-id.de/>
- wikipedia: <https://de.wikipedia.org/wiki/Leitweg-ID>
- other: <https://arthurdejong.org/python-stdnum/doc/2.2/stdnum.de.leitweg.html>

## Quality

Score 90/100. Missing: detector coverage.

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