Validation rules
UBL-SR-07
A cac:BillingReference is present but the preceding invoice number (BT-25, InvoiceDocumentReference/cbc:ID) is missing.
- Rule
UBL-SR-07— official EN 16931 / XRechnung rule- Severity
- error
- Business term
BT-25— Preceding invoice number- Field in your JSON
invoice.preceding_invoice- Detected by
- tier 3 — KoSIT validator (authoritative)
- Reachability
- Only reachable when validating your own XML — normbill-generated documents cannot trigger it
The serializer only emits BillingReference when invoice.preceding_invoice is set, always with its cbc:ID.
How to fix it
Add cbc:ID inside cac:InvoiceDocumentReference, or remove the empty BillingReference. Through normbill, set invoice.preceding_invoice.
UBL-SR-07 auf Deutsch — was bedeutet der Fehler?
Der KoSIT-Validator lehnt die Rechnung ab, weil eine cac:BillingReference vorhanden ist, aber die Nummer der Vorgängerrechnung (BT-25, InvoiceDocumentReference/cbc:ID) fehlt.
So beheben Sie den Fehler
Ergänzen Sie cbc:ID in cac:InvoiceDocumentReference — oder entfernen Sie die leere BillingReference. Über normbill setzen Sie invoice.preceding_invoice.
Official sources
- XRechnung specification (KoSIT / xeinkauf.de)
- KoSIT validator on GitHub and the XRechnung validator configuration
Every 422 from the API lists the rule id, the path in your request JSON, a plain-language message and a suggested fix — see the docs overview for the report format.