Attestwire › Rule reference › BR-CL-21
BR-CL-21 An item standard identifier scheme must be an ISO 6523 ICD code
noun · EN 16931 · fatal · BT-157
For a sample invoice, the library reports: Line 1 declares the item standard identifier scheme "9930" (BT-157-1), which is not in the ISO 6523 ICD list.
- 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, "0060" for a D-U-N-S-based one. If your identifier is not from a registered scheme, move it to line.sellerItemId (BT-155), which needs no scheme.
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-CL-21",
"field": "BT-157",
"severity": "fatal",
"message": "Line 1 declares the item standard identifier scheme \"9930\" (BT-157-1), which is not in the ISO 6523 ICD list. Note that the scheme here is an ICD code, not the name of the numbering system: \"GTIN\", \"EAN\" and \"UPC\" all fail, however unambiguous they read, because the attribute holds a registry code rather than a label. BR-64 checks that a scheme is present at all; this rule checks that the one you gave exists.",
"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, \"0060\" for a D-U-N-S-based one. If your identifier is not from a registered scheme, move it to line.sellerItemId (BT-155), which needs no scheme.",
"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-CL-21"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.