Reports

Customers grouped by

Returns customer metrics grouped by a chosen store dimension, helping you compare
customer activity across segments like billing country or other supported grouping values.
Responses are capped at 1500 grouped rows.

GET /api/v1/store/reports/customers-grouped-by

Customers grouped by

curl --request GET \
  --url 'https://{baseUrl}/api/v1/store/reports/customers-grouped-by' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "meta": {
    "report_link": "https://app.metorik.com/reports/customers-grouped"
  },
  "totals": {
    "gross": 124550.42,
    "orders": 712,
    "customers": 508,
    "items": 1196
  },
  "data": [
    {
      "date": "United States",
      "customers": 281,
      "orders": 392,
      "gross": 68210.18,
      "items": 670,
      "returning_customers": 214,
      "returning_customers_rate": 76.2
    }
  ]
}

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

  • custom_field_key string

    Required when grouped_by is custom_field. Custom field key to group customers by. Example: source_label

  • customer_filters string

    Optional JSON-encoded array of customer-level filters applied before calculating the report. See Customer Filters Reference. Cannot be combined with segment. Example: [{"field":"billing_address_country","operator":"eq","value":"US"}]

  • end_date string required

    End date in the store timezone using YYYY-MM-DD format. Example: 2026-02-28

  • grouped_by string enum required

    Dimension to group customers by. Example: billing_address_country

  • segment integer

    Optional saved store-wide customer segment ID. You can find the ID on the customer segments page. Example: 123

  • start_date string required

    Start date in the store timezone using YYYY-MM-DD format. Example: 2026-02-01

Headers

  • Accept string required

    Response format header. Example: application/json

Response

application/json
  • meta object
    + Show Child Attributes
    • report_link string
  • totals object
    + Show Child Attributes
    • gross number
    • orders integer
    • customers integer
    • items integer
  • data[] object array
    + Show Child Attributes
    • date string
    • customers integer
    • orders integer
    • gross number
    • items integer
    • returning_customers integer
    • returning_customers_rate number