---
name: "books_export"
area: "books"
title: "Export the books"
price: "$0.001"
method: "POST"
url: "https://api.conecto.chat/v1/tools/books_export"
mcp_server: "https://api.conecto.chat/mcp/books"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/books/books_export"
---

# Export the books (`books_export`)

A CSV of the journal or the accounts, a DATEV Buchungsstapel for a German tax adviser or a French FEC, with a download link.

A file in the file store, with a download link: journal (a CSV of every line of every entry from-to, for an accountant or another program), accounts (the chart with balances on to) or datev (a DATEV Buchungsstapel for a German tax adviser: one fiscal year, from-to, default the year so far; needs the datev settings once) or fec (the French Fichier des Écritures Comptables for a tax audit: the fiscal year that holds to, every entry; needs the fec settings once). Conecto files no tax returns: for UK VAT (Making Tax Digital) the journal CSV is the digital link into bridging software.

Price: $0.001 a call. A call that fails costs nothing.

## Use it when

An accountant or another program needs the books, a German tax adviser wants them in DATEV, or a French tax audit asks for the FEC.

## Say this to your agent

> Send the accountant every booking from the third quarter as a spreadsheet.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `what` | string | yes |  | `"journal"`, `"accounts"`, `"datev"`, `"fec"` |  |
| `from` | string | no | YYYY-MM-DD (matches ^\\d{4}-\\d{2}-\\d{2}$) |  |  |
| `to` | string | no | YYYY-MM-DD (matches ^\\d{4}-\\d{2}-\\d{2}$) |  |  |
| `datev` | object | no | For what: datev, kept for the next export. adviser (Beraternummer) and client (Mandantennummer) from the tax adviser; chart "03" (SKR03) or "04" (SKR04); account_length (4 to 8, default 4); accounts: each account code used to its DATEV number, like {"4000": "8400", "1010": "1200"} (same_numbers: true when the chart already uses them); tax_keys: a tax's BU-Schlüssel when it isn't German VAT at 19 or 7 percent. |  |  |
| `datev.adviser` | integer | no | 1,001 to 9,999,999. |  |  |
| `datev.client` | integer | no | 1 to 99,999. |  |  |
| `datev.chart` | string | no |  | `"03"`, `"04"` |  |
| `datev.account_length` | integer | no | 4 to 8. |  |  |
| `datev.accounts` | object | no |  |  |  |
| `datev.same_numbers` | boolean | no |  |  |  |
| `datev.tax_keys` | object | no |  |  |  |
| `fec` | object | no | For what: fec, kept for the next export. siren (9 digits; read from a French VAT ID when left out); accounts: each account code used to its plan comptable général number, like {"4000": "706000", "1010": "512000"} (same_numbers: true when the chart already uses them). |  |  |
| `fec.siren` | string | no | Up to 14 characters. |  |  |
| `fec.accounts` | object | no |  |  |  |
| `fec.same_numbers` | boolean | no |  |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `books_export` on the MCP server `https://api.conecto.chat/mcp/books` with these arguments:

```json
{
  "what": "journal",
  "from": "2026-07-01",
  "to": "2026-09-30"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/books_export \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"what": "journal", "from": "2026-07-01", "to": "2026-09-30"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "books_export",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.001",
  "balance_usd": "$19.75",
  "result": {
    "file": {
      "file_id": "df3b41fb-d7d0-4e0e-ab5a-959972a5151d",
      "name": "Journal 2026-07-01 to 2026-09-30.csv",
      "content_type": "text/csv",
      "size": "165 bytes",
      "size_bytes": 165,
      "sha256": "9359c5ab3e74b239b9e4e5ddf256327deb01c497b09aed8751c4419600997670",
      "created_at": "2026-10-14T08:00:00+00:00",
      "download_url": "https://cncto.co/d/df3b41fb-d7d0-4e0e-ab5a-959972a5151d?t=eyJmIjoiZGYzYjQxZmItZDdkMC00ZTBlLWFiNWEtOTU5OTcyYTUxNTFkIiwiZXhwIjoxNzkyMTYwOTg4fQ:1xHMSq:o_Jq7-a3PItEKIT5us8S4Wk2K7jZ_6dcxLRcj_xw4Dc",
      "link_expires_in_hours": 24
    },
    "rows": 0
  }
}
```

`result`: The CSV file with its file_id and download link, and how many rows. The journal has each line's date, entry, account, debit and credit, tax, currency and rate, when the entry was recorded and the entry a reversal undoes.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `no_books` | 409 | The business keeps no books yet. | Set them up with books_setup (base currency, start date). |
| `invalid_input` | 400 | A date is not a date like 2026-10-01, or from is after to. | Fix the date. |
| `storage_full` | 409 | The file store has no room for the CSV. | Delete files with files_delete, or add room with files_add_storage. |
| `invalid_input` | 400 | For datev or fec: the adviser's numbers or the SIREN are missing, an account used has no DATEV or plan comptable général number, a tax has no key, the period crosses a fiscal year, or the books are not in euros. | Give what the message names in datev (it is kept), or export each fiscal year on its own. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [books_setup](https://conecto.chat/tools/books/books_setup.md): Starts the business's double-entry books (currency, start date, chart of accounts) or changes their settings. $0.001 a call.
- [books_get](https://conecto.chat/tools/books/books_get.md): The books' settings: currency, start date, fiscal year, locked period, roles, payment accounts, taxes, and what is waiting. Free up to 1,000,000 reads a month.
- [books_list_accounts](https://conecto.chat/tools/books/books_list_accounts.md): Every account with its code, type, role and balance on a day. Free up to 1,000,000 reads a month.
- [books_save_accounts](https://conecto.chat/tools/books/books_save_accounts.md): Adds accounts or changes them, matched by code: name, type, description, code, role or archived. $0.001 a call.
- [books_save_tax](https://conecto.chat/tools/books/books_save_tax.md): Adds or changes a tax rate the books use (VAT, GST, sales tax), matched by name. $0.001 a call.
- [books_record_expense](https://conecto.chat/tools/books/books_record_expense.md): Books a cost the business paid, with its tax split off and the receipt attached. $0.01 a call.
- [books_record_entry](https://conecto.chat/tools/books/books_record_entry.md): Books a journal entry of two or more balancing lines, for whatever the other tools do not cover. $0.01 a call.
- [books_attach_receipt](https://conecto.chat/tools/books/books_attach_receipt.md): Attaches a receipt from the file store to an entry that has none. $0.01 a call.
- [books_reverse_entry](https://conecto.chat/tools/books/books_reverse_entry.md): Undoes an entry by booking its mirror image; entries are never edited or deleted. $0.01 a call.
- [books_list_entries](https://conecto.chat/tools/books/books_list_entries.md): Entries, newest first, with their lines, by dates, account, source or text. Free up to 1,000,000 reads a month.
- [books_import_bank](https://conecto.chat/tools/books/books_import_bank.md): Reads a bank statement from the file store (CSV, CAMT.053 or OFX) onto a bank account, skipping lines imported before. Free.
- [books_bank_lines](https://conecto.chat/tools/books/books_bank_lines.md): Imported bank lines (by default the ones still to match), each with up to three suggestions of what it was. Free up to 1,000,000 reads a month.
- [books_match_bank_lines](https://conecto.chat/tools/books/books_match_bank_lines.md): Says what bank lines were: entries already booked, invoices or bills they pay, an account to book them to, or nothing to book. $0.02 per bank line matched.
- [books_save_bank_rule](https://conecto.chat/tools/books/books_save_bank_rule.md): Saves a bank rule, like Xero's: which new bank lines it matches and how they are booked, to one account or split by percent, each part with its own tax. $0.001 a call.
- [books_list_bank_rules](https://conecto.chat/tools/books/books_list_bank_rules.md): Lists the bank rules in the order they are tried, with where they book and how often they were used. Free up to 1,000,000 reads a month.
- [books_apply_bank_rules](https://conecto.chat/tools/books/books_apply_bank_rules.md): Books every new bank line a rule matches, each by the first rule that matches. $0.02 per bank line booked.
- [books_delete_bank_rule](https://conecto.chat/tools/books/books_delete_bank_rule.md): Deletes a bank rule; what it booked stays booked. Free.
- [books_report](https://conecto.chat/tools/books/books_report.md): A report: profit and loss, balance sheet, trial balance, ledger, tax, the VAT or OSS return, the cash flow ahead or a snapshot of the business. Free up to 1,000,000 reads a month.
- [books_save_tracking](https://conecto.chat/tools/books/books_save_tracking.md): Saves a tracking category with its options, like Xero's: a department, a region or a project line that any line of the books can carry. $0.001 a call.
- [books_list_tracking](https://conecto.chat/tools/books/books_list_tracking.md): Lists the tracking categories and their options. Free up to 1,000,000 reads a month.
- [books_save_budget](https://conecto.chat/tools/books/books_save_budget.md): Saves a budget per income and expense account and month, like Xero's budget manager: amounts, monthly or yearly. $0.001 a call.
- [books_list_budgets](https://conecto.chat/tools/books/books_list_budgets.md): Lists the budgets with every line's monthly amounts and total. Free up to 1,000,000 reads a month.
- [books_delete_budget](https://conecto.chat/tools/books/books_delete_budget.md): Deletes a budget; the books don't change. Free.
- [books_repay_claims](https://conecto.chat/tools/books/books_repay_claims.md): Pays someone back for costs they paid with their own money (expense claims), like Xero's, with a SEPA file when asked. $0.01 a call.
- [books_list_claims](https://conecto.chat/tools/books/books_list_claims.md): Lists expense claims: what people paid for the business privately, and what each is owed. Free up to 1,000,000 reads a month.
- [books_save_asset](https://conecto.chat/tools/books/books_save_asset.md): Registers a fixed asset (a van, a machine) and how it depreciates, like Xero's: straight line, declining balance, at once or not at all. $0.001 a call.
- [books_list_assets](https://conecto.chat/tools/books/books_list_assets.md): The fixed asset register: each asset's cost, accumulated depreciation and book value, what a run would book now, and the register held against the books. Free up to 1,000,000 reads a month.
- [books_depreciate](https://conecto.chat/tools/books/books_depreciate.md): Books the depreciation of every registered asset through a month's end, one entry a month, like Xero's run depreciation; or undoes it after a date. $0.01 a call.
- [books_dispose_asset](https://conecto.chat/tools/books/books_dispose_asset.md): Sells or writes off a fixed asset, like Xero's dispose: depreciation to the day it goes, then its cost, the price and the gain or loss. $0.01 a call.
- [books_delete_asset](https://conecto.chat/tools/books/books_delete_asset.md): Takes an asset registered by mistake out of the register; the books don't change. Free.
- [books_lock](https://conecto.chat/tools/books/books_lock.md): Locks the books through a date, so nothing new is booked on or before it; null unlocks. $0.001 a call.
- [books_close_year](https://conecto.chat/tools/books/books_close_year.md): Closes a fiscal year for good: nothing is booked on or before its last day again, and it can't be undone. $0.001 a call.
