Skip to main content
POST
Get usage analytics

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

application/json

Request body

breakdown_bucket
boolean

BreakdownBucket when true augments each time-series point with BucketID/PriceID and appends a BucketSummaries rollup to each item. Requires WindowSize to be set and the item to be linked to a subscription line item that has CommitmentTimeBuckets. Default: false (opt-in, backward compatible).

end_time
string<date-time>
expand
string[]

allowed values: "price", "meter", "feature", "subscription_line_item","plan","addon"

external_customer_id
string

ExternalCustomerID is the single external customer ID. Optional when ExternalCustomerIDs is provided; required otherwise.

feature_ids
string[]
group_by
string[]

allowed values: "source", "feature_id", "properties.<field_name>"

include_children
boolean

IncludeChildren when true folds child customers' usage into the single aggregated total. Default: false.

property_filters
object

Property filters to filter the events by the keys in properties field of the event

sources
string[]
start_time
string<date-time>
window_size
enum<string>
Available options:
MINUTE,
15MIN,
30MIN,
HOUR,
3HOUR,
6HOUR,
12HOUR,
DAY,
WEEK,
MONTH

Response

OK

currency
string
custom_analytics
object[]
items
object[]
subtotal
string
total_cost
string

TotalCost is the final cost after discount (Subtotal - TotalDiscount)

total_discount
string