GET
/
api
/
end_users
/
statistics
curl --request GET \
  --url https://app.herondata.io/api/end_users/statistics \
  --header 'Authorization: Basic <encoded-value>'
{
  "statistics": [
    {
      "currency": "USD",
      "dt": "2025-04-15",
      "heron_id": "mrc_icBkSGP8vDDkSdgAz5nytj",
      "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

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

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_dB5AbeMvJvZFptrjPyCrZT",
  "ctg_MCW9tDc3qumHC5e9sg47uu"
]
merchant_heron_ids
string[]

Filter by specific merchants

Example:
[
  "mrc_hX2ghkmSFA2JUVjYiczHun",
  "mrc_QMZtJwSMQEmq2gmaCQP7rw"
]
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"

from_date
string | null

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

Example:

"2025-04-15"

to_currency
enum<string> | null

ISO 4217 currency code to convert to

Available options:
GBP,
USD,
EUR
Example:

"USD"

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_B3LVx9kxzYLMJokv4wm8Dd"

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"

to_date
string | null

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

Example:

"2025-04-14"

Response

200 - application/json
OK
statistics
object[]