DATEV Export
One call turns the invoices and credit notes you sent and received in a period into a booking
batch file in the DATEV format (an EXTF_Buchungsstapel file). Your tax adviser imports that
file into DATEV, the accounting system most German tax advisers use. Two more calls store the
settings the file needs: your adviser and client numbers, your fiscal year, and the accounts
each VAT case is booked to.
All paths below are relative to https://app.goroute.ai/peppol-api. Every call is scoped to
the organisation of the API key you send.
The amount in each row includes VAT. DATEV's published format pages do not say whether a row's amount is expected with or without VAT. GoRoute writes it with VAT included, and leaves the tax split to the account or BU key you set for each VAT case. If your accounts expect net amounts, settle this with your tax adviser before you import a file.
GoRoute has not yet tested an import of this file into DATEV. The file follows DATEV's published format description, but no file from GoRoute has yet been imported into DATEV to confirm it. Have your tax adviser check the first import.
GoRoute holds no chart of accounts and chooses no account and no BU key. You set every account yourself, with your tax adviser. A VAT case with no account stops the export and is named in the answer.
The calls​
| Method and path | What it does | Permission |
|---|---|---|
GET /api/v1/exports/datev | The booking batch file for a period | transactions:read |
GET /api/v1/settings/company/datev | Your DATEV settings as stored, or {} when there are none | any key of the organisation |
PUT /api/v1/settings/company/datev | Replaces your DATEV settings | settings:manage |
The export needs no permission beyond transactions:read, because the file shows nothing you
could not already read document by document. It only reads: nothing is stored.
Setting up the export​
Send the whole settings object with PUT /api/v1/settings/company/datev. The object you send
replaces the stored one; it is not merged. So an account you leave out is removed.
The settings are checked the same way the export checks them. A value the export could not use
is refused, each one named, and nothing is saved. The four required keys must be in every
PUT.
| Key | Required | Meaning |
|---|---|---|
adviser_number | yes | Your tax adviser's DATEV adviser number (Beraternummer), 1001 to 9999999 |
client_number | yes | Your DATEV client number (Mandantennummer), 1 to 99999 |
fiscal_year_start | yes | The day your fiscal year starts, as MMDD (for example 0101), MM-DD or a date. 29 February is not accepted |
account_length | yes | How many digits your G/L account numbers have (Sachkontenlänge), 4 to 8 |
chart | no | The code of the chart of accounts your adviser uses, two or four digits. Written into the file header only |
currency | no | The currency of the export, as a three-letter code. Default EUR |
debtor_account | for sales | The account sales documents are posted against. At most one digit longer than account_length, not zero |
creditor_account | for purchases | The account purchase documents are posted against. Same rule |
accounts.sales | for sales | The account for each VAT case of your sales. See below |
accounts.purchases | for purchases | The account for each VAT case of your purchases. See below |
festschreibung | no | true writes 1 in the Festschreibung field of the header and of every row. Default false, which writes 0 |
accounts.sales and accounts.purchases each map a VAT case to an account. An entry is
either the account number alone, or {"account": …, "bu_key": …} when your adviser also wants
a BU key. An account is digits only, not zero, and no longer than account_length. A BU key is
one to four digits.
A template, with every value in angle brackets for you to replace with your adviser's numbers:
{
"adviser_number": "<adviser number>",
"client_number": "<client number>",
"fiscal_year_start": "0101",
"account_length": "<4 to 8>",
"debtor_account": "<debtor account>",
"creditor_account": "<creditor account>",
"accounts": {
"sales": {
"S:19": "<account>",
"S:7": {"account": "<account>", "bu_key": "<BU key>"}
},
"purchases": {
"S:19": "<account>"
}
}
}
You only need accounts for the VAT cases that occur. If a document in the period has a VAT case with no account, the export is refused and names every missing case at once.
VAT case keys​
Each row of the file is one document and one VAT case. The VAT case is the tax category of the document's lines and, where it matters, the rate:
| Key | VAT case |
|---|---|
S:19, S:7, … | Standard or reduced rate. Always carries its rate |
AE | Reverse charge |
K | Intra-Community supply |
Z | Zero rated |
E | Exempt |
G | Export outside the EU |
O | Outside the scope of VAT |
A category other than S carries its rate only when the rate is not zero. A line with neither a
tax category nor a tax code has the case UNKNOWN.
You can write the keys loosely: s:19.0 % and S:19,0 are both read as S:19.
Exporting a period​
curl -G https://app.goroute.ai/peppol-api/api/v1/exports/datev \
-H "X-API-Key: $GOROUTE_API_KEY" \
--data-urlencode "date_from=2026-10-01" \
--data-urlencode "date_to=2026-10-31" \
-o EXTF_Buchungsstapel_20261001_20261031.csv
| Parameter | Required | Meaning |
|---|---|---|
date_from | yes | First invoice date of the period (YYYY-MM-DD) |
date_to | yes | Last invoice date of the period. At most 366 days after date_from, and in the same fiscal year |
direction | no | sent for the documents you sent, received for the ones you received, or both in one file. Default both |
encoding | no | cp1252, DATEV's default character set, or utf-8, written with a byte order mark. Default cp1252 |
The answer is the file itself, text/csv, named
EXTF_Buchungsstapel_<from>_<to>.csv with both dates as YYYYMMDD. Two headers count what is
in it:
| Header | Meaning |
|---|---|
X-Datev-Documents | How many documents the file holds |
X-Datev-Rows | How many booking rows it holds |
A file holds one fiscal year only, because each row's document date is day and month, and the year comes from the file header. To export a period that crosses your fiscal year end, make two files.
Which documents are in the file​
The file holds every invoice and credit note of your organisation whose invoice date lies in the period. These are left out:
- documents you deleted;
- demonstration documents;
- documents a tax authority rejected;
- the platform's own reporting documents, such as tax data documents and their status messages;
- repeat transmissions of the same document. A document sent more than once is booked once.
A document whose transmission failed is exported. It was issued, and whether it reached the buyer does not decide whether it is booked.
A self-billed document is issued by the buyer. So a self-billed document you sent is booked as a purchase, and one you received is booked as a sale.
What each row holds​
| What | Where it comes from |
|---|---|
| Amount | The VAT case's taxable amount plus its tax, always positive, two decimals |
| Debit or credit | A sales invoice is a debit (S), a purchase invoice a credit (H). A credit note is the other way round, and so is a VAT case whose amount is negative |
| Account | Your debtor_account for sales, your creditor_account for purchases |
| Contra account and BU key | The account, and BU key if any, you set for the VAT case |
| Document date | The invoice date, as day and month |
| Document number | The invoice number. Characters DATEV does not allow in this field are removed, and the last 36 are kept |
| Posting text | The other party's name, at most 60 characters. When the document number had to be shortened or cleaned, the number as issued comes first |
A VAT case whose amounts come to zero within a document has nothing to post and gives no row.
The file does not carry the EU fields, the due date, the service date or cost centres.
Refusals​
The export answers 422 when it cannot make the file. The body carries error
(datev_export_refused), error_code, message (a sentence a bookkeeper can act on) and
details.
error_code | Meaning |
|---|---|
DATEV_NOT_CONFIGURED | One of the four required settings is missing. details.missing names them |
DATEV_CONFIGURATION_INVALID | A setting cannot be used. details.invalid names each one and says why |
DATEV_PERIOD_INVALID | The period ends before it starts, is longer than 366 days, falls outside the years 2000 to 2099, or crosses the end of your fiscal year |
DATEV_ACCOUNT_MAPPING_REQUIRED | A VAT case in the period, or the debtor or creditor account, has no account. details.missing lists them under sales, purchases and accounts |
DATEV_CURRENCY_UNSUPPORTED | A document is not in the export's currency, or states none. DATEV would need the exchange rate and the base-currency amount, which GoRoute does not hold. Export a period without these documents and post them by hand |
DATEV_CHARACTER_UNSUPPORTED | A document number or party name has a character the chosen encoding cannot write. Nothing is replaced. Ask for encoding=utf-8 if your DATEV import accepts Unicode |
DATEV_AMOUNT_UNSUPPORTED | An amount has more than two decimals, or more than ten digits before the decimal comma |
DATEV_NOTHING_TO_EXPORT | There is no invoice or credit note with an amount to post in the period |
PUT /api/v1/settings/company/datev refuses with 422 too, using DATEV_NOT_CONFIGURED or
DATEV_CONFIGURATION_INVALID with the same details. Its error is validation_error.
Where the file format comes from​
The file follows DATEV's own description of the DATEV format (header version 700, booking batch format version 13), as published on DATEV's developer portal: DATEV Format. GoRoute read those pages on 12 November 2026. DATEV has not certified or reviewed this export.
Related pages​
- VAT Return Support Report: the tax figures of a period, for checking a return
- Germany country guide: e-invoicing in Germany