Attestwire › Rule reference › BR-CL-14
BR-CL-14 An address country code must be an ISO 3166-1 alpha-2 code
noun · EN 16931 · fatal · BT-40
For a sample invoice, the library reports: The seller country code (BT-40) must be an ISO 3166-1 alpha-2 code, but "UK" is not in the list. The United Kingdom is "GB" in ISO 3166-1 — "UK" is a reserved code and is not in the list.
- Business term
BT-40- Severity
fatal
The fix
Set seller.address.countryCode to the two-letter ISO 3166-1 code in upper case — "DE" Germany, "AT" Austria, "FR" France, "NL" Netherlands, "GR" Greece, "GB" United Kingdom.
A passing value
"countryCode": "DE"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-14",
"field": "BT-40",
"severity": "fatal",
"message": "The seller country code (BT-40) must be an ISO 3166-1 alpha-2 code, but \"UK\" is not in the list. The United Kingdom is \"GB\" in ISO 3166-1 — \"UK\" is a reserved code and is not in the list. This code drives place-of-supply, reverse-charge and intra-community logic downstream, so a code the receiver cannot resolve stops the invoice at the door.",
"fix": "Set seller.address.countryCode to the two-letter ISO 3166-1 code in upper case — \"DE\" Germany, \"AT\" Austria, \"FR\" France, \"NL\" Netherlands, \"GR\" Greece, \"GB\" United Kingdom.",
"example": "\"countryCode\": \"DE\"",
"xpath": "/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode",
"docsUrl": "https://attestwire.com/rules/BR-CL-14"
}
xpath is always a UBL path. On a CII invoice, look for the
matching CII field instead.