Leitweg-ID Explained for XRechnung
Understand the Leitweg-ID in XRechnung: its structure, where to obtain it and common mistakes when invoicing German public authorities.
Anyone who invoices public clients in Germany as a company can hardly avoid the Leitweg-ID. It is the address of your invoice in the digital administrative structure - incorrect or missing, and the XRechnung does not end up with the correct clerk or is automatically rejected. Nevertheless, many suppliers do not know exactly what the Leitweg-ID means, where to get it and how to enter it in the XRechnung.
This article explains the Leitweg-ID in an understandable and practical way: structure, meaning, use in the invoice and typical errors. In addition: What is an XRechnung?, Create XRechnung and the overview E-Invoicing.
What is the Leitweg-ID?
The Leitweg-ID (Leitweg-Identification Number) is a unique identifier for recipients of invoices in the public sector in Germany. It not only identifies the authority, but often also organizational unit, location or cost center - depending on how the client maps its structure.
Short definition
| aspect | explanation |
|---|
| Purpose | Assignment of the e-invoice in the recipient system |
| Format | alphanumeric structure with hyphens (official scheme) |
| duty | at XRechnungen to public clients |
| Source | is assigned by the client - not invented by himself |
Without a correct Leitweg-ID, a technically perfect XRechnung cannot be processed - comparable to a postal address without a house number.
Why is there a Leitweg-ID?
Authorities and public institutions receive many invoices every day. Mailboxes and manual distribution used to help. With electronic invoice receipt platforms (ZRE, OZG-RE, state portals), every invoice must be automatically assigned to the correct location.
Leitweg-ID solves several problems at once:
- Clarity - no confusion between offices in the same city
- Automation – Routing without manual input
- Traceability – Audit trail in the portal
- Standardization – uniform field in XRechnung and Peppol
For you as the invoice issuer, the Leitweg-ID is therefore a mandatory field - not an optional meta tag.
Structure of the Leitweg-ID
The Leitweg-ID follows a fixed scheme. A typical example (fictional):
991-12345-67-AB
Components (explained in simple terms)
| Segment | Meaning (orientation) |
|---|
| First segment | often state/level |
| Other segments | Authority, organization, possibly subunit |
| Last segment | Check digit or distinguishing feature |
The exact structure is defined in the XRechnung specification and administrative guidelines. As a user, you do not have to calculate the ID yourself - you take it over 1:1 from the client.
Important: No spaces, no personal additions, no “approximate” ID from the Internet. Always use the ID confirmed by the contractual partner.
Where do you get the Leitweg-ID?
The Leitweg-ID is communicated by the public client. Typical sources:
1. Procurement documents and tender
In PDF documents, conditions of participation or FAQ of the tender.
2. Contract and order
As a field in the order or in the framework contract - sometimes next to the postal address.
3. Authority website
Many municipalities and states publicly list routing IDs for invoice recipients.
4. Contact person for processing
If nothing is found: ask in writing (email with contract/order number).
5. Invoice receipt portal
After registration, some portals show the relevant ID for your process.
What you shouldn't do
- “Use” ID from other department
- ID from older invoices without comparison with current order
- ID guess or copy from forums
If in doubt: ask. A delayed invoice due to a query is cheaper than rejection and a new issue.
Enter the Leitweg-ID in the XRechnung
In the XRechnung (CII-XML) the Leitweg-ID is assigned to the buyer / recipient - technically in the area of the buyer reference or endpoint ID depending on the profile and transmission route.
Practical in software
- Create customer “Authority XY”.
- Fill in the Leitweg-ID field (or “Endpoint ID” / “Buyer reference”)
- Automatically apply to this authority for every invoice
- Validate before export
Instructions in detail: Create XRechnung: Instructions for companies.
Difference to normal customer number
Your internal customer number in Quotavo or ERP is for you - the Leitweg-ID is for the authority system. Both can exist in parallel; only the Leitweg-ID controls the routing of the e-invoice.
Leitweg-ID and Peppol
When submitted via Peppol, the Leitweg-ID is often used as the Peppol endpoint or in the buyer reference field. Not every authority uses Peppol - many work with ZRE or OZG-RE.
| Transmission | Leitweg-ID role |
|---|
| ZRE / OZG-RE | Mandatory information in XRechnung |
| Peppol | Endpoint addressing as specified |
| Authorities portal | often upload with embedded ID in XML |
Clarification with the client: Portal or Peppol? – then set the Leitweg-ID in the correct context.
Common errors with Leitweg-ID
Typos and formatting errors
One wrong character is enough for rejection. Check copy-paste from PDF - sometimes hyphens are inserted into dashes or spaces.
Outdated Leitweg-ID
Authority reforms, merging offices or new portals can bring new IDs. Old ID from last year is not automatically valid.
Wrong department
Same city, wrong office – a classic mistake in large administrations.
Leitweg-ID for B2B customers
Private business customers have no Leitweg-ID. Leave the field blank or use ZUGFeRD without Leitweg-ID – see ZUGFeRD.
Missing ID despite government order
Never send without ID “in hope”. Invoice is not assigned.
Leitweg-ID vs. other reference numbers
There are several numbers in an invoice - avoid confusion:
| field | Example | Purpose |
|---|
| Leitweg-ID | 991-12345-67-AB | Recipient Routing Authority |
| Order number | B-2026-8891 | Relation to the order |
| Contract number | RV-2024-15 | Framework agreement |
| Invoice number | RE-2026-0042 | Your outgoing invoice |
| Cost center (customer) | 4100-IT | internally at the client |
All can appear in an XRechnung - they have different functions. Leitweg-ID does not replace the order number.
Practical workflow: Leitweg-ID from start to finish
When placing an order
- Save Leitweg-ID in CRM/ERP for the customer
- Link in project folder or ticket
- Inform team: “Only bill with this ID”
When creating an invoice
- Select recipient → Leitweg-ID is prefilled
- Visual inspection against order
- Write invoice and export XRechnung
After shipping
- Archive portal confirmation
- If rejected: Check error log for Leitweg-ID
- If the customer changes organization: update master data
Multiple route IDs per client
Large authorities have dozens of IDs – per department, location or budget. Rule:
- Use the provided ID per contract/order
- Not “the main city ID” for all projects
Internal management table (example):
| Project | Authority | Leitweg-ID | Contact person |
|---|
| IT Maintenance 2026 | City pattern | 991-11111-22-AA | Ms. Schmidt |
| School construction phase 2 | City pattern | 991-11111-33-BB | Mr. Müller |
Routing ID and B2B e-invoicing requirement
The Leitweg-ID is specific for the public sector in Germany. The general e-invoicing requirement in B2B (from 2025/2027, with transition periods) affects private business customers - there the Leitweg-ID does not play a role; Formats like ZUGFeRD are relevant there.
If you serve both government and B2B customers, you need two processes:
Software support
Good invoicing software stores the Leitweg-ID at the customer base and writes it correctly into each XRechnung XML. Mandatory fields:
- Validation before export
- Separate customer profiles (government vs. B2B)
- Archiving the XML with included ID
Quotavo and similar tools reduce the risk of manual transmission errors.
Leitweg-ID checklist
Before every government invoice:
Frequently asked questions
Can an authority have multiple route IDs?
Yes, very often – per organizational unit.
What happens if the Leitweg-ID is incorrect?
Automatic rejection or stuck in the portal without assignment - payment delayed.
Does the Leitweg-ID have to be on the PDF?
The relevant body is the XRechnung-XML. An accompanying PDF may contain the ID for readability - but does not replace the XML field.
Where can I find help if my ID is unclear?
First the processing of the order, then the authority's invoice receipt office. General information: FAQ.
Connection with other mandatory fields
The Leitweg-ID is one building block among many in the XRechnung:
- Seller-USt-IdNr.
- correct tax rates
- Order reference
- Payment information (IBAN)
Everything has to be correct - the ID alone is not enough.
Conclusion
The Leitweg-ID is the key to ensuring your bill gets to the right place in the public sector. It is assigned by the client, entered unchanged in the XRechnung and checked before each shipment. Errors can be avoided through clean master data, copy-paste control and appropriate invoicing software.
Anyone who works with authorities should maintain Leitweg-ID from the first contract - parallel to the XRechnung process and portal access. For B2B without a connection to the authorities, the Leitweg-ID is not required; There you can refer to ZUGFeRD and E-Invoicing. If you are unsure about your obligations: seek legal advice and look for further answers in the FAQ.