AttestwireRule referenceBR-52

BR-52 Every supporting document must have a reference

noun · EN 16931 · fatal · BT-122

For a sample invoice, the library reports: Supporting document 1 (BG-24) has no supporting document reference (BT-122). BT-122 is the identifier the attachment is filed under — a timesheet number, a delivery note number, a contract reference — and it is what lets a reviewer years later connect the file to the thing it evidences.

Business term
BT-122
Severity
fatal

The fix

Set supportingDocuments[].reference to the identifier of the document you are attaching or pointing at. Use description (BT-123) for the human-readable label, not for the reference.

A passing value

the shape this field expects
"supportingDocuments": [{ "reference": "TS-2026-07", "description": "Timesheet July 2026" }]

What the library returns

The full error returned by @attestwire/en16931. It includes the rule ID, affected field and suggested correction. Developers can use this object in their application:

TeachingError
{
  "rule": "BR-52",
  "field": "BT-122",
  "severity": "fatal",
  "message": "Supporting document 1 (BG-24) has no supporting document reference (BT-122). BT-122 is the identifier the attachment is filed under — a timesheet number, a delivery note number, a contract reference — and it is what lets a reviewer years later connect the file to the thing it evidences. An attachment with a filename and no reference is a document nobody can cite.",
  "fix": "Set supportingDocuments[].reference to the identifier of the document you are attaching or pointing at. Use description (BT-123) for the human-readable label, not for the reference.",
  "example": "\"supportingDocuments\": [{ \"reference\": \"TS-2026-07\", \"description\": \"Timesheet July 2026\" }]",
  "xpath": "/ubl:Invoice/cac:AdditionalDocumentReference[1]/cbc:ID",
  "docsUrl": "https://attestwire.com/rules/BR-52"
}

xpath is always a UBL path. On a CII invoice, look for the matching CII field instead.