# Reports and export for the accountant (https://docs.getbeel.com/en/api/reports)

Profit and loss, cash flow and receivables aging from the data in Getbeel, and the ZIP with XML, VAT journal and registers for the accountant.

Getbeel computes three **management reports** from the invoices and bank movements it already has, and builds a **ZIP for the accountant** with the XML e-invoices, the VAT journal (prima nota IVA) and the VAT registers. They are the same sections as the app's **Taxes → VAT and reports**.

Scope: `taxes:read`. The export carries every invoice and bank movement of the period, so it also needs `invoices:read`, `received_invoices:read` and `bank:read`.

<Callout title="Management figures, not the financial statements" type="warn">
  The reports are not the statutory financial statements (bilancio, artt. 2423
  ff. c.c.): amounts net of VAT, without accruals and deferrals, depreciation,
  payroll, inventory or taxes. `management_figures` is always `true` and
  `reliable` always `false`: show them as figures to check with the accountant.
</Callout>

## Reports [#reports]

```bash
curl "https://www.getbeel.com/api/v1/companies/me/reports/profit-and-loss?period=2026" \
  -H "Authorization: Bearer $GETBEEL_API_KEY"
```

`GET /companies/me/reports/{type}`: `type` is `profit-and-loss`, `cash-flow` or `aging`. `period` is a year (`2026`), a quarter (`2026-Q3`) or a month (`2026-10`); or send `from` and `to` (at most two years). Without either, the current year.

The response has `object: "report"`, `type`, `period`, `start`, `end`, `currency: "EUR"`, a `note` and one of `profit_and_loss`, `cash_flow` and `aging`. Amounts are decimal strings (`"1234.50"`).

### Profit and loss (`profit-and-loss`) [#profit-and-loss-profit-and-loss]

- **Revenue**: issued invoices accepted by SDI (delivered or not delivered), by document date. The amount is the taxable amount of `DatiRiepilogo` (cassa previdenziale included, VAT and stamp duty excluded), as in the [VAT registers](/en/api/vat-registers). Credit notes (TD04, TD08) subtract.
- **Costs**: reviewed supplier invoices, by document date, net of VAT (in euros, or converted for other currencies), split by `category`. Credit notes subtract.
- **Competence**: art. 2423-bis, c. 1, n. 3 c.c. (income and charges count in the year they belong to, "indipendentemente dalla data dell'incasso o del pagamento"). The document date stands in for the competence date: it is the date of the operation for an immediate invoice (art. 21, c. 4 DPR 633/1972) and the end of the month for a deferred one (TD24, TD25). A service spanning two periods is not split.
- **Not revenue**: TD16–TD19 and TD28 (reverse-charge integrations: VAT only, the cost is the supplier's invoice), TD20 (regularisation self-invoice: a cost), TD21–TD23 (splafonamento, VAT warehouse: VAT only), TD26 (sale of a fixed asset: the gain is income, which needs the book value), TD27 (self-supply and free supplies), TD29.
- `not_included` lists what is left out: invoices still at SDI, supplier invoices to review, TD26 sales, foreign-currency documents without a rate.
- `by_month` gives revenue, costs and result for each month.

Non-deductible VAT, which is a cost in the accounts, is not known to Getbeel and is not added.

### Cash flow (`cash-flow`) [#cash-flow-cash-flow]

Money in and out of the accounts in Getbeel (uploaded statements and connected banks) by booking date, month by month. Outflows matched to a supplier invoice (approved match) are grouped by its category, the rest under `unmatched`. `invoice_payments_recorded` reports payments recorded on issued invoices (app, Stripe, API): shown apart, never added to the bank movements.

### Receivables aging (`aging`) [#receivables-aging-aging]

What customers still owe **today** on issued invoices, by days past the due date: `not_due`, `overdue_1_30`, `overdue_31_60`, `overdue_61_90`, `overdue_over_90`. `period`, `from` and `to` are not used.

- Outstanding = document total less the ritenuta withheld by the customer and the credit notes issued (the `ImportoPagamento`), less the VAT of split-payment invoices, which the public body pays to the State (art. 17-ter DPR 633/1972), less the payments recorded.
- No due date on the invoice: 30 days after the invoice date (art. 4, c. 2, lett. a, D.Lgs. 231/2002, "trenta giorni dalla data di ricevimento da parte del debitore della fattura"; the invoice date stands in for the date of receipt). Those rows have `due_date_assumed: true`.
- `customers` sums per customer; `invoices` lists the invoices, most overdue first (at most 1,000, then `has_more`).

## Export for the accountant [#export-for-the-accountant]

```bash
curl -o export.zip "https://www.getbeel.com/api/v1/companies/me/accountant-export?period=2026-Q3" \
  -H "Authorization: Bearer $GETBEEL_API_KEY"
```

`period` is a year, a quarter or a month. Italian companies only. The ZIP contains:

| Folder or file                | Content                                                                                                                                                                                   |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fatture-emesse/`             | FatturaPA XML of the issued invoices accepted by or pending at SDI, as transmitted (SDI file name)                                                                                        |
| `fatture-ricevute/`           | XML of the supplier invoices of the period (by document or receipt date), as received from SDI or attached; PDFs and images in `altri-documenti/`                                         |
| `autofatture/`                | XML of the TD16–TD19 self-invoices Getbeel sent                                                                                                                                           |
| `prima-nota-iva.csv`          | One line per document and VAT rate or natura: register, dates, number, document type, counterparty, `AliquotaIVA`, `Natura`, `ImponibileImporto`, `Imposta`, total, status, XML file name |
| `registri-iva/`               | Sales and purchase VAT registers of each settlement period (CSV), when the company charges VAT                                                                                            |
| `banca/movimenti-bancari.csv` | The bank movements of the period with the matched invoice                                                                                                                                 |
| `LEGGIMI.txt`                 | What is inside, and any file that could not be read                                                                                                                                       |

CSVs use semicolons, decimal commas and UTF-8 with BOM, so Excel opens them as is.

**Accounting software formats.** Italian accounting packages (TeamSystem, Zucchetti, Profis by Sistemi and others) import e-invoices from the FatturaPA XML files (technical specifications, Allegato A v1.9.1): the one format they all share. None of the three publishes the layout of its journal import, so Getbeel does not produce a proprietary format and does not guess one.

A period with more than 3,000 files or 250 MB answers `422 too_many_documents`: ask for a quarter or a month.

## MCP and SDKs [#mcp-and-sdks]

- MCP: `get_report` with `type` and `period` (or `from`/`to`). The ZIP export is not an MCP tool: it is a binary file.
- TypeScript SDK: `getbeel.taxes.report('profit-and-loss', { period: '2026' })`, `getbeel.taxes.accountantExport('2026-Q3')` (a `Blob`).
- Python SDK: `client.taxes.report("aging")`, `client.taxes.accountant_export("2026-Q3")` (bytes).
- CLI: `getbeel taxes report --type cash-flow --period 2026-Q3`.
