Attestwire › Rule reference › BR-01
BR-01 An invoice must state its specification identifier
noun · EN 16931 · fatal · BT-24
the line that says which rules the invoice follows.
The invoice file does not say which specification it follows. That identifier, field BT-24, is how a receiver knows whether to judge the document as plain EN 16931, as XRechnung or as Peppol, so a file without it has nothing to be routed or validated against.
- Business term
BT-24— Specification identifier- Severity
fatal
The fix
Write the identifier your receiver expects into BT-24: urn:cen.eu:en16931:2017 for core EN 16931, or the XRechnung or Peppol value. If you generate the XML with this library, choose the profile and the generator writes BT-24 for you.
What the rule requires
In UBL the specification identifier is cbc:CustomizationID; in CII it is the ID inside GuidelineSpecifiedDocumentContextParameter. For core EN 16931 the value is urn:cen.eu:en16931:2017. XRechnung and Peppol each have their own longer value that starts with it.
This rule fires when the input records that a document stated no BT-24, which is what parseUbl and parseCiiInvoice do for a file without it. An invoice you build and generate with this library always carries BT-24, because the generator writes it from profile.
When the file states none, the library validates it against core EN 16931 as a fallback and says so in the finding. The xpath in the finding is the UBL location, cbc:CustomizationID; in CII the same field is the ID of GuidelineSpecifiedDocumentContextParameter.
An older build of @attestwire/en16931 used the id BR-01 for a missing invoice number, which is a different rule. If that is the error you have, the rule you want is BR-02.
An Invoice shall have a Specification identifier (BT-24).
Why it exists
The same XML can be a valid EN 16931 invoice and an invalid XRechnung, because XRechnung adds rules on top. A receiver reads BT-24 first to decide which set of rules to run, so a document that does not state it cannot be checked the way its sender meant.
What the library returns
The full error returned by @attestwire/en16931. It includes the rule ID,
affected field and suggested correction. Developers can use this object in their application:
{
"rule": "BR-01",
"field": "BT-24",
"severity": "fatal",
"message": "This document has no specification identifier (BT-24: cbc:CustomizationID in UBL, the GuidelineSpecifiedDocumentContextParameter ID in CII). It is what names the rules the invoice follows, EN 16931 core, XRechnung or Peppol, and a receiver routes and validates on it. It was validated here against the core EN 16931 profile as a fallback.",
"fix": "State BT-24, e.g. \"urn:cen.eu:en16931:2017\" for core EN 16931, or the XRechnung or Peppol identifier your receiver expects.",
"xpath": "/ubl:Invoice/cbc:CustomizationID",
"docsUrl": "https://attestwire.com/rules/BR-01"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.
See also: BR-02 — an invoice must have an invoice number.