> For the complete documentation index, see [llms.txt](https://za.docs.rechtlogisch.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://za.docs.rechtlogisch.de/beta/filings/message.md).

# Message

German: ElsterNachricht

## List of fields, values and their context

The structure of `filingValues` is based on the ELSTER XML Documentation.

The ELSTER field code, its description, context (in the XML structure) and validation rules can be found in Excel files on the appropriate data type page.

{% hint style="info" %}
The files can be opened with as Spreadsheet Reader (e. g. Excel).
{% endhint %}

The sheets `* - Felder` include the codes and description (columns B and C), as well as allowed values, length and regex expression every field validates against (columns E, F and I). This also applies to attachments to the main form.

{% hint style="warning" %}
Rows marked as`(alt)` denote, that a change has been made to its parameters (eg. Context) compared to the previous version of the documentation.
{% endhint %}

## Attachments

Messages support attachments (exception: [Appeal Withdrawal](/beta/filings/message/appeal/withdrawal.md) and [Bank Details](/beta/filings/message/bank-details.md)).

Attachments send to the fiscal authorities might be removed for security reasons or other limitations some time after the submission. When removed a message is being sent out and a detailed information should be retrieved from ELSTER, therefore: [listing and single retrieval of the feedback messages](/beta/retrieval/feedback.md) is part of the retrieval process. Checking for the availability of new feedback messages should be triggered daily and the information forwared to the end-user.

Fullfilling the below mentioned requirements minimizes the amount of removed attachments by ELSTER.

### Content requirements

#### Server-side (ELSTER Servers)

* Mime-Type: `application/pdf`
* Valid PDF file (for example `pdfinfo` does not return any errors)
* At least one PDF page
* At most 200 PDF pages
* PDF does not have any active content (like JavaScript or Forms)
* File does not contain malware

{% hint style="info" %}
ELSTER changed the max PDF page count to 200 in August 2026 (cf. [ELSTER-Forum](https://forum.elster.de/herstellerforum/forum/eric/schnittstellen-zum-eric/164757-test-anhang-rückmeldung-bei-belegnachreichung?p=164767#post164767))
{% endhint %}

#### Client-side (ERiC)

* File size is greater than 0 Bytes
* File size of a single PDF file does not exceed 104.857.600 Bytes (\~105 Megabytes)

Typically 20 attachments can be sent with in one message. All attachments in one message can not exceed 1.073.741.824 Bytes (\~1.024 Megabytes; client-side limitation)

{% hint style="info" %}
ELSTER added support for attaching E-Invoices in ZUGFeRD-Format (PDF with XML). Based on Forum statements: an embeded XML does not get removed, when it is in the ZUGFeRD-Format.

While non-ZUGFeRD-embedded-XMLs are silently removed from the PDF, changing therefore the content of the PDF. The so altered PDF is generally passed through if other requirements are fullfilled (source: [ELSTER-Forum](https://forum.elster.de/herstellerforum/forum/eric/daten%C3%BCbertragung-mit-eric/155947-zugferd-anh%C3%A4nge)). Nobody gets notified about the change of the PDF.
{% endhint %}

### Example PDF files

{% hint style="warning" %}
Files are stored as Base64 encoded strings in S3 bucket.
{% endhint %}

Sandbox is configured to use attachment files stored in a S3 bucket, for memory efficient processing and cost effective storing of data.

You can reference five example files:

<table><thead><tr><th width="235.46270751953125">Filename</th><th width="239.5322265625">Decoded size (in Bytes)</th><th>Decoded size (in Megabytes)</th></tr></thead><tbody><tr><td><code>example.base64.pdf</code></td><td>101.760</td><td>~0,10</td></tr><tr><td><code>rick.base64.pdf</code></td><td>1.143.191</td><td>~1,14</td></tr><tr><td><code>7MB.base64.pdf</code></td><td>7.306.414</td><td>~7,31</td></tr><tr><td><code>10MB.base64.pdf</code></td><td>10.434.501</td><td>~10,43</td></tr><tr><td><code>example/subfolder/example.base64.pdf</code></td><td>101.760</td><td>~0,10</td></tr></tbody></table>

## Features

### Attachments

Data provided in key `attachments[]` (and `filingAttachments` for non-Universal endpoints) gets persisted in the database. To not bloat the database there is an option to store attachments in a (dedicated) S3 bucket and provide only a reference to that file in filings in `attachments[].content` (or `filingAttachments.Anhang[].Dateiinhalt` for non-Universal endpoints).

#### Technical requirements

* a S3 bucket has to be configured. Recommendation: designated separate bucket
* file content is stored as a base64 encoded string in S3
* file name is unique (path style is accepted, and might contain userId and year, eg. `user12345/2023/uniqueid.pdf`)
* file name ends with `.pdf`
* file name is provided in `attachments[].content` (or `filingAttachments.Anhang[].Dateiinhalt` for non-Universal endpoints)

Example in Postman: [Subsequent with attachment link](https://documenter.getpostman.com/view/3233898/2sA2xiWXpT#d2081a41-59a0-4ab4-bbf4-9ed4b71396c6)

{% hint style="info" %}
During validation with `usecase: validate` size of attachment (German: "Dateigröße \[in Byte]" ) printed on PDF file is 1 Byte. No validation of attachments file content is being performed during `usecase: validate`.
{% endhint %}

#### Settings

**FEATURES\_ATTACHMENTS\_IN\_S3**

Default: `false` for disabled. Set `true` to enable.

**S3\_ELSTER\_ATTACHMENTS\_ACCESS\_KEY\_ID,**

**S3\_ELSTER\_ATTACHMENTS\_SECRET\_ACCESS\_KEY,**

**S3\_ELSTER\_ATTACHMENTS\_BUCKET,**

**S3\_ELSTER\_ATTACHMENTS\_DEFAULT\_REGION**

Useful if seperate bucket solely for attachments has been created. Settings are analog to [AWS\_\*](/beta/setup/settings.md#aws). If not set explicitly, values set in `AWS_*` environment variables are used for S3 connections for attachments content retrieval.

**S3\_ELSTER\_ATTACHMENTS\_ENDPOINT**

Custom hostname with protocol (and port) on which S3 is expecting requests. For example: `https://s3:9000`.

**S3\_ELSTER\_ATTACHMENTS\_PATH\_STYLE**

Default: `false`. By default bucket name is added as subdomain to defined host. Set to `true` to use with Minio and add it to path.

#### Environment setup

Minimal configuration needed on staging:

```bash
FEATURES_ATTACHMENTS_IN_S3=true
S3_ELSTER_ATTACHMENTS_BUCKET={invididual-name-of-bucket}
S3_ELSTER_ATTACHMENTS_DEFAULT_REGION=eu-central-1
```

{% hint style="success" %}
Sandbox instance on AWS has an IAM Role with S3 Access Permissions, therefore credentials are injected, and do not need special configuration.
{% endhint %}
