Attestwire › Rule reference › BR-64
BR-64 An item standard identifier needs a scheme identifier
noun · EN 16931 · fatal · BT-157
For a sample invoice, the library reports: Line 1 carries an item standard identifier (BT-157) of "04012345678901" with no scheme identifier (BT-157-1).
- Business term
BT-157- Severity
fatal
The fix
Set line.standardItemId.schemeId to the ISO 6523 ICD code of the registry — "0160" for a GTIN, "0088" for a GLN-based article number. Use line.sellerItemId (BT-155) or line.buyerItemId (BT-156) instead if the code is your own rather than a registered one.
A passing value
"standardItemId": { "schemeId": "0160", "value": "04012345678901" }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-64",
"field": "BT-157",
"severity": "fatal",
"message": "Line 1 carries an item standard identifier (BT-157) of \"04012345678901\" with no scheme identifier (BT-157-1). A standard identifier is only \"standard\" relative to a registry: the same digits can be a GTIN, a national article number or a manufacturer's own code, and the receiver has no way to look the item up — or to detect that it has looked up the wrong one — without being told which registry to ask. EN 16931 therefore makes the scheme mandatory whenever the identifier is present, and the UBL binding asserts the @schemeID attribute directly.",
"fix": "Set line.standardItemId.schemeId to the ISO 6523 ICD code of the registry — \"0160\" for a GTIN, \"0088\" for a GLN-based article number. Use line.sellerItemId (BT-155) or line.buyerItemId (BT-156) instead if the code is your own rather than a registered one.",
"example": "\"standardItemId\": { \"schemeId\": \"0160\", \"value\": \"04012345678901\" }",
"xpath": "/ubl:Invoice/cac:InvoiceLine[1]/cac:Item/cac:StandardItemIdentification/cbc:ID/@schemeID",
"docsUrl": "https://attestwire.com/rules/BR-64"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.