Leitweg-ID: structure, example and where to find it

The Leitweg-ID is the electronic address of a public-sector invoice recipient in Germany. In an XRechnung, it goes in field BT-10 (buyer reference) and ensures that the invoice reaches the right authority and, within it, the right office. It consists of coarse addressing, optional fine addressing and two check digits, for example 991-33333TEST-33. You receive the Leitweg-ID from the contracting authority, usually together with the order.
What is a Leitweg-ID?
Germany's federal government and federal states have agreed on a uniform format that can be used to address every administrative unit electronically. The Koordinierungsstelle für IT-Standards (KoSIT, Coordination Office for IT Standards) describes it in the Leitweg-ID format specification, currently in version 2.0.2. The invoice receipt platforms forward incoming invoices to the authorities' invoice processing systems based on the Leitweg-ID.
In EN 16931, the buyer reference (BT-10) is optional. XRechnung makes it mandatory for invoices to public contracting authorities, and that is exactly where the Leitweg-ID goes. Since 2019, the Leitweg-ID has also been registered internationally as an identification scheme with code 0204. That is why it can also be used as a Peppol ID.
Important for companies: as an invoice issuer, you do not need your own Leitweg-ID, not even for the e-invoicing obligation between businesses. The Leitweg-ID only addresses recipients in the public administration.
Structure of the Leitweg-ID
The Leitweg-ID has three components, separated by hyphens:
| Component | Mandatory | Length | Content |
|---|---|---|---|
| Coarse addressing | yes | 2 to 12 digits | Federal government or federal state, optionally administrative region, district, municipality |
| Fine addressing | no | up to 30 characters | Letters A to Z and digits, freely defined by the federal government or state |
| Check digits | yes | 2 digits | calculated using Modulo 97-10 |
In total, a Leitweg-ID is between 5 and 46 characters long.
Coarse addressing
The coarse addressing follows the official regional key. The first two digits stand for the federal state or the federal government:
- 01 Schleswig-Holstein, 02 Hamburg, 03 Lower Saxony, 04 Bremen
- 05 North Rhine-Westphalia, 06 Hesse, 07 Rhineland-Palatinate, 08 Baden-Württemberg
- 09 Bavaria, 10 Saarland, 11 Berlin, 12 Brandenburg
- 13 Mecklenburg-Western Pomerania, 14 Saxony, 15 Saxony-Anhalt, 16 Thuringia
- 99 Federal government
These may be followed by one digit for the administrative region (for the federal government, a classification code), two digits for the district and three, four or seven digits for the municipal association and municipality.
Fine addressing
Fine addressing is optional and distinguishes offices within an authority, for example departments with their own invoice processing. It consists of up to 30 letters and digits. Upper and lower case make no difference. Each federal government or state body defines its structure itself.
Check digits
The check digits consist of two digits and, as with the IBAN, are calculated from the coarse and fine addressing using ISO/IEC 7064 (Modulo 97-10). They detect typing errors before an invoice goes nowhere.
Leitweg-ID: examples
| Leitweg-ID | Meaning |
|---|---|
| 04011000-1234512345-06 | Example from the KoSIT specification: Bremen, fine addressing 1234512345 |
| 991-33333TEST-33 | Federal government example for an authority of the direct federal administration |
| 992-90009-96 | Deutsche Bahn's Leitweg-ID for all DB companies |
This is how KoSIT calculates the check digits for the first example:
- Take the coarse addressing: 04011000
- Append the fine addressing without a hyphen: 1234512345. Letters would be replaced by numbers, A = 10, B = 11 to Z = 35.
- Append two zeros: 04011000123451234500
- Divide by 97: the remainder is 92.
- Subtract the remainder from 98: 98 minus 92 gives the check digits 06.
To verify, calculate the complete ID without hyphens modulo 97. If the remainder is 1, the Leitweg-ID is syntactically valid. The check digits do not tell you whether it is also registered with a platform.
What do 991, 992 and 993 mean?
For federal recipients, the coarse addressing shows how invoices are accepted:
- 991: direct federal administration or constitutional body, receipt via the OZG-RE
- 992: indirect federal administration, receipt via the OZG-RE
- 993: indirect federal administration with its own solution outside the OZG-RE
There is one well-known exception: Deutsche Bahn uses 992-90009-96 but is not connected to the OZG-RE. Invoices to DB are sent by email or Peppol, see XRechnung to Deutsche Bahn: requirements. The article ZRE and OZG-RE: sending XRechnung to the federal government explains how to send to the OZG-RE.
Finding the Leitweg-ID: how to get the right ID
- Check the contract or purchase order: Public contracting authorities are obliged to give you the Leitweg-ID during the purchasing or procurement process. It is usually stated in the purchase order, contract or letter of award.
- Ask the contracting authority: If the ID is missing, ask your contact person or the authority's invoicing office.
- Use the OZG-RE directory: The web entry of the OZG-RE includes a directory of connected Leitweg-IDs. Even so, use the ID from the order, because an authority may have several Leitweg-IDs for different areas.
- For state authorities: KoSIT lists the issuing offices of the federal states in its overview of the states' implementation status.
Is your customer a private company? Then there is usually no Leitweg-ID. The field remains empty or contains a reference specified by the customer, for example a supplier number.
Where does the Leitweg-ID go in the XRechnung?
The Leitweg-ID belongs exclusively in BT-10, the buyer reference (BuyerReference in the syntax). The purchase order number belongs in BT-13 and a project number in BT-11. When sending via Peppol, the Leitweg-ID appears twice: as the recipient ID with a prefix, for example 0204:991-33333TEST-33, and also in BT-10 of the invoice. If it is missing from BT-10, the OZG-RE rejects the invoice.
Typical errors with the Leitweg-ID
- Hyphens in the wrong place or spaces before or after the ID. According to the federal government, this is a common cause of the message "Leitweg-ID ist nicht valide" (Leitweg-ID is not valid).
- Purchase order number in BT-10 instead of BT-13. The invoice then cannot be assigned.
- Wrong ID for an authority with several Leitweg-IDs, for example from an old order or a different area.
- Made-up Leitweg-ID of your own, even though the recipient has not issued one.
- Typing error in the check digits. The modulo 97 check reveals it.
- Leitweg-ID only in the Peppol envelope, but not in BT-10.
If a correctly entered ID is still rejected, clarify this with the contracting authority. It can pass the problem on to the responsible office; for the federal government, that is the Zentrales Finanzwesen des Bundes (central federal finance service). Further rejection reasons relating to the buyer reference are described in the article XRechnung rejected: Leitweg-ID and buyer reference.
Distinguishing terms: DUNS number, X.400 and ZUGFeRD
Terms that mean something else often come up in connection with the Leitweg-ID.
DUNS number
The DUNS number is a nine-digit company identifier issued by Dun & Bradstreet. It identifies companies in supplier master data and international business relationships. It is not a tax number and not an address for e-invoices to public authorities. It has no place in BT-10.
X.400
X.400 is an older standard for message transport that used to be common mainly in public authorities and large organisations. It describes the transport channel, not the invoice format. It no longer plays a role for invoices to the federal government: the OZG-RE accepts invoices via web entry, upload, email and Peppol.
ZUGFeRD
ZUGFeRD is a hybrid invoice format consisting of a PDF with embedded XML. For the federal government, other formats besides XRechnung are also permitted if they comply with EN 16931 and the E-Rechnungsverordnung (E-Invoicing Ordinance), for example ZUGFeRD 2.2.0 in the XRECHNUNG profile as a pure XML file. In that case, too, the Leitweg-ID goes in BT-10.
Leitweg-ID in faktoora
When you create an invoice in faktoora, the form asks for the Leitweg-ID and writes it into the designated reference field. Every invoice is validated against EN 16931 and XRechnung before it is sent. Find out more on the page Creating e-invoices.
Frequently asked questions
What is a Leitweg-ID?
The electronic address of a public-sector invoice recipient. In an XRechnung, it goes in field BT-10 and routes the invoice to the right office in the public administration.
Where can I find the Leitweg-ID?
In the order, purchase order or contract from the public contracting authority. If it is missing, ask your contact person. The directory in the OZG-RE helps you find your way, but the ID from the order is what counts.
Do I need my own Leitweg-ID as a company?
No. Invoice issuers do not need a Leitweg-ID, not even for the e-invoicing obligation in the B2B sector.
What is a DUNS number?
A nine-digit company identifier from Dun & Bradstreet used for master data. It replaces neither the Leitweg-ID nor a Peppol ID.
Is X.400 an e-invoicing format?
No. X.400 is a transport standard. The invoice format is, for example, XRechnung or ZUGFeRD.