Skip to main content

Billable metric object

This object represents a billable metric.

Schema

{
"billable_metric": {
"lago_id": "b7ab2926-1de8-4428-9bcd-779314ac129b",
"name": "bm_name",
"code": "bm_code",
"description": "description",
"aggregation_type": "sum_agg",
"field_name": "amount_sum",
"created_at": "2022-04-29T08:59:51Z",
"group": {},
"active_subscriptions_count": 0,
"draft_invoices_count": 0
}
}
AttributesDescription
lago_id     String     Not nullUnique identifier of the billable metric in Lago application.
name     String     Not nullBillable metric name.
code     String     Not nullCode identifying the billable metric.
description     StringBillable metric description.
aggregation_type     String     Not null
Aggregation type that is used in event calculation.
Possible values
- count_agg (metered)
- sum_agg (metered)
- max_agg (metered)
- unique_count_agg (metered)
- recurring_count_agg (persistent)
field_name     StringField name used in events.
created_at     String     Not null    
ISO 8601 datetime in UTC
Date of billable metric creation.
group     ObjectGroup (one or two dimensions) for pricing differently the billable metric
active_subscriptions_count     Integer     Not nullCount of active subscription attached to the billable metric. This field can be used to know the impact of deleting this billable metric.
draft_invoices_count     Integer     Not nullCount of draft invoices containing a subscription attached to the billable metric. This field can be used to know the impact of deleting this billable metric.