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-03-04",
      "heron_id": "mrc_eqrVRhGWjdUEHnLbgAuSMT",
      "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

merchant_heron_ids
string[]

Filter by specific merchants

Example:
[
  "mrc_WfKCTLE7WiHHBTAgNrXNmc",
  "mrc_nxE7hsig5CTtQqNBz88idU"
]
group_by
enum<string>
default:category

Pivot results by merchant or by category

Available options:
category,
merchant
Example:

"category"

to_currency
enum<string> | null

ISO 4217 currency code to convert to

Available options:
GBP,
USD,
EUR
Example:

"USD"

category_heron_ids
string[]

Filter by specific categories

Example:
[
  "ctg_DtSD8UWKTEE9VuqS3C5umF",
  "ctg_gBZovLvU5aAq7UqQVKyZRq"
]
to_date
string | null

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

Example:

"2025-03-03"

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"

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

from_date
string | null

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

Example:

"2025-03-04"

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"

Response

200 - application/json
OK
statistics
object[]