Skip to main content
GET
/
metrics
curl "https://api.alguna.io/metrics?page=1&limit=25" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "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"
}

Retrieves a paginated list of all billable metrics. You can filter and sort the results using query parameters.

Query Parameters

page
integer
default:"1"
The page number to retrieve (1-indexed).
limit
integer
default:"10"
The number of metrics to return per page. Must be one of: 5, 10, 25, 50, or 100. Values exceeding 100 are capped automatically.
filters
string
A JSON-encoded array of filter objects. Each filter object has the following properties:
sort
string
Sort specification in field:order format. Order is either asc (ascending) or desc (descending).Sortable fields: name.
curl "https://api.alguna.io/metrics?page=1&limit=25" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "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"
}

items
array
List of billable metric objects.
pageCount
integer
Total number of pages available based on the current limit.
limit
integer
The number of items per page used for this request.