Rule reference

BR-64 A line carries an item standard identifier (BT-157) of "04012345678901" with no scheme identifier (BT-157-1)

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.

This rule is implemented and its error payload below is real, but the long-form write-up — normative text, worked example, divergence note — is not written yet. Everything the library knows about this rule is on this page. Ask and we will prioritise it.

Business term
BT-157
Severity
fatal

What the library returns

The exact object in result.errors when this rule fires. Generated by running @attestwire/en16931, not transcribed:

TeachingError
{
  "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 locates the element in the generated UBL document, which is where a KoSIT or Peppol validator will report the same problem.

A passing value

the shape this field expects
"standardItemId": { "schemeId": "0160", "value": "04012345678901" }

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.

Arrived from a stack trace? The docsUrl on every error links straight here. Something wrong on this page — tell us.