Get EndUser statistics
curl --request GET \
--url https://app.herondata.io/api/end_users/statistics \
--header 'x-api-key: <api-key>'import requests
url = "https://app.herondata.io/api/end_users/statistics"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.herondata.io/api/end_users/statistics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.herondata.io/api/end_users/statistics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.herondata.io/api/end_users/statistics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.herondata.io/api/end_users/statistics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/end_users/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"statistics": [
{
"currency": "USD",
"dt": "2026-09-02",
"heron_id": "mrc_FhZ5Pbdbu6XNBZuUov2VBn",
"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
}
}
}
]
}EndUserCalculations
Get EndUser statistics
Get summarized statistics for a given EndUser
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>'import requests
url = "https://app.herondata.io/api/end_users/statistics"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.herondata.io/api/end_users/statistics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.herondata.io/api/end_users/statistics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.herondata.io/api/end_users/statistics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.herondata.io/api/end_users/statistics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.herondata.io/api/end_users/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"statistics": [
{
"currency": "USD",
"dt": "2026-09-02",
"heron_id": "mrc_FhZ5Pbdbu6XNBZuUov2VBn",
"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
Query Parameters
end_user_id for statistics; either end_user_id or end_user_heron_id is required
Example:
"your_end_user_id"
Heron-generated id for end user; either end_user_id or end_user_heron_id is required
Example:
"eus_oWsXK2uSxWvrgi9uxy5RZB"
ISO 4217 currency code to convert to
Available options:
GBP, USD, EUR, CAD, AUD, null Example:
"USD"
Filter for transactions with timestamp after the input value (as date)
Example:
"2026-09-02"
Filter for transactions with timestamp before the input value (as date)
Example:
"2026-09-01"
Aggregate results over time, e.g., by week or by quarter
Available options:
day, week, month, quarter, year Example:
"month"
Pivot results by merchant or by category
Available options:
category, merchant Example:
"category"
Filter by specific categories
Example:
[
"ctg_7TGbCNQf7L7rMELgSSTZaK",
"ctg_CkXxFyDJWNGkmrhNmJmfBc"
]
Filter by specific merchants
Example:
[
"mrc_TF7yNoETvdSmJqQRzpxFWQ",
"mrc_Cwz3whzNw7Rf6Wf2BafVn2"
]
Filter by specific account reference IDs
Example:
["1234", "5678"]
Response
200 - application/json
OK
Show child attributes
Show child attributes
Was this page helpful?