warningformatEN16931

UBL-CR-665:A UBL invoice should not include the AdditionalDocumentReference ID schemeID unless the DocumentTypeCode equals '130'

Fix: 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. Upload your invoice to fix this automatically.

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.

Severity
Warning
Rule set
EN16931
Country
All EU
Fix type
AUTO-FIX
Confidence
90%
Category
structural

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.

The invoice may pass transmission, but this non-compliance can cause problems during tax audits or buyer-side processing.

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 that can cause issues at the receiving end — tax audits, ERP processing, or VAT reconciliation mismatches.

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

How to Fix It

1.

Find the disallowed attribute

Check @schemeID at //cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode='130')]/cbc:ID/@schemeID. This attribute is not permitted in the target profile.

2.

Remove the attribute

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.

3.

Re-validate your invoice

Upload the corrected invoice to confirm UBL-CR-665 is resolved.

XML Example

Generic example based on the rule's target XPath. Your actual XML structure may differ.

Before
<!-- Triggers validation error -->
<@schemeID></@schemeID>
After
<!-- Corrected -->
<@schemeID>VALID_VALUE</@schemeID>

Technical Reference

XPath//cac:AdditionalDocumentReference[not(cbc:DocumentTypeCode='130')]/cbc:ID/@schemeID
SpecEN16931
Operationremove_attribute
StrategyRemove schemeID attribute from non-invoiced-object document references

Common 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 →

Frequently Asked Questions

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.

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. You can also use Invoice Navigator's compliance engine to correct this automatically in your pipeline.

UBL-CR-665 is a warning that may not always cause rejection, but indicates a compliance issue.

Many instances of UBL-CR-665 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

Share this guide:

Validate your invoice

Drop your XML here to check for UBL-CR-665

Auto-fix UBL-CR-665 in seconds

Upload your invoice and we fix this error automatically. Financial fields are never touched.