---
title: "Get invoice statistics"
method: GET
path: "/companies/{company}/invoices/stats"
tags: ["Invoices"]
---

# Get invoice statistics

`GET /companies/{company}/invoices/stats`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/companies/{company}/invoices/stats`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Returns aggregate KPIs for the company: counts by status, revenue, pending and overdue totals, average days to payment, and corrective counts. Filterable by period (defaults to the current year).

## Path parameters

- `company` string, uuid, required

## Query parameters

- `date_from` string, date, nullable
- `date_to` string, date, nullable

## Headers

- `Factuarea-Version` string, date

## Response `200`

- object
  - `data` InvoiceStats, required: Aggregated invoicing metrics (KPIs) for the queried period.
    - `object` 'invoice_stats', required
    - `total_count` integer, required: Total number of invoices in the period.
    - `by_status` object, required: Invoice count by status (key = status, value = number of invoices). Issued invoices are counted under `issued`; before API version `2026-10-01` that key is `sent`.
    - `revenue_total` string, required: Total amount invoiced in the period.
    - `pending_amount` string, required: Total amount pending collection.
    - `overdue_count` integer, required: Number of overdue and unpaid invoices.
    - `overdue_amount` string, required: Total amount overdue and unpaid.
    - `average_payment_days` number, nullable, required: Average number of days until payment of paid invoices. `null` if there are no paid invoices in the period.
    - `corrective_count` integer, required: Number of corrective invoices issued in the period.
    - `period` object, required: Period covered by the metrics.
      - `from` string, date, nullable, required: Start of the period (YYYY-MM-DD), or `null` if not filtered.
      - `to` string, date, nullable, required: End of the period (YYYY-MM-DD), or `null` if not filtered.

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `401`: Missing or invalid API key.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`).
- `404`: The requested resource does not exist or belongs to another company. `profile_not_found`: the company in the path does not exist, is not in the API key scope or belongs to the other environment (live or test).
- `422`: Validation failed, or the invoice cannot undergo the requested state transition (e.g. marking an already-paid invoice as paid, or editing an issued invoice — use a corrective instead). The `error.param` field identifies which input is invalid, if any. Issuing or annulling an invoice can also be rejected with `verifactu_not_eligible`: either a field of the invoice does not fit its billing record, or — only when the company has VeriFactu enabled in NO VERI*FACTU mode — it has no usable signing certificate (`error.subcode: signing_certificate_unavailable`; `error.param` is `certificate`, `representation` or `system_certificate`, depending on what is missing); in both cases the invoice stays exactly as it was.
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
