Invalid scheme code for the seller’s legal identifier

Error FX-SCH-A-000581 Factur-X

Value of '@schemeID' is not allowed.

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

The value of the schemeID attribute in ram:ID is neither empty nor included in the designated code list.

What the rule means

The scheme code identifies the system or type of the seller’s legal identifier. An allowed code enables this identifier to be interpreted consistently.

Please check the scheme code for the seller’s legal identifier

A scheme code is specified for the seller’s legal identifier, but it does not match the designated code list. You can adjust the value in ram:ID or leave the attribute empty.

What to do
  1. Check the value of the schemeID attribute in ram:ID under ram:SpecifiedLegalOrganization.
  2. Use a value included in the designated code list or leave the attribute empty.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedLegalOrganization>
  <ram:ID schemeID="NOT-A-CODE">123456</ram:ID>
</ram:SpecifiedLegalOrganization>
✓ Correct
<ram:SpecifiedLegalOrganization>
  <ram:ID schemeID="">123456</ram:ID>
</ram:SpecifiedLegalOrganization>
Technical details

The test accepts an empty value or a value present in the code list identified as 16.

Where the rule applies

The rule applies to the schemeID attribute of ram:ID within the seller’s ram:SpecifiedLegalOrganization.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:ID
Test expression (assert/@test)
string-length($codeValue16)=0 or document('FACTUR-X_EN16931_codedb.xml')/codedb/cl[@id=16]/enumeration[@value=$codeValue16]