Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to preview a metric calculation without saving

template
enum<string>
required

Metric template name

Available options:
GROSS_VOLUME,
TRANSACTION_COUNT,
NEW_USERS
params
object
required

Metric parameters. Structure varies by template, but common fields include:

  • Date range filters
  • Calculation interval
  • Breakdown dimensions
  • Template-specific filters

Additional properties may be present based on the metric template. Each template may define template-specific parameters.

Response

Metric calculation results

Response from metric calculation endpoints. The structure of data array items varies based on the breakdowns parameter in the request.

Base structure (no breakdowns):

  • Each item has: periodStart, plus metric-specific fields (e.g., grossVolume, transactionCount)

With breakdowns:

  • Each item includes breakdown dimension fields (e.g., transactionType, transactionStatus, userId)
  • Field names match the breakdown dimension names from the request

Example without breakdowns:

Example with breakdowns: ["transactionType"]:

status
enum<string>

Response status

Available options:
success
data
object[]

Array of metric calculation results. Each object structure depends on:

  1. The metric template (determines metric value fields)
  2. The breakdowns parameter (adds dimension fields)
metadata
object

Metadata about the metric calculation