errorEN16931

UBL-SR-52:Document reference shall occur maximum once

Duplicate document reference. Document reference can only appear once in the specified context.

Severity
Fatal
Rule set
EN16931
Country
All EU
Fix type
CONFIRM
Confidence
90%
Category
structural

Engine Classification

Requires user confirmation before application

What is UBL-SR-52?

UBL-SR-52 is a fatal validation rule defined in the EN16931 specification. It validates the DocumentReference element in the UBL invoice XML.

When this rule fires, the invoice is non-compliant and will be rejected by Peppol access points and national validation services. The sending system receives a rejection response and the invoice does not reach the buyer.

Target path: //cac:InvoiceLine/cac:DocumentReference

Why This Error Matters

Invoice will be rejected by EN16931 validators. These structural rules enforce cardinality and conditional requirements. Fix the duplicate element or provide the required companion element.

UBL-SR-52 is a hard failure. Invoices that trigger this rule are rejected at the access point and never reach the recipient. In Peppol networks, this means your sending system receives an MLR (Message Level Response) with a rejection status. The invoice must be corrected and re-sent, adding delay to your payment cycle.

Validator Behavior

  • ·Causes invoice rejection
  • ·Fails EN 16931 business rule validation
  • ·Error returned: UBL-SR-52
  • ·Specification: EN16931

XML Example

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

Before
<!-- Required block is missing -->
<!-- <cac:DocumentReference> ... </cac:DocumentReference> -->
After
<!-- Add the required block -->
<cac:DocumentReference>
  <!-- child elements -->
</cac:DocumentReference>

Technical Reference

XPath//cac:InvoiceLine/cac:DocumentReference
SpecEN16931
Operationremove_duplicates
StrategyRemove duplicate document references per invoice line, keeping the first occurrence

Common Causes

  • ·Document reference appears multiple times
  • ·cac:DocumentReference shall occur maximum once
  • ·Duplicate document reference in supporting documents
  • ·Same reference type repeated in BG-24
  • ·ERP exports multiple identical document references

Seeing this in production? The API handles UBL-SR-52 automatically. See the fix response →

See Also

Last updated: 21 February 2026

Share this guide:

Handle UBL-SR-52 Automatically in Your Pipeline

The compliance engine auto-remediates this error with controlled safety policies and evidence pack generation.