beel_list_stats
Retrieve per-company fiscal document counts and last invoice issue dates for an account, with pagination and search support.
Instructions
Returns, for each company of the account, how many fiscal documents it has issued and when it last issued one.
invoice_count: drafts, scheduled invoices and proformas are not counted; a rectifying invoice counts as a document of its own, and a voided invoice counts only when a live rectifying invoice compensates it.last_invoice_at: issue date of the most recent document in that same set, ornullwhen there is none.Not a cursor: the count is not monotonic — voiding an uncompensated invoice lowers it and moves
last_invoice_atbackwards — so do not synchronise on it.
Paginated with the usual page/limit, and the usual defaults: without them you get
the stats of the first 20 companies, not of all of them. One row per company, over the same
universe and in the same order as GET /v1/accounts/{account_id}/companies — search
included — so asking both with the same page, limit and search lines the two
responses up company by company.
Endpoint: GET /v1/accounts/{account_id}/companies/stats
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number, starting at 1. The response echoes it back as `pagination.current_page`. | |
| limit | No | How many items to return per page. The response echoes it back as `pagination.items_per_page`. | |
| search | No | Case-insensitive filter on NIF, legal name or trade name — the same filter, over the same universe, as the one `GET /v1/accounts/{account_id}/companies` applies. Blank or omitted returns all. | |
| account_id | Yes | Your own account, or an account you provisioned. It — not the credential — decides which account the operation acts on; a `403` is returned when you do not reach it, the same response an account that does not exist gets. |