BR-CL-21 A line declares the item standard identifier scheme "9930" (BT-157-1), which is not in the ISO 6523 ICD list
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.
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:
{
"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 locates the element in the generated UBL document,
which is where a KoSIT or Peppol validator will report the same problem.
A passing value
"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, "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.