ram:ID must occur exactly once

Error FX-SCH-A-001001 Factur-X

Element 'ram:ID' 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:ID is missing from ram:SpecifiedTaxRegistration or occurs more than once. The check requires exactly one ram:ID.

What the rule means

The payee’s tax registration must be represented by exactly one identifier so that the information is unambiguous.

Please provide the payee’s tax registration identifier exactly once

The payee’s tax registration does not contain exactly one ram:ID element. You can adjust the XML accordingly.

What to do
  1. Locate ram:SpecifiedTaxRegistration within ram:PayeeTradeParty.
  2. Check how many times ram:ID occurs in it.
  3. Ensure that it contains exactly one ram:ID.
  4. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTaxRegistration/>
✓ Correct
<ram:SpecifiedTaxRegistration>
  <ram:ID>...</ram:ID>
</ram:SpecifiedTaxRegistration>
Technical details

The XPath test counts the direct ram:ID elements within ram:SpecifiedTaxRegistration and requires the count to be 1.

Where the rule applies

The rule applies to the payee’s tax registration (ram:SpecifiedTaxRegistration) within ram:PayeeTradeParty.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradePaymentTerms/ram:PayeeTradeParty/ram:SpecifiedTaxRegistration
Test expression (assert/@test)
count(ram:ID)=1