UBL-CR-665:A UBL invoice should not include the AdditionalDocumentReference ID schemeID unless the DocumentTypeCode equals '130'
This UBL element should not be present in an EN16931 invoice. It is allowed in full UBL 2.1 but not in the EN16931 subset.
Engine Classification
Remove schemeID attribute from non-invoiced-object document references
Confidence: 90% · Applied automatically in pipeline
What is UBL-CR-665?
UBL-CR-665 is a warning validation rule defined in the EN16931 specification. It validates the @schemeID element under ID in the UBL invoice XML.
This is a soft validation failure. The invoice may pass initial transmission, but non-compliant values in this field can cause problems during tax audits, buyer-side processing, or downstream VAT reconciliation.
Target path: //cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode='130')]/cbc:ID/@schemeID
Why This Error Matters
Invoice will be rejected by EN16931 validators. These conformance rules prohibit UBL attributes and element combinations not in the EN16931 e-invoicing profile. Remove the disallowed attribute or restructure the element.
UBL-CR-665 is a soft failure. The invoice may pass initial validation, but the non-compliant field can cause issues at the receiving end — tax authorities may flag it during audits, buyer ERP systems may fail to process it, or VAT reconciliation may produce mismatches. Fixing warnings before they accumulate prevents larger compliance gaps.
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
- ·Generates validation warning
- ·Fails EN 16931 business rule validation
- ·Error returned: UBL-CR-665
- ·Specification: EN16931
XML Example
Generic example based on the rule's target XPath. Your actual XML structure may differ.
<!-- Triggers validation error --> <@schemeID></@schemeID>
<!-- Corrected --> <@schemeID>VALID_VALUE</@schemeID>
Technical Reference
//cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode='130')]/cbc:ID/@schemeIDCommon Causes
- ·AdditionalDocumentReference ID has schemeID for wrong type
- ·cbc:ID/@schemeID only allowed when DocumentTypeCode=130
- ·Scheme identifier on non-object-identifier reference
- ·SchemeID reserved for invoice object identifiers only
- ·ERP exports scheme ID on regular attachments
Seeing this in production? The API handles UBL-CR-665 automatically. See the fix response →
See Also
Last updated: 21 February 2026
Handle UBL-CR-665 Automatically in Your Pipeline
The compliance engine auto-remediates this error with controlled safety policies and evidence pack generation.