Leitweg-ID — federal addressing of B2G invoices
The Leitweg-ID is the structured identification scheme used by the German public administration to route electronic B2G invoices between receiving platforms. Registered as ICD 0204 in the PEPPOL registry, it is the functional equivalent of the Belgian service code or the Italian Codice Destinatario.
Origin and legal basis
The Leitweg-ID was born from the need to disambiguate routing of electronic invoices to Germany's ~30,000 public administrative entities (federal ministries, Länder administrations, municipalities, public hospitals, universities, public agencies). Directive 2014/55/EU does not impose any addressing scheme, each Member State had to define its own.
- Specification: XÖV standard (XML in der öffentlichen Verwaltung) maintained by the Geschäftsstelle XÖV at BMI. Current version: XBesteAdresse 2.0.1 (updated January 2024).
- Federal legal basis: §4 ERechV (E-Rechnungsverordnung of 13 October 2017) — obligation for any federal administration receiving invoices to publish a valid Leitweg-ID.
- Länder legal basis: regional decrees enacted successively (Bremen April 2020, Hamburg May 2020, Bavaria April 2023, etc.).
- PEPPOL registration: 19 May 2020, OpenPEPPOL ICD code registry
0204 — Leitweg-ID (Direct Routing Identifier).
Grammar of the 11 characters
A minimal Leitweg-ID is 11 characters long. It can extend up to 46 characters with an optional Feinadressierung to reach a service or section within a large administration.
Leitweg-ID = Grobadressierung "-" Feinadressierung "-" Pruefziffer
Grobadressierung ::= 1 digit Bund/Land + 10 digits administration
Feinadressierung ::= 0 to 30 alphanumeric chars (internal section)
Pruefziffer ::= 2 check digits (modulo 97 ISO 7064 algorithm)
Bund / Land codes (1st digit of Grobadressierung):
0 = Bundesebene (federal administration)
1 = Bayern 9 = Saarland
2 = Berlin 10 = Sachsen
3 = Brandenburg 11 = Sachsen-Anhalt
4 = Bremen 12 = Schleswig-Holstein
5 = Hamburg 13 = Thüringen
6 = Hessen 14 = Baden-Württemberg
7 = Mecklenburg-Vorpommern 15 = Niedersachsen
8 = Nordrhein-Westfalen 16 = Rheinland-Pfalz
Examples:
04011000-12345-67 (Bremen, Senator for Finance, section 12345)
991-12345-92 (Federal level, ministry 12345)
8112345-001-22 (NRW, Düsseldorf, IT department 001) - Grobadressierung (10 characters) — identifies the public authority at organisational level. First character = Bund code (0) or Land code (1-16), followed by 9 characters encoding the specific administration (ministry, municipality, etc.) per rules specific to each Land.
- Feinadressierung (0 to 30 characters, optional) — identifies a subsection, service, project or cost-center. Enables internal routing within large administrations. Free encoding (digits + letters), no semantics imposed by KoSIT.
- Prüfziffer (2 characters) — mandatory check digits computed on the concatenation Grobadressierung + Feinadressierung. Detects common entry errors (transposition, omission of a character).
Prüfziffer (check digit) algorithm
The 2 check digits use the ISO 7064 MOD 97-10 algorithm, identical to the one used for European banking IBANs. A proven choice that detects 100% of simple errors (one wrong character) and 99.8% of pair transpositions.
- Concatenate Grobadressierung + Feinadressierung (no separators, no existing Prüfziffer).
- Encode as digits: letters A-Z become 10-35 (A=10, B=11, ..., Z=35), digits remain unchanged.
- Multiply by 100 and apply modulo 97.
- Prüfziffer = 98 - (result mod 97). If the result is < 10, prefix with '0' to keep 2 characters.
This algorithm is implemented in the KoSIT validator (itplr-kosit/leitweg-id
separate repo) and reproducible in ~20 lines of code in any language.
PEPPOL ICD 0204 registration
The ICD 0204 code in the OpenPEPPOL registry makes the Leitweg-ID a cross-border identifier usable from abroad via PEPPOL access points. A major strategic advantage for non-German businesses invoicing German public administrations.
<!-- UBL 2.1: EndpointID used to address the B2G recipient -->
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0204">04011000-12345-67</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Senator für Finanzen Bremen</cbc:Name>
</cac:PartyName>
</cac:Party>
</cac:AccountingCustomerParty>
<!-- The BuyerReference field (BT-10) duplicates this info as free text -->
<cbc:BuyerReference>04011000-12345-67</cbc:BuyerReference> - ICD schema:
iso6523-actorid-upis::0204:{Leitweg-ID}identifies the recipient in the PEPPOL SML (Service Metadata Locator) network. - Compatible access points: all certified OpenPEPPOL operators (B2Brouter, Pagero, Tradeshift, EDICOM, Storecove, Doc Process, Symtrax, etc.).
- Discovery via PEPPOL SMP: each referenced German public entity declares its capabilities (UBL/CII formats, accepted profiles) in its Service Metadata Publisher attached to ICD 0204.
Public registry and obtention
The registry of valid Leitweg-IDs is publicly browsable through the XBesteAdresse portal operated by the Geschäftsstelle XÖV. Each public administration registers its own Leitweg-ID upon commissioning its reception point.
- Search portal:
https://leitweg-id.bund.de/(free consultation, search by administration name or prefix). - Registration request: via the federal Bund webportal for federal administrations, or via the Geschäftsstelle XÖV of the Land for regional administrations.
- No public automated resolution API to date — recipient discovery relies on the international PEPPOL SML.
- Validity period: indefinite. A Leitweg-ID can be flagged as deprecated (status "obsolet") if the administrative entity ceases to exist.
B2B usage (optional, not mandatory)
Since the B2B extension under the Wachstumschancengesetz, several ERP vendors have proposed extending Leitweg-ID usage to B2B. The BMF letter of 15 October 2024 is clear: the Leitweg-ID remains a B2G identifier, not a universal B2B scheme.
- For B2B, the recommended identifiers are:
-
schemeID="9930"— DE:USTID (Umsatzsteuer-Identifikationsnummer, intracom VAT number). -
schemeID="0088"— GLN (Global Location Number, GS1). -
schemeID="EM"— Email address. -
schemeID="0007"— DE:CRN (HRB / HRA Handelsregisternummer).
-
- Voluntary use possible. A private business may request a Leitweg-ID to benefit from a unique cross-border identifier ICD 0204 in PEPPOL, but it is neither required nor recommended.