# BR-52: Add an identifier to each supporting document reference

Every `cac:AdditionalDocumentReference` needs a `cbc:ID` naming the supporting document. An identifier that is empty or only whitespace fails.

- Layer: EN 16931
- Severity: fatal (the document is invalid)
- Topics: Process and references
- Official definition: https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/BR-52/
- Explanation last updated: 2026-09-24

## The short answer

`BR-52` fails when a `cac:AdditionalDocumentReference` has a `cbc:ID` with no text in it. Write the identifier of the supporting document, such as the timesheet or delivery note number, into that `cbc:ID`.

Deleting the empty `cbc:ID` is no way out: the UBL schema requires the element, so a reference without it fails the XSD layer instead.

## What the rule checks

The rule runs once for every `cac:AdditionalDocumentReference` in the document and reads its `cbc:ID`. It fails when that identifier is empty or holds only whitespace; when tried, an identifier of three spaces reported this rule.

Nothing else in the reference is needed to pass. When tried, a reference holding only an identifier, with no description and no attachment, passed every layer.

Missing and empty behave differently here. With no `cbc:ID` element at all the document fails the XSD layer, the business rules are skipped, and `BR-52` is not reported.

The identifier is not checked for format or uniqueness. Any visible text satisfies the rule.

| Term | Meaning | UBL element |
|---|---|---|
| BG-24 | Additional supporting documents | `cac:AdditionalDocumentReference` |
| BT-122 | Supporting document reference | `cac:AdditionalDocumentReference/cbc:ID` |

## How an integration ends up here

Possible causes, from the shape of the rule rather than from measured usage:

- Attachments are stored without a document number, and the export maps the missing number to an empty element.
- The reference is filled from a field that exists for one kind of attachment, such as timesheets, and is blank for the others.
- A template always writes a `cac:AdditionalDocumentReference` block for an optional attachment and leaves its fields empty when there is none.
- The source value is a string of spaces that the export treats as present.

## How to fix it

1. Work out which supporting document the reference describes: the attached file, or the external document it points to.
2. Write its identifier to `cbc:ID`: the number printed on the document, or, if it has none, a stable identifier your document store keeps for it, so the buyer can refer to it.
3. If the invoice has no supporting document, remove the whole `cac:AdditionalDocumentReference` rather than sending an empty shell.
4. Make the reference a required field wherever attachments are added, so the export never meets a blank one.

## Before and after

These are fragments, not complete documents. The complete synthetic documents they come from are linked below.

Fragment of the failing invoice: a timesheet is attached but its reference is empty

```xml
<cbc:BuyerReference>BUYER-REF-001</cbc:BuyerReference>
<cac:AdditionalDocumentReference>
  <cbc:ID></cbc:ID>
  <cbc:DocumentDescription>Timesheet</cbc:DocumentDescription>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="timesheet.pdf">JVBERi0xLjQK</cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>
```

Fragment of the corrected invoice: the reference identifies the timesheet

```xml
<cbc:BuyerReference>BUYER-REF-001</cbc:BuyerReference>
<cac:AdditionalDocumentReference>
  <cbc:ID>TIMESHEET-001</cbc:ID>
  <cbc:DocumentDescription>Timesheet</cbc:DocumentDescription>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="timesheet.pdf">JVBERi0xLjQK</cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>
```

Only the `cbc:ID` inside `cac:AdditionalDocumentReference` differs: empty in the failing invoice, `TIMESHEET-001` in the corrected one. The failing document also reports `PEPPOL-EN16931-R008`, the Peppol rule against empty elements, pointing at that same `cbc:ID`. Filling in the identifier clears both findings.

### What the validator reported

- The failing invoice reports **BR-52** and [PEPPOL-EN16931-R008](https://ironfang.uk/docs/finance/rules/PEPPOL-EN16931-R008.md). The corrected document passes every layer with no findings.
  - [Download the failing XML](https://ironfang.uk/finance/rule-examples/BR-52-invalid.xml)
  - [Download the corrected XML](https://ironfang.uk/finance/rule-examples/supporting-document-valid.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 `Invoice` and `CreditNote` alike; when tried, a credit note with an empty supporting document reference reported `BR-52` and `PEPPOL-EN16931-R008` too.
- Reported in the EN 16931 layer, with the empty-element finding beside it in the Peppol layer.
- Every additional document reference is in scope, including one that carries an invoiced object identifier with `cbc:DocumentTypeCode` 130; when tried, an empty identifier there reported this rule as well.
- The attached file has checks of its own: its MIME code is checked by `BR-CL-24`, and a missing `filename` attribute is reported as `UBL-DT-07`.

## Related rules

- [PEPPOL-EN16931-R008 is reported with this rule whenever the identifier element is present but empty](https://ironfang.uk/docs/finance/rules/PEPPOL-EN16931-R008.md)
- [BR-CL-24 checks the MIME code of a file attached to the same reference](https://ironfang.uk/docs/finance/rules/BR-CL-24.md)
- [BR-55 is the matching requirement for a reference to a preceding invoice](https://ironfang.uk/docs/finance/rules/BR-55.md)

## 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-24.1: source checked 2026-09-24, explanation last updated 2026-09-24.

[The official definition of BR-52](https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/BR-52/) 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.

## Links

- [This rule as a web page](https://ironfang.uk/docs/finance/rules/BR-52)
- [Free Peppol invoice validator](https://ironfang.uk/tools/peppol-validator)
- [Rule index](https://ironfang.uk/docs/finance/rules.md)
- [Ironfang Finance API docs](https://ironfang.uk/docs/finance)
- The same rule is available to MCP clients as the tool `finance.rule.get` on https://mcp.ironfang.uk/mcp
