UBL-CR-126:A UBL invoice should not include the AdditionalDocumentReference Attachment...
Fix: Invoice Navigator automatically removes the disallowed `cbc:FormatCode` element from your Invoice. Upload your invoice to fix this automatically.
Your invoice contains AdditionalDocumentReference/Attachment/External/FormatCode which is not allowed in EN16931 invoices.
Engine Classification
Remove disallowed UBL element per EN16931 specification
Confidence: 95% · Applied automatically in pipeline
What is UBL-CR-126?
UBL-CR-126 is a fatal validation rule defined in the UBL 2.1 specification. It validates the FormatCode element under Attachment > ExternalReference in the UBL invoice XML.
When this rule fires, the invoice is rejected by Peppol access points and never reaches the buyer.
Target path: /Invoice/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:FormatCode
Why This Error Matters
Invoice will be rejected by PEPPOL/EN16931 validators. Safe to remove - this element is explicitly prohibited and contains no required business data.
UBL-CR-126 is a hard failure — the invoice must be corrected and re-sent before it can reach the recipient.
Invoice Navigator can automatically correct this error in your pipeline. The fix is applied with full audit evidence, so your compliance trail remains intact.
Validator Behavior
- ·Causes invoice rejection
- ·Fails UBL schema validation
- ·Error returned: UBL-CR-126
- ·Specification: UBL 2.1
How to Fix It
Locate the disallowed element
Open your invoice XML and find cbc:FormatCode at /Invoice/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:FormatCode. This element is not permitted in the target e-invoice profile and triggers UBL-CR-126.
Remove cbc:FormatCode
Delete the entire cbc:FormatCode block and its child elements. Invoice Navigator automatically removes the disallowed `cbc:FormatCode` element from your Invoice.
Re-validate your invoice
Upload the corrected invoice to confirm UBL-CR-126 is resolved. If your software consistently adds this element, contact your vendor about their e-invoice export settings.
Before / After
<cac:ExternalReference> <cbc:FormatCode>value</cbc:FormatCode> </cac:ExternalReference>
<cac:ExternalReference> <!-- cbc:FormatCode removed for EN 16931 compliance --> </cac:ExternalReference>
Technical Reference
/Invoice/cac:AdditionalDocumentReference/cac:Attachment/cac:ExternalReference/cbc:FormatCodeCommon Causes
- ·Source ERP exports full UBL 2.1 instead of EN16931 subset
- ·Generic UBL template includes optional elements not needed for e-invoicing
- ·Conversion from another format added unsupported elements
- ·Manual XML editing introduced non-standard elements
- ·Invoice software not configured for EN16931 compliance
Seeing this in production? The API handles UBL-CR-126 automatically. See the fix response →
Frequently Asked Questions
Your invoice contains AdditionalDocumentReference/Attachment/External/FormatCode which is not allowed in EN16931 invoices.
Invoice Navigator automatically removes the disallowed `cbc:FormatCode` element from your Invoice. You can also use Invoice Navigator's compliance engine to correct this automatically in your pipeline.
Yes, UBL-CR-126 is a critical error that will cause invoice rejection. It must be fixed before submission.
Many instances of UBL-CR-126 can be automatically corrected using Invoice Navigator's compliance engine. The fix is applied in your pipeline with full audit evidence.
Related Content
Last updated: 14 April 2026
Validate your invoice
Drop your XML here to check for UBL-CR-126
Auto-fix UBL-CR-126 in seconds
Upload your invoice and we fix this error automatically. Financial fields are never touched.