Aggregate cost data across costs and customers with grouping, filtering, and time-series breakdown.
API key authentication
The merchant organization ID. If omitted, defaults to the merchant associated with the authenticated API key.
Start of the query window (ISO 8601).
End of the query window (ISO 8601).
Dimension to group results by. Valid values: 'cost' (group by cost ID), 'customer' (group by customer ID), or any dimension key from a filtered cost's groupBy schema for dynamic dimension grouping. Dynamic dimension values require exactly one costId filter.
Filter to specific cost(s). Enables dynamic dimension grouping.
Filter to a specific subject (customer/event subject ID).
JSON-encoded dimension filters (e.g. {"region":"us-east-1"}). Max 4KB, max 5 keys.
4096Number of top groups to return. An 'Other' bucket aggregates remaining groups.
1 <= x <= 25When true, include prior-period comparison data in each group.
Time window granularity for the time-series breakdown.
HOUR, DAY, MONTH Field to sort groups by.
totalCost, totalQuantity Sort direction.
asc, desc Number of groups to skip for pagination.
x >= 0Maximum number of groups to return.
1 <= x <= 100Filter costs to a single ISO 4217 currency code (e.g. 'USD'). When omitted, defaults to the merchant's primary currency.
Aggregated cost report
cost_report ISO 4217 currency code for all monetary values in this response.
The active grouping dimension (e.g. 'cost', 'customer', or a dynamic dimension key).
Sum of cost across all groups (not just top N).
Sum of quantity across all groups.
Top N groups plus an 'Other' bucket aggregating the remainder.
Time-bucketed breakdown per group. Keys in each window's 'groups' object correspond to CostReportGroup.key. The 'Other' bucket key is 'other'.
Dimension keys available for further drill-down (populated when a single cost is filtered).
Non-fatal warnings, e.g. costs that could not be queried.