EndUserCalculations

Get EndUser statistics

Get summarized statistics for a given EndUser

get/api/end_users/statistics

Request

  • Base URL
    https://app.herondata.io
  • URL
    https://app.herondata.io/api/end_users/statistics
  • Auth
    API key in header x-api-key

Query parameters

end_user_idstring nullable
Example:your_end_user_id

end_user_id for statistics; either end_user_id or end_user_heron_id is required

end_user_heron_idstring nullable
Example:eus_nPxAWzVq5yuYxFNQVmsKCR

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

to_currency'GBP' | 'USD' | 'EUR' | 'CAD' | 'AUD' | 'null' nullable
Example:USD

ISO 4217 currency code to convert to

from_datestring date nullable
Example:2026-11-03

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

to_datestring date nullable
Example:2026-11-02

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

date_granularity'day' | 'week' | 'month' | 'quarter' | 'year'
Example:month

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

group_by'category' | 'merchant'
Example:category

Pivot results by merchant or by category

category_heron_idsstring[]

Filter by specific categories

[
  "ctg_d7UZvmUufhmnfnuHF2GegF",
  "ctg_nGGQzAFoaXCibSD8s4X2Qi"
]
merchant_heron_idsstring[]

Filter by specific merchants

[
  "mrc_Sn8Fvq2368ewqWbL77vtus",
  "mrc_dMtbYq2myL9YovTG7YxvZV"
]
account_idsstring[]

Filter by specific account reference IDs

[
  "1234",
  "5678"
]

Response

OK

Example response

{
  "statistics": [
    {
      "currency": "USD",
      "dt": "2026-11-03",
      "heron_id": "mrc_RM3VF3G9bXnb2aG7jVLjiy",
      "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
        }
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 5 revisions of this API.