---
title: "Retrieve organization billing stats"
method: POST
path: "/api/v1/organizations/{organizationID}/billing_stats"
tags: ["Organization"]
---

# Retrieve organization billing stats

`POST /api/v1/organizations/{organizationID}/billing_stats`

In order to obtain an overview of the billed items, you can get basic billing statistics.

The billing unit (pages or documents) is defined in the contract.

## Request body

- object
  - `filters` BillingFiltersBase — Filters used for the computation of billed items counts.
    - `queues` string[] — Filter billed items for the specified queues (or `null` for historically deleted queues) to be counted in the report.
    - `begin_date` string, date — Filter billed items that was issued **since** the specified date (including the specified date) to be counted to the report.
    - `end_date` string, date — Filter billed items that was issued **up to** the specified date (including the specified date) to be counted to the report.
  - `group_by` string[] — List of attributes by which the `results` are to be grouped. Only a single value is supported.
  - `order_by` string[] — List of attributes by which the `results` are to be ordered.

## Response `200`

OK

- object
  - `pagination` Pagination, required
    - `next` string, uri, nullable — URL for the next page of results. Contains an opaque signed `cursor` query parameter. Use this URL directly to fetch the next page — do not attempt to construct or modify the cursor value.
    - `previous` string, uri, nullable — URL for the previous page of results. Contains an opaque signed `cursor` query parameter. Use this URL directly to fetch the previous page — do not attempt to construct or modify the cursor value.
  - `results` object[], required
    - `begin_date` string, date — Begin date of the billing period.
    - `end_date` string, date — End date of the billing period.
    - `organization` string, uri — Billed pages or documents Organization.
    - `queue` string, uri — Billed pages or documents Queue.
    - `values` object — Contains the data of totals list grouped by the group_by.
      - `billable_documents` integer — Number of documents billed.
      - `billable_pages` integer — Number of pages billed.
      - `non_billable_documents` integer — Number of documents that were received but not billed.
      - `non_billable_pages` integer — Number of pages that were received but not billed.
  - `totals` object — Summary information for the whole period (between begin_date and end_date).
    - `billable_documents` integer — Number of documents billed.
    - `billable_pages` integer — Number of pages billed.
    - `non_billable_documents` integer — Number of documents that were received but not billed.
    - `non_billable_pages` integer — Number of pages that were received but not billed.
  - `updated_at` string, date — Date when the billing stats were last updated.

## Other responses

- `400` — Invalid input data.
- `401` — The username/password is invalid or token is invalid (e.g. expired).
- `403` — Insufficient permission, missing authentication, invalid CSRF token and similar issue.
- `404` — The specified resource was not found.
- `409` — Conflict
- `413` — Payload too large (especially for files uploaded).
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

[API](https://skmtc.dev/rossum/apis/rossum-api.md) · [All operations](https://skmtc.dev/rossum/apis/rossum-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rossum/rossum-api/revisions/dbbbbe8374e6/schema)
