Provide exactly one country identifier

Error FX-SCH-A-000896 Factur-X

Element 'ram:CountryID' must occur exactly 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:CountryID does not occur exactly once in ram:PostalTradeAddress. The element is either missing or occurs more than once.

What the rule means

ram:CountryID identifies the country of the postal address. Requiring exactly one element associates a single country identifier with the address.

Please provide exactly one country identifier for the postal address

ram:CountryID is missing or occurs more than once in the invoicer’s postal address. You can adjust the number of elements in the invoice.

What to do
  1. Open ram:PostalTradeAddress under InvoicerTradeParty.
  2. Make sure the postal address contains exactly one ram:CountryID element.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress/>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
Technical details

The test counts the child elements ram:CountryID in ram:PostalTradeAddress and requires a count of 1.

Where the rule applies

The rule applies to the invoicer’s postal address under InvoicerTradeParty.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:InvoicerTradeParty/ram:PostalTradeAddress
Test expression (assert/@test)
count(ram:CountryID)=1