Skip to navigation

List usage summaries

Draft scaffold — not implemented or available in the API.

Returns usage per meter between startsAt (included) and endsAt (excluded), bucketed by granularity, with what it cost the buyer in spend. Filter by customer, customerUnit, segment, product, order or meters, and split rows with groupBy; omit customer for usage across all customers. With customer, includeChildren: true adds its child customers’ usage. basis defaults to usage, which buckets by when usage happened; invoice buckets posted usage charges by invoice posting time. Summaries are computed on request, so there is no retrieve.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Headers

Paid-BetaenumRequired

This endpoint is in the usage_summaries=v1 beta. Send this header to use it.

Allowed values:

Query parameters

endsAtdatetimeRequired
Exclusive query end.
granularityenumRequired
Bucket granularity.
Allowed values:
startsAtdatetimeRequired
Inclusive query start.
basisenumOptionalDefaults to usage
Current usage attribution or immutable invoice postings.
Allowed values:
cursorstringOptional

The nextCursor of the previous page. Omit it for the first page.

customerstringOptional1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
customerUnitstringOptional1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
groupBylist of stringsOptional

Up to 3 of meter, customer, customerUnit, segment, product, outcome, or a path in the meter’s own groupBy. With segment, a customer in two segments counts in both groups, and customers in none are grouped under null.

includeChildrenenumOptional

Pass true to include the usage of customer’s child customers; split it with groupBy: ["customer"]. Defaults to false. Needs customer, and cannot be sent with customerUnit.

Allowed values:
includeDescendantsenumOptional

Include the unit subtree; defaults to true.

Allowed values:
limitintegerOptional1-100Defaults to 10
How many objects to return, 1 to 100. Defaults to 10.
meterslist of stringsOptional
Meters to summarize.
orderstringOptional1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
productstringOptional1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
segmentstringOptional1-255 characters

Only usage by customers in this segment, by key or seg_ ID. Cannot be sent with customer.

timezonestringOptionalDefaults to UTC
IANA timezone for calendar buckets.

Response

200
objectenum

The type of object. Always list.

Allowed values:
asOfdatetime
When the snapshot was computed.
basisenum
The attribution and posting basis.
Allowed values:
datalist of objects
The summary rows on this page.
hasMoreboolean
Whether another page follows this one.
nextCursorstring or null

Send it as cursor to get the next page. Null on the last page.

revisionstring1-255 characters

Identifies the snapshot this list was calculated from. Every page of the list shares it, and late events or corrections under basis: usage produce a new one.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
501
Not Implemented Error