Custom Metrics

Custom metrics

Returns all store-wide custom metrics available to the authenticated API
key. This endpoint only returns lightweight metric metadata and does not
calculate values.

GET /api/v1/store/custom-metrics

Custom metrics

curl --request GET \
  --url 'https://{baseUrl}/api/v1/store/custom-metrics' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": 101,
      "name": "Average Order Value",
      "description": "A public metric.",
      "format": "money",
      "decimals": 2
    },
    {
      "id": 102,
      "name": "Repeat Customer Rate",
      "description": "Store-wide repeat customer percentage.",
      "format": "percent",
      "decimals": 1
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 50,
    "has_more_pages": false
  }
}

No response description.

Authorizations

  • Authorization string required header

    Generate a store API key from the store's Metorik API settings in Metorik, and choose the scopes needed for the endpoints you want to call.

Query Parameters

  • page integer

    Page number. Min 1. Example: 1

  • per_page integer

    Number of custom metrics per page. Min 1, max 100. Defaults to 50. Example: 50

Headers

  • Accept string required

    Response format header. Example: application/json

Response

application/json
  • data[] object array
    + Show Child Attributes
    • id integer
    • name string
    • description string
    • format string
    • decimals integer
  • pagination object
    + Show Child Attributes
    • current_page integer
    • per_page integer
    • has_more_pages boolean