Skip to main content
GET
List accounts with usage for a time range.

Authorizations

x-api-key
string
header
required

LedgerUp API Key.

Query Parameters

start_at
integer<int64>
required

Inclusive lower bound for event occurrence time. Unix timestamp in seconds.

Example:

1767225600

end_at
integer<int64>
required

Exclusive upper bound for event occurrence time. Unix timestamp in seconds.

Example:

1767225600

aggregation
enum<string>
default:sum

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.

Available options:
sum,
min,
max,
avg,
latest,
count
Example:

"sum"

limit
integer<int64>
default:100

Maximum number of records to return. Defaults to 100.

Required range: 1 <= x <= 100
starting_after
string

Cursor account id from the previous page. Return the next records after this account id.

sort
enum<string>
default:created_at

Account ordering. Metric ordering requires metric_id or currency.

Available options:
created_at,
customer_name,
metric_ascending,
metric_descending
metric_id
string

Metric used for metric_ascending or metric_descending sorting. LedgerUp metric identifier.

Pattern: ^metric_[0-9a-f]{32}$
Example:

"metric_0194f4e3a2b77c6aa91c4f6b4db2a980"

currency
string

Currency used for metric_ascending or metric_descending sorting. Normalized to lowercase.

Pattern: ^[A-Za-z]{3}$
Example:

"usd"

Response

Page of accounts and aggregated usage.

data
object[]
required
has_more
boolean
required

True when additional records are available after the returned page.

Example:

false