Skip to content
Join our SlackContact usGet started

Pricing Metrics

List Pricing Metrics
client.pricingMetrics.list(PricingMetricListParams { limit } query?, RequestOptionsoptions?): PricingMetricListResponse { has_more, pricing_metrics }
get/pricing-metrics
Create Pricing Metric
client.pricingMetrics.create(PricingMetricCreateParams { aggregation, event_name, name, 2 more } body, RequestOptionsoptions?): PricingMetricResource { id, aggregation, event_name, 3 more }
post/pricing-metrics
Get Pricing Metric
client.pricingMetrics.retrieve(stringpricingMetricID, RequestOptionsoptions?): PricingMetricResource { id, aggregation, event_name, 3 more }
get/pricing-metrics/{pricing_metric_id}
Create Pricing Metric Summary
client.pricingMetrics.createSummary(stringpricingMetricID, PricingMetricCreateSummaryParams { period, subject_id } body, RequestOptionsoptions?): PricingMetricCreateSummaryResponse { id, period, pricing_metric_id, 2 more }
post/pricing-metrics/{pricing_metric_id}/summary
ModelsExpand Collapse
Period { end, start, inclusive_end, inclusive_start }
end: string
formatdate-time
start: string
formatdate-time
inclusive_end?: boolean
inclusive_start?: boolean
PricingMetricResource { id, aggregation, event_name, 3 more }
id: string

The ID of the pricing metric.

aggregation: SumAggregationPricingMetricResource { aggregation_type, value_field } | CountAggregationPricingMetricResource { aggregation_type } | MaxAggregationPricingMetricResource { aggregation_type, value_field } | LastAggregationPricingMetricResource { aggregation_type, value_field }

The aggregation function used to compute the value of the pricing metric.

Accepts one of the following:
SumAggregationPricingMetricResource { aggregation_type, value_field }
aggregation_type: "sum"
Accepts one of the following:
"sum"
value_field: string

The field to sum over.

CountAggregationPricingMetricResource { aggregation_type }
aggregation_type: "count"
Accepts one of the following:
"count"
MaxAggregationPricingMetricResource { aggregation_type, value_field }
aggregation_type: "max"
Accepts one of the following:
"max"
value_field: string

The field to get the max value of.

LastAggregationPricingMetricResource { aggregation_type, value_field }
aggregation_type: "last"
Accepts one of the following:
"last"
value_field: string

The field to get the last value of.

event_name: string

The event name that the pricing metric is computed on.

name: string

The name of the pricing metric.

unit: string

The unit of the value computed by the pricing metric.

dimensions?: Array<string> | null

The dimensions by which the events are grouped to compute the pricing metric.