Rule reference

BR-CL-14 The seller country code (BT-40) must be an ISO 3166-1 alpha-2 code, but "UK" is not in the list

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.

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-40
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-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 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
"countryCode": "DE"

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.

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