On this page
The short answer
UBL-CR-665 is a warning raised when the identifier of a document reference other than the invoiced object (cac:AdditionalDocumentReference/cbc:ID) carries a schemeID attribute. EN 16931 does not use the attribute there, so remove it and keep the element with its value. On a supporting document the identifier stands alone (BT-122); a scheme belongs only on the invoiced object reference (BT-18-1).
The warning on its own does not make the document invalid, though other rules still check what is there.
What the rule checks
The rule looks at every cac:AdditionalDocumentReference whose cbc:DocumentTypeCode is not 130, or that has none, and checks whether its cbc:ID carries a schemeID attribute. The invoiced object reference, with code 130, may carry one (BT-18-1).
It runs once against the whole document, so it is reported once however many times the document has the attribute, and the finding points at the document root rather than at the element: look for cac:AdditionalDocumentReference/cbc:ID/@schemeID in the XML.
| Term | Meaning | UBL element |
|---|---|---|
| - | schemeID attribute (BT-18-1 on the invoiced object reference only) | cac:AdditionalDocumentReference/cbc:ID/@schemeID |
| BT-122 | Identifier of a document reference other than the invoiced object | cac:AdditionalDocumentReference/cbc:ID |
How an integration ends up here
Possible causes, from the shape of the rule rather than from measured usage:
- Scheme and list attributes (
schemeID,listIDand the like) are written on every identifier or code by default, including those where EN 16931 does not carry them. - A general UBL 2.1 library writes every element and attribute it has a value for, whether or not EN 16931 uses it.
- A mapping built for another UBL-based document, such as an order, a despatch advice or a national profile, is reused for Peppol BIS Billing.
How to fix it
- Stop writing
schemeIDon thecbc:IDof a document reference whosecbc:DocumentTypeCodeis not130; keep it on the invoiced object reference. - On a supporting document the identifier stands alone (BT-122); a scheme belongs only on the invoiced object reference (BT-18-1).
- Validate again: the warning goes.
Validate your corrected invoice
Before and after
These are fragments, not complete documents. The complete synthetic documents they come from are linked below.
Fragment of the credit note with the warning: the schemeID attribute on the identifier of a document reference other than the invoiced object
<cac:AdditionalDocumentReference>
<cbc:ID schemeID="ABT">PROJECT-001</cbc:ID>
<cbc:DocumentTypeCode>50</cbc:DocumentTypeCode>
</cac:AdditionalDocumentReference>Fragment of the corrected credit note: the same lines without it
<cac:AdditionalDocumentReference>
<cbc:ID>PROJECT-001</cbc:ID>
<cbc:DocumentTypeCode>50</cbc:DocumentTypeCode>
</cac:AdditionalDocumentReference>The credit note with the warning has <cbc:ID schemeID="ABT">PROJECT-001</cbc:ID>, and the corrected credit note is the same document without it. It reports only this warning and is valid on every layer, so it would be accepted as it stands.
What the validator reported
- The credit note with the warning is valid, and reports the warning UBL-CR-665. The corrected document passes every layer with no findings.Download the XML with the warningDownload the corrected XML
Recorded on phive 12.1.0 / phive-rules-peppol 4.5.6 / Saxon-HE 12.10, the engine behind the free validator, using synthetic data. A recorded result is regression evidence for these documents; it is not a certification.
Where it applies
- Applies to UBL
InvoiceandCreditNotealike; the recorded example is a credit note. - The warning comes from the EN 16931 layer's rules for the UBL syntax. In the recorded example the schema layer passes: the attribute is valid UBL 2.1 and is only outside the EN 16931 model.
- A document reference with a
schemeIDalso failsUBL-SR-43(fatal) on either document type: that rule allows a scheme only on the invoiced object and, on a credit note, on the project reference (code50). So this warning shows on its own only there, as in the recorded example, a credit note project reference.
Related rules
Scope and source
Written for Peppol BIS Billing 3.0.21 (May 2026), EN 16931 1.3.16, as applied to UBL 2.1 Invoice and CreditNote documents. Other profiles, syntaxes and releases can define this identifier differently. Guidance version 2026-09-29.1: source checked 2026-09-29, explanation last updated 2026-09-29.
The official definition of UBL-CR-665 carries the normative wording and test. This page is our explanation of it, not a copy.
Guidance does not change the engine verdict. Fixing this finding does not mean the document passes every layer, and validation does not certify legal or tax compliance or transmit a document over Peppol.

