GET
/
metrics
List Billable Metrics
curl --request GET \
  --url https://api.alguna.io/metrics \
  --header 'Authorization: Bearer <token>'
{
  "id": "mtr_02zBU3PJ3hJurtFSxDD3Ol",
  "description": "No. of Amex Consumer Cards",
  "name": "Amex Consumer",
  "eventName": "transactions",
  "filters": [
    {
      "operator": "and",
      "filters": [
        {
          "field": "card_scheme",
          "operator": "equal",
          "value": "amex"
        },
        {
          "field": "card_offering",
          "operator": "equal",
          "value": "consumer"
        }
      ]
    }
  ],
  "aggregation": {
    "method": "sum",
    "field": "txn_value"
  },
  "createdAt": "2025-02-24T12:09:05.350876Z",
  "updatedAt": "2025-02-24T12:09:05.350877Z",
  "organizationID": "8641473c-2d34-46c6-b712-c893934fc8fb"
}

Response

id
string
The unique identifier for the metric.
description
string
A brief description of what the metric measures.
name
string
The name of the metric.
eventName
string
The event that triggers the metric.
filters
[]object
An array of filter groups applied to the metric to narrow down the events counted.
aggregation
object
The aggregation settings that define how the events are calculated to produce the metric value.
createdAt
datetime
The timestamp when the metric was created.
updatedAt
datetime
The timestamp when the metric was last updated.
organizationID
string
The unique identifier for the organization associated with the metric.
{
  "id": "mtr_02zBU3PJ3hJurtFSxDD3Ol",
  "description": "No. of Amex Consumer Cards",
  "name": "Amex Consumer",
  "eventName": "transactions",
  "filters": [
    {
      "operator": "and",
      "filters": [
        {
          "field": "card_scheme",
          "operator": "equal",
          "value": "amex"
        },
        {
          "field": "card_offering",
          "operator": "equal",
          "value": "consumer"
        }
      ]
    }
  ],
  "aggregation": {
    "method": "sum",
    "field": "txn_value"
  },
  "createdAt": "2025-02-24T12:09:05.350876Z",
  "updatedAt": "2025-02-24T12:09:05.350877Z",
  "organizationID": "8641473c-2d34-46c6-b712-c893934fc8fb"
}