v1

latestOpenAPI 3.0.02026-07-26224386470.0 KB
EndUserCalculations

Get EndUser statistics

Get summarized statistics for a given EndUser

get/api/end_users/statistics

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_VzYMaabWpfbWi4dHKA4sRF

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-07-23

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

to_datestring date nullable
Example:2026-07-22

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_cBKohUyXYxmsRzuUaKMXx4",
  "ctg_JjMWnjcfE2rv7WKW53aF3q"
]
merchant_heron_idsstring[]

Filter by specific merchants

[
  "mrc_9KCvR8xkxDZv2csPrDTaDn",
  "mrc_L4GnSwawRkZtLY2ax77s4d"
]
account_idsstring[]

Filter by specific account reference IDs

[
  "1234",
  "5678"
]

Response

OK

Example response

{
  "statistics": [
    {
      "currency": "USD",
      "dt": "2026-07-23",
      "heron_id": "mrc_PTq6d7aMd4Xp3dW7BxTGhP",
      "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
        }
      }
    }
  ]
}