---
title: "Get usage"
method: GET
path: "/v3/usage"
tags: ["Usage"]
---

# Get usage

`GET /v3/usage`

Returns daily credits consumption for an organization over a date range. Optionally scope the report to a single workspace, a single document type, or a single (workspace × document type) pair by supplying both `workspace` and `document_type`.

## Query parameters

- `organization` string, required — Uniquely identify an organization.
- `workspace` string — Uniquely identify a workspace.
- `document_type` string — Uniquely identify a collection.
- `start` string, date
- `end` string, date

## Response `200`

Daily credits consumption for the requested scope.

- UsageResponse — Daily credits consumption for an organization over a date range, optionally scoped to a single workspace, a single document type, or a single (workspace × document type) pair.
  - `scope` 'organization' | 'workspace' | 'documentType' | 'workspaceAndDocumentType', required — What the usage was scoped to.
  - `scopeIdentifier` string, required — Identifier of the scoped entity: the organization, workspace, or document type identifier. When scoped to a (workspace × document type) pair, it is the workspace and document type identifiers joined by a colon (`{workspaceIdentifier}:{documentTypeIdentifier}`).
  - `start` string, date, required — Inclusive start of the reported period (YYYY-MM-DD).
  - `end` string, date, required — Inclusive end of the reported period (YYYY-MM-DD).
  - `total` integer, required — Total credits consumed over the period.
  - `items` UsageItem[], required — Per-day breakdown. Days with zero usage are omitted.
    - `date` string, date, required — The day this usage was recorded against, in YYYY-MM-DD.
    - `count` integer, required — Credits consumed on this day.

## Other responses

- `400` — Bad request. If it is a validation error will contain a list of each invalid field
- `401` — Authorisation error
- `default` — UnexpectedError

---

[API](https://skmtc.net/affinda/apis/affinda-api-2.md) · [All operations](https://skmtc.net/affinda/apis/affinda-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinda/affinda-api-2/versions/6772e50cb58e/schema)
