Skip to content

BR-CL-24: MIME code of the attachment (BT-125-1) not permitted

Official message

[BR-CL-24] For Mime code in attribute use MIMEMediaType.

EN 16931 (CII) · Error · Message language: English · Version: xrechnung-3.0.2-validator-configuration-2026-08-31

[BR-CL-24] For Mime code in attribute use MIMEMediaType.

EN 16931 (UBL) · Error · Message language: English · Version: xrechnung-3.0.2-validator-configuration-2026-08-31
Severity
Error The invoice is invalid and may be rejected by the recipient.
Applies to
EN 16931 (CII), EN 16931 (UBL)

What does this mean?

The MIME code of an embedded attachment (attached document Mime code, BT-125-1) must be one of the media types permitted by EN 16931: application/pdf, image/png, image/jpeg, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (Excel) or application/vnd.oasis.opendocument.spreadsheet (OpenDocument spreadsheet). The value given is not permitted.
CII: ram:AttachmentBinaryObject/@mimeCode is checked. UBL: cbc:EmbeddedDocumentBinaryObject/@mimeCode is checked.

Typical causes

The attachment has a format that is not permitted, e.g. Word (application/msword), XML or ZIP.
The MIME code is misspelled, e.g. image/jpg instead of image/jpeg, or in upper case.
The file extension (pdf) was given instead of the MIME code.

How to fix the error

Convert the attachment into one of the permitted formats, e.g. PDF, and set mimeCode accordingly.
State the MIME code exactly in the permitted spelling.
Generate and validate the invoice again.

In E-Rechnungsfreund

In the invoice form, "Experte" view, section "Zusätzliche Dokumente (BG-24)" (additional documents), choose "Lokale Datei" (local file) as "Quelle" (source) and select an entry matching the file format in the field "MIME-Code (BT-125-1)". The list only contains the permitted media types.

Example

Wrong

<ram:AttachmentBinaryObject mimeCode="image/jpg" filename="delivery-note.jpg">...</ram:AttachmentBinaryObject>

Correct

<ram:AttachmentBinaryObject mimeCode="image/jpeg" filename="delivery-note.jpg">...</ram:AttachmentBinaryObject>
For developers: test expression per syntax

EN 16931 (CII) (CII)

Context: ram:AttachmentBinaryObject[@mimeCode]

((@mimeCode = 'application/pdf' or @mimeCode = 'image/png' or @mimeCode = 'image/jpeg' or @mimeCode = 'text/csv' or @mimeCode = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' or @mimeCode = 'application/vnd.oasis.opendocument.spreadsheet'))

EN 16931 (UBL) (UBL)

Context: cbc:EmbeddedDocumentBinaryObject[@mimeCode]

((@mimeCode = 'application/pdf' or @mimeCode = 'image/png' or @mimeCode = 'image/jpeg' or @mimeCode = 'text/csv' or @mimeCode = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' or @mimeCode = 'application/vnd.oasis.opendocument.spreadsheet'))

Related validation rules

  • BR-CL-01: Invoice type code (BT-3) not from UNTDID 1001
  • BR-CL-03: Currency attribute currencyID not according to ISO 4217
  • BR-CL-04: Invoice currency code (BT-5) not according to ISO 4217
  • BR-CL-05: VAT accounting currency code (BT-6) not according to ISO 4217
  • BR-CL-06: Value added tax point date code (BT-8) not permitted
  • BR-CL-07: Object identifier scheme (BT-18-1, BT-128-1) not from UNTDID 1153

Last updated:
Explanation of the validation rule, not legal or tax advice.