Billable metrics
List all billable metrics
This endpoint retrieves all existing billable metrics that represent pricing components of your application.
GET
/
billable_metrics
Authorization
Query
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request GET "$LAGO_URL/api/v1/billable_metrics?per_page=2&page=1" \
--header "Authorization: Bearer $API_KEY"
{
"billable_metrics": [
{
"active_subscriptions_count": 4,
"aggregation_type": "sum_agg",
"code": "storage",
"created_at": "2022-09-14T16:35:31Z",
"description": "GB of storage used in my application",
"draft_invoices_count": 10,
"field_name": "gb",
"group": {
"key": "region",
"values": [
"us-east-1",
"us-east-2",
"eu-west-1"
]
},
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Storage",
"plans_count": 4,
"recurring": true,
"weighted_interval": "seconds"
}
],
"meta": {
"current_page": 2,
"next_page": 3,
"prev_page": 1,
"total_count": 70,
"total_pages": 4
}
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
page
integer
Page number.
per_page
integer
Number of records per page.
Response
200 - application/json
billable_metrics
object[]
requiredmeta
object
requiredWas this page helpful?
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request GET "$LAGO_URL/api/v1/billable_metrics?per_page=2&page=1" \
--header "Authorization: Bearer $API_KEY"
{
"billable_metrics": [
{
"active_subscriptions_count": 4,
"aggregation_type": "sum_agg",
"code": "storage",
"created_at": "2022-09-14T16:35:31Z",
"description": "GB of storage used in my application",
"draft_invoices_count": 10,
"field_name": "gb",
"group": {
"key": "region",
"values": [
"us-east-1",
"us-east-2",
"eu-west-1"
]
},
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Storage",
"plans_count": 4,
"recurring": true,
"weighted_interval": "seconds"
}
],
"meta": {
"current_page": 2,
"next_page": 3,
"prev_page": 1,
"total_count": 70,
"total_pages": 4
}
}