List accounts with usage for a time range.
Returns a page of accounts with usage aggregated by metric or currency. Metric sorting requires exactly one of metric_id or currency.
Query parameters
Unix timestamp in seconds.
Inclusive lower bound for event occurrence time.
Unix timestamp in seconds.
Exclusive upper bound for event occurrence time.
Aggregation applied to corrected usage events. latest returns the quantity from the event with the latest occurred_at; ties use accepted_at then event ID. count returns the number of events.
Maximum number of records to return. Defaults to 100.
Return the next records after this account id.
Cursor account id from the previous page.
Account ordering. Metric ordering requires metric_id or currency.
LedgerUp metric identifier.
Metric used for metric_ascending or metric_descending sorting.
Currency used for metric_ascending or metric_descending sorting. Normalized to lowercase.
Response
Page of accounts and aggregated usage.
Example response
{
"data": [
{
"account": {
"id": "account_0194f4e3a2b77c6aa91c4f6b4db2a980",
"external_id": "crm_acme_001",
"ledgerup_customer_id": "0194f4e3-a2b7-7c6a-a91c-4f6b4db2a980",
"name": "Acme",
"description": "Usage tracked for Acme.",
"created_at": 1767225600,
"updated_at": 1767225600,
"archived_at": 1767225600
},
"events_consumed": [
{
"metric_id": "metric_0194f4e3a2b77c6aa91c4f6b4db2a980",
"currency": "usd",
"metric_name": "Tokens",
"measurement_units": "m",
"quantity": "1250.5"
}
]
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.