Skip to content

Error

FX-SCH-A-000321: The buyer's agent can have only one role code

In short

Error: fails the selected checks.

FX-SCH-A-000321 means the buyer's agent (ram:BuyerAgentTradeParty) contains more than one ram:RoleCode. Keep the correct role code and remove duplicate or unnecessary entries, then export and recheck the file.

On this page

What it means

In the Extended profile of Factur-X and ZUGFeRD, each ram:BuyerAgentTradeParty under ram:ApplicableHeaderTradeAgreement may contain zero or one ram:RoleCode. This test checks the number of role code elements in that party block, not their values or role codes elsewhere.

Why it matters

The profile provides at most one role code field within each buyer's agent block.

How to fix it

Check the role recorded for the buyer's agent in your invoice data. If you edit the XML, keep at most one ram:RoleCode inside each ram:BuyerAgentTradeParty. Remove duplicates and retain only the role that applies to that agent. Export and recheck the file.

Once the file is corrected, check it again for free: Validate a ZUGFeRD invoice

Or fix the invoice in a form and download the corrected file, for 1 credit: Fix a rejected e-invoice Beta

The rule as published

Element 'ram:RoleCode' may occur at maximum 1 times.

Where this rule applies

Rule set Version
Factur-X 1.09 EXTENDED 1.0.9-2
ZUGFeRD 2.5 EXTENDED 2.5.2
Rule text from phive-rules 4.6.4.

Check your file

Drop your e-invoice to see whether FX-SCH-A-000321 still fails, and which other rules do.

Updated 6 November 2026