Account revenue queries require the
stats:read permission. See
Permissions to request permissions for your app.Discover metrics
List metrics to get their keys, names, units, descriptions, and filterable properties:key, such as gross_revenue, in the next request. Its properties array lists the properties you can filter or break down by.
Retrieve a time series
Pass your account ID and a date range to Retrieve metric:data.points array contains a Unix timestamp in seconds and a value for each period. Read the value in the catalog’s unit: count is a count, currency is a decimal amount, and percent is already in percentage points (1.6 means 1.6%).
Some metrics also return data.totals for the whole range. Use those totals when provided: averaging daily rates or summing daily unique counts doesn’t give the whole-range result.
Filter and break down results
Pass a property directly as a query parameter to filter it. Usebreakdown_by to split each point by one property. This example filters gross revenue to card payments and splits it by the original transaction currency:
breakdown array of { name, value } entries. Filtering or breaking down transaction metrics by currency reports their original currency amounts without conversion.
Only use properties listed for the metric. An unsupported property returns 400. An unknown metric key returns 404. See the query parameters and metric reference for time zones, intervals, snapshot windows, and metric-specific options.
