---
title: "Retrieve organization billing stats group"
method: POST
path: "/api/v1/organization_groups/{organizationGroupID}/billing_stats"
tags: ["Organization Group"]
---

# Retrieve organization billing stats group

`POST /api/v1/organization_groups/{organizationGroupID}/billing_stats`

Download billing stats report for an organization group.

**Limitations**:
- `filter.queues` can only be used when `filter.organizations` contains a single organization
- `filter.queues` cannot be used for `group_by=organization`

## Path parameters

- `organizationGroupID` integer, required

## Request body

- object
  - `filters` BillingFiltersOrgGroup — 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.
    - `organizations` string[] — Filter billed items for the specified organizations to be counted in the report. (Only available for organization groups)
  - `group_by` string[] — List of attributes by which the `results` are to be grouped. Only a single value is supported. Note that 'organization' is only available for organization groups.
  - `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, nullable — Organization URL.
    - `organization_group` string, uri — Organization group URL. (Only present for organization groups)
    - `queue` string, uri, nullable — Queue URL (null for historically deleted queues).
    - `values` BillingHistoryValues — Billing values for a specific period or grouping.
      - `billable_documents` integer — Number of billable documents.
      - `billable_pages` integer — Number of billable pages.
      - `non_billable_documents` integer — Number of non-billable documents.
      - `non_billable_pages` integer — Number of non-billable pages.
      - `purchased_documents` integer — Number of purchased documents.
      - `purchased_pages` integer — Number of purchased pages.
      - `extracted_pages_with_learning` integer — Number of extracted pages with learning.
      - `extracted_pages_without_learning` integer — Number of extracted pages without learning.
      - `split_pages_with_learning` integer — Number of split pages with learning.
      - `split_pages_without_learning` integer — Number of split pages without learning.
      - `extracted_documents_with_learning` integer — Number of extracted documents with learning.
      - `extracted_documents_without_learning` integer — Number of extracted documents without learning.
      - `split_documents_with_learning` integer — Number of split documents with learning.
      - `split_documents_without_learning` integer — Number of split documents without learning.
      - `ocr_only_pages` integer — Number of OCR-only pages.
      - `ocr_only_documents` integer — Number of OCR-only documents.
      - `purchased_extracted_pages_with_learning` integer — Number of purchased extracted pages with learning.
      - `purchased_extracted_pages_without_learning` integer — Number of purchased extracted pages without learning.
      - `purchased_split_pages_with_learning` integer — Number of purchased split pages with learning.
      - `purchased_split_pages_without_learning` integer — Number of purchased split pages without learning.
      - `purchased_extracted_documents_with_learning` integer — Number of purchased extracted documents with learning.
      - `purchased_extracted_documents_without_learning` integer — Number of purchased extracted documents without learning.
      - `purchased_split_documents_with_learning` integer — Number of purchased split documents with learning.
      - `purchased_split_documents_without_learning` integer — Number of purchased split documents without learning.
      - `purchased_ocr_only_pages` integer — Number of purchased OCR-only pages.
      - `purchased_ocr_only_documents` integer — Number of purchased OCR-only documents.
      - `is_current` boolean — Whether this is the current billing period.
  - `totals` BillingHistoryTotals — Total billing values across all periods or groupings.
    - `billable_documents` integer — Number of billable documents.
    - `billable_pages` integer — Number of billable pages.
    - `non_billable_documents` integer — Number of non-billable documents.
    - `non_billable_pages` integer — Number of non-billable pages.
    - `purchased_documents` integer — Number of purchased documents.
    - `purchased_pages` integer — Number of purchased pages.
    - `extracted_pages_with_learning` integer — Number of extracted pages with learning.
    - `extracted_pages_without_learning` integer — Number of extracted pages without learning.
    - `split_pages_with_learning` integer — Number of split pages with learning.
    - `split_pages_without_learning` integer — Number of split pages without learning.
    - `extracted_documents_with_learning` integer — Number of extracted documents with learning.
    - `extracted_documents_without_learning` integer — Number of extracted documents without learning.
    - `split_documents_with_learning` integer — Number of split documents with learning.
    - `split_documents_without_learning` integer — Number of split documents without learning.
    - `ocr_only_pages` integer — Number of OCR-only pages.
    - `ocr_only_documents` integer — Number of OCR-only documents.
    - `purchased_extracted_pages_with_learning` integer — Number of purchased extracted pages with learning.
    - `purchased_extracted_pages_without_learning` integer — Number of purchased extracted pages without learning.
    - `purchased_split_pages_with_learning` integer — Number of purchased split pages with learning.
    - `purchased_split_pages_without_learning` integer — Number of purchased split pages without learning.
    - `purchased_extracted_documents_with_learning` integer — Number of purchased extracted documents with learning.
    - `purchased_extracted_documents_without_learning` integer — Number of purchased extracted documents without learning.
    - `purchased_split_documents_with_learning` integer — Number of purchased split documents with learning.
    - `purchased_split_documents_without_learning` integer — Number of purchased split documents without learning.
    - `purchased_ocr_only_pages` integer — Number of purchased OCR-only pages.
    - `purchased_ocr_only_documents` integer — Number of purchased OCR-only documents.
  - `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/f1b5a910991d/schema)
