GET
/
api
/
end_users
/
statistics
Get EndUser statistics
curl --request GET \
  --url https://app.herondata.io/api/end_users/statistics \
  --header 'x-api-key: <api-key>'
{
  "statistics": [
    {
      "currency": "USD",
      "dt": "2025-07-21",
      "heron_id": "mrc_DLhfBmE38PrePG8bEk7WMY",
      "label": "Revenue",
      "metrics": {
        "inflow": {
          "amount": 42.42,
          "avg_amount": 1.01,
          "n": 42
        },
        "net": {
          "amount": 42.42,
          "avg_amount": 1.01,
          "n": 42
        },
        "outflow": {
          "amount": 42.42,
          "avg_amount": 1.01,
          "n": 42
        }
      }
    }
  ]
}

Authorizations

x-api-key
string
header
required

Query Parameters

end_user_heron_id
string | null

Heron-generated id for end user; either end_user_id or end_user_heron_id is required

Example:

"eus_BKYd9aR2YKpXA9gnfDuhLb"

to_currency
enum<string> | null

ISO 4217 currency code to convert to

Available options:
GBP,
USD,
EUR
Example:

"USD"

to_date
string<date> | null

Filter for transactions with timestamp before the input value (as date)

Example:

"2025-07-20"

merchant_heron_ids
string[]

Filter by specific merchants

Example:
[
"mrc_oG5LKYLLMCC69PY78sixBU",
"mrc_GjjLRN65xJjjHco4PfkaXb"
]
from_date
string<date> | null

Filter for transactions with timestamp after the input value (as date)

Example:

"2025-07-21"

date_granularity
enum<string>
default:month

Aggregate results over time, e.g., by week or by quarter

Available options:
day,
week,
month,
quarter,
year
Example:

"month"

group_by
enum<string>
default:category

Pivot results by merchant or by category

Available options:
category,
merchant
Example:

"category"

category_heron_ids
string[]

Filter by specific categories

Example:
[
"ctg_7L6sx4iPw7MgZJUDyN4G63",
"ctg_N7UrmdHeayVvTaRLikH52e"
]
end_user_id
string | null

end_user_id for statistics; either end_user_id or end_user_heron_id is required

Example:

"your_end_user_id"

Response

200 - application/json

OK

The response is of type object.