What BR-CL-24 checks
BR-CL-24 is a code list rule for embedded attachments: the MIME code of an attached document (BT-125-1) must come from the small list EN 16931 permits. An additional supporting document (BG-24) can embed its file as a base64 binary; the mimeCode attribute declares what the bytes are, and only application/pdf, image/png, image/jpeg, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet and application/vnd.oasis.opendocument.spreadsheet are acceptable. The restriction keeps receiver-side processing predictable: every compliant attachment is viewable or tabular, never executable or opaque.
Layer and formats
An en16931 core layer rule for every syntax and profile, from plain UBL and CII through XRechnung and Peppol BIS to the XML inside hybrid PDFs. National overlays add their own attachment rules on top (XRechnung, for instance, additionally requires unique filenames) but none widens the MIME list.
Why it fails in practice
- ZIP bundles. Several supporting files are zipped into one attachment;
application/zipis not on the list. - Office documents. Timesheets and acceptance protocols attached as DOCX or XLS (the legacy type) instead of PDF or XLSX.
- Sloppy or generic codes. The generator writes
application/octet-streamfor everything, orimage/jpginstead ofimage/jpeg.
How to fix it
Convert the file to an allowed format and declare its true type:
<cac:AdditionalDocumentReference>
<cbc:ID>TIMESHEET-2026-07</cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf"
filename="timesheet-july.pdf">JVBERi0xLjcK...</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
In an InvoiceXML create request each attachment is an entry of invoice.supportingDocuments with an attachmentMimeCode; an off-list code is rejected before any XML is built.
The raw rejection vs the InvoiceXML finding
The raw Schematron verdict names a code list without telling you its contents:
<svrl:failed-assert id="BR-CL-24" flag="fatal"
location="/*:Invoice[namespace-uri()='...']/cac:AdditionalDocumentReference[1]
/cac:Attachment[1]/cbc:EmbeddedDocumentBinaryObject[1]/@mimeCode">
<svrl:text>[BR-CL-24]-For Mime code in attribute use MIMEMediaType.</svrl:text>
</svrl:failed-assert>
The InvoiceXML finding spells the list out and even carries the index of the offending attachment:
{
"rule": "BR-CL-24",
"layer": "en16931",
"line": null,
"message": "The attached document mime code (BT-125-1) is not allowed. EN 16931 accepts only: application/pdf, image/png, image/jpeg, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.oasis.opendocument.spreadsheet.",
"btCodes": ["BT-125-1"],
"fields": ["supportingDocuments[0].attachmentMimeCode"],
"raw": "[BR-CL-24] EN16931: For Mime code in attribute use MIMEMediaType."
}
The finding names the exact array entry to fix, index included, so a UI with several attachments highlights the right one. No code list to look up, and clients localize by the stable rule key.
Work with attachments
Validate a document in the UBL validator or the XRechnung validator. To read the other direction, POST /v1/extract/attachments unpacks every embedded document from a received invoice into a ZIP, the natural companion to this rule. Attach files at creation time via supportingDocuments on POST /v1/create/ubl or POST /v1/create/facturx.
Related rules and pages
- The extract attachments endpoint, for reading embedded documents out of received invoices
- BR-01 and BR-16, the neighbouring structural core rules