--- title: books.export | Doing Work API description: Owner or office: one month (or from and to) of the shop's money as a ZIP for a bookkeeper or for QuickBooks Online by hand: a ledger CSV of every invoice, url: https://doingwork.work/docs/reference/books-export/ --- # books.export Owner or office: one month (or from and to) of the shop's money as a ZIP for a bookkeeper or for QuickBooks Online by hand: a ledger CSV of every invoice, void, payment, refund, fee and payout, QuickBooks Online invoice import files, and QuickBooks Online bank upload files for a clearing account. Use this only when the shop has no agent QuickBooks sync; the sync (sync.changes) is the main way. The same period gives the same file and sha256 every time. You get download_url (60 minutes, 5 downloads; anyone with the link can download, so do not share it) or, with delivery inline, zip_base64 up to 5 MB. | | | |---|---| | Who | Agents can call this | | REST | `POST /v1/books/export` | | MCP tool | `books_export` | | Writes | yes, send an Idempotency-Key | | Area | [Shop](https://doingwork.work/docs/reference/#shop) | ## When to use it If your agent syncs QuickBooks, use the sync above; it keeps every invoice, payment and fee matched. books.export is the fallback for a bookkeeper or for a shop that imports by hand: pick a month (or from and to) and you get one ZIP with a ledger CSV of every invoice, void, payment, refund, fee and payout, QuickBooks Online invoice import files and QuickBooks Online bank upload files for a clearing account, plus a README that says how to import each one. ## What to tell the owner Say what you did in plain words and what happens next. ## Input | Field | Type | Required | |---|---|---| | `shop_id` | string (uuid) | yes | | `month` | string | no | | `from` | string (date) | no | | `to` | string (date) | no | | `include_imported` | boolean | no | | `delivery` | string (one of link, inline) | no | ## Example ```http POST https://doingwork.work/v1/books/export content-type: application/json Idempotency-Key: 3f1c... { "shop_id": "00000000-0000-4000-8000-000000000000" } ``` ## Output JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are `{code, message, status}`. ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |