Get usage
Changed onReturns 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.
Request
- Base URLhttps://api.affinda.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Uniquely identify an organization.
Organization to report usage for. The caller must be an admin or owner.
Uniquely identify a workspace.
Optionally scope the report to a single workspace within the organization. Combine with document_type to scope to a single (workspace × document type) pair.
Uniquely identify a collection.
Optionally scope the report to a single document type within the organization. Combine with workspace to scope to a single (workspace × document type) pair.
Inclusive start date of the report (YYYY-MM-DD). Defaults to 365 days before end.
Inclusive end date of the report (YYYY-MM-DD). Defaults to today.
Response
Daily credits consumption for the requested scope.
Example response
{
"start": "2025-04-01",
"end": "2025-04-30",
"total": 4320,
"items": [
{
"date": "2025-04-15",
"count": 123
}
]
}Changes
- warning
added the new
workspaceAndDocumentTypeenum value to theresponse property for the response status
- warning
- info
endpoint added
- info