Overview statistics for a dashboard home
get/v1/tenants/{tenant_id}/stats
Requires an API key
Requires stations:read; revenue fields also need billing:read and are null without it. Read-only. Sessions, energy (kWh as decimal text and integer Wh), success rate and average duration for [from, to), widened to whole buckets in time_zone, as totals and a series; top stations by energy; station state now (online, offline, faulted); revenue from the unified API's final bills in minor units per currency, never Ivora's earlier driver checkout. At most 168 hour, 92 day or 24 month buckets and 50,000 sessions (stats_range_too_large). Defaults: to now, from 24 hours, 30 days or 365 days before it. Session figures are cached 60 s, 5 min or 15 min by bucket (sessions_as_of), station state 30 s.
Path parameters
- tenant_idintegerRequired
Query parameters
- fromstring | nullISO 8601 date-time; without an offset it is UTC.Up to 40 characters
- tostring | nullISO 8601 date-time (exclusive); without an offset it is UTC.Up to 40 characters
- bucketenumOne of
hour,day,month· Default"day" - time_zonestringIANA time zone for bucket boundaries.Default
"UTC"· 1–64 characters - topintegerHow many top stations to return.Default
5· Minimum 1 · Maximum 20
Returns · 200
- tenant_idintegerRequired
- bucketenumRequiredOne of
hour,day,month - time_zonestringRequiredIANA time zone that day and month buckets follow.
- startstringRequiredThe period's start: from, rounded down to a bucket boundary.
- endstringRequiredThe period's end (exclusive): to, rounded up to a bucket boundary.
- sessions_as_ofstringRequiredWhen the session figures were read from the core (cached 60 s for hour, 5 min for day, 15 min for month buckets).
- totalsStatsTotalsRequired
Child attributes
- sessionsintegerRequiredTransactions that started in the period, active ones included.
- ended_sessionsintegerRequiredOf those, the ones that have ended.
- successful_sessionsintegerRequiredEnded sessions that delivered energy (at least 1 Wh) and did not stop for a fault, reset, power loss, timeout or deauthorization.
- success_ratestring | nullRequiredsuccessful_sessions / ended_sessions as decimal text with 4 places ("0.9500"); null when no session ended.
- average_duration_secondsinteger | nullRequiredMean whole seconds from start to end over ended sessions; null when none ended.
- energy_kwhstringRequiredEnergy delivered in kWh as decimal text (the core's totalKwh, summed exactly).
- energy_whintegerRequiredThe same energy in integer Wh.
- active_sessionsintegerRequiredSessions of the period still active.
- energy_unknown_sessionsintegerRequiredSessions whose energy is missing or implausible (negative or above 1000 kWh); their energy is not summed.
- seriesarray of StatsBucketRequiredOne entry per bucket, oldest first, empty buckets included. Sessions count in the bucket they started in.
Child attributes
- sessionsintegerRequiredTransactions that started in the period, active ones included.
- ended_sessionsintegerRequiredOf those, the ones that have ended.
- successful_sessionsintegerRequiredEnded sessions that delivered energy (at least 1 Wh) and did not stop for a fault, reset, power loss, timeout or deauthorization.
- success_ratestring | nullRequiredsuccessful_sessions / ended_sessions as decimal text with 4 places ("0.9500"); null when no session ended.
- average_duration_secondsinteger | nullRequiredMean whole seconds from start to end over ended sessions; null when none ended.
- energy_kwhstringRequiredEnergy delivered in kWh as decimal text (the core's totalKwh, summed exactly).
- energy_whintegerRequiredThe same energy in integer Wh.
- startstringRequiredBucket start, ISO 8601 in the requested time_zone.
- endstringRequiredBucket end (exclusive), ISO 8601 in the requested time_zone.
- revenuearray of RevenueLine | nullRequiredFinal bills finalized in the bucket, per currency; null without billing:read.
Child attributes
- currencystringRequiredISO 4217 currency of the bills.
- billed_minorintegerRequiredSum of the final bills' total_minor in minor units of currency. Billed, not collected: captures and refunds are the payment provider's.
- billsintegerRequiredFinal bills counted.
- top_stationsarray of TopStationRequiredStations with the most energy over the period, most first (ties by station_id).
Child attributes
- station_idintegerRequired
- namestring | nullRequiredThe station's OCPP connection name; null for a station deleted since.
- sessionsintegerRequired
- energy_kwhstringRequiredEnergy delivered in kWh as decimal text (the core's totalKwh, summed exactly).
- energy_whintegerRequiredThe same energy in integer Wh.
- stationsStationCountsRequired
Child attributes
- as_ofstringRequiredWhen the core was read (cached up to 30 seconds).
- totalintegerRequired
- onlineintegerRequiredConnected, with no connector Faulted.
- offlineintegerRequiredNot connected to the CSMS.
- faultedintegerRequiredConnected, with at least one connector whose last status is Faulted.
- testintegerTest stations (the OCPP bench's own station a virtual charger connects as), counted here only: never in total, online, offline or faulted.Default
0
- revenueobject | nullRequiredThe period's revenue; null without billing:read.
Child attributes
- basisstringRequiredRevenue is the unified API's final bills only, by finalized_at; never the figures of Ivora's earlier driver checkout.
- currenciesarray of RevenueLineRequired
Child attributes
- currencystringRequiredISO 4217 currency of the bills.
- billed_minorintegerRequiredSum of the final bills' total_minor in minor units of currency. Billed, not collected: captures and refunds are the payment provider's.
- billsintegerRequiredFinal bills counted.
- testobject | nullTest sessions (virtual chargers on a test station), labelled apart: never in totals, series, top_stations or revenue, never billed; null when the period has none.
Child attributes
- sessionsintegerRequiredTransactions that started in the period, active ones included.
- ended_sessionsintegerRequiredOf those, the ones that have ended.
- successful_sessionsintegerRequiredEnded sessions that delivered energy (at least 1 Wh) and did not stop for a fault, reset, power loss, timeout or deauthorization.
- success_ratestring | nullRequiredsuccessful_sessions / ended_sessions as decimal text with 4 places ("0.9500"); null when no session ended.
- average_duration_secondsinteger | nullRequiredMean whole seconds from start to end over ended sessions; null when none ended.
- energy_kwhstringRequiredEnergy delivered in kWh as decimal text (the core's totalKwh, summed exactly).
- energy_whintegerRequiredThe same energy in integer Wh.
GET /v1/tenants/{tenant_id}/stats
curl --fail-with-body "https://api.ivoracharge.com/v1/tenants/1042/stats" \
-H "Authorization: Bearer $IVORA_API_KEY"Response · 200
{
"tenant_id": 1042,
"bucket": "hour",
"time_zone": "America/Los_Angeles",
"start": "string",
"end": "string",
"sessions_as_of": "string",
"totals": {
"sessions": 1,
"ended_sessions": 1,
"successful_sessions": 1,
"success_rate": "string",
"average_duration_seconds": 1,
"energy_kwh": "string",
"energy_wh": 7500,
"active_sessions": 1,
"energy_unknown_sessions": 1
},
"series": [
{
"sessions": 1,
"ended_sessions": 1,
"successful_sessions": 1,
"success_rate": "string",
"average_duration_seconds": 1,
"energy_kwh": "string",
"energy_wh": 7500,
"start": "string",
"end": "string",
"revenue": [
{
"currency": "usd",
"billed_minor": 1250,
"bills": 1
}
]
}
],
"top_stations": [
{
"station_id": 1,
"name": "bay-01",
"sessions": 1,
"energy_kwh": "string",
"energy_wh": 7500
}
],
"stations": {
"as_of": "string",
"total": 1,
"online": 1,
"offline": 1,
"faulted": 1,
"test": 0
},
"revenue": {
"basis": "final_bills",
"currencies": [
{
"currency": "usd",
"billed_minor": 1250,
"bills": 1
}
]
},
"test": {
"sessions": 1,
"ended_sessions": 1,
"successful_sessions": 1,
"success_rate": "string",
"average_duration_seconds": 1,
"energy_kwh": "string",
"energy_wh": 7500
}
}Try it is not available here yetRequests from this page are off until the production API at
https://api.ivoracharge.com is public. Use the code samples from your application server; Ivora grants production access. Keys are created in Developer tools.