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 | null
    ISO 8601 date-time; without an offset it is UTC.
    Up to 40 characters
  • tostring | null
    ISO 8601 date-time (exclusive); without an offset it is UTC.
    Up to 40 characters
  • bucketenum
    One of hour, day, month · Default "day"
  • time_zonestring
    IANA time zone for bucket boundaries.
    Default "UTC" · 1–64 characters
  • topinteger
    How many top stations to return.
    Default 5 · Minimum 1 · Maximum 20

Returns · 200

  • tenant_idintegerRequired
  • bucketenumRequired
    One of hour, day, month
  • time_zonestringRequired
    IANA time zone that day and month buckets follow.
  • startstringRequired
    The period's start: from, rounded down to a bucket boundary.
  • endstringRequired
    The period's end (exclusive): to, rounded up to a bucket boundary.
  • sessions_as_ofstringRequired
    When 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
    • sessionsintegerRequired
      Transactions that started in the period, active ones included.
    • ended_sessionsintegerRequired
      Of those, the ones that have ended.
    • successful_sessionsintegerRequired
      Ended sessions that delivered energy (at least 1 Wh) and did not stop for a fault, reset, power loss, timeout or deauthorization.
    • success_ratestring | nullRequired
      successful_sessions / ended_sessions as decimal text with 4 places ("0.9500"); null when no session ended.
    • average_duration_secondsinteger | nullRequired
      Mean whole seconds from start to end over ended sessions; null when none ended.
    • energy_kwhstringRequired
      Energy delivered in kWh as decimal text (the core's totalKwh, summed exactly).
    • energy_whintegerRequired
      The same energy in integer Wh.
    • active_sessionsintegerRequired
      Sessions of the period still active.
    • energy_unknown_sessionsintegerRequired
      Sessions whose energy is missing or implausible (negative or above 1000 kWh); their energy is not summed.
  • seriesarray of StatsBucketRequired
    One entry per bucket, oldest first, empty buckets included. Sessions count in the bucket they started in.
    Child attributes
    • sessionsintegerRequired
      Transactions that started in the period, active ones included.
    • ended_sessionsintegerRequired
      Of those, the ones that have ended.
    • successful_sessionsintegerRequired
      Ended sessions that delivered energy (at least 1 Wh) and did not stop for a fault, reset, power loss, timeout or deauthorization.
    • success_ratestring | nullRequired
      successful_sessions / ended_sessions as decimal text with 4 places ("0.9500"); null when no session ended.
    • average_duration_secondsinteger | nullRequired
      Mean whole seconds from start to end over ended sessions; null when none ended.
    • energy_kwhstringRequired
      Energy delivered in kWh as decimal text (the core's totalKwh, summed exactly).
    • energy_whintegerRequired
      The same energy in integer Wh.
    • startstringRequired
      Bucket start, ISO 8601 in the requested time_zone.
    • endstringRequired
      Bucket end (exclusive), ISO 8601 in the requested time_zone.
    • revenuearray of RevenueLine | nullRequired
      Final bills finalized in the bucket, per currency; null without billing:read.
      Child attributes
      • currencystringRequired
        ISO 4217 currency of the bills.
      • billed_minorintegerRequired
        Sum of the final bills' total_minor in minor units of currency. Billed, not collected: captures and refunds are the payment provider's.
      • billsintegerRequired
        Final bills counted.
  • top_stationsarray of TopStationRequired
    Stations with the most energy over the period, most first (ties by station_id).
    Child attributes
    • station_idintegerRequired
    • namestring | nullRequired
      The station's OCPP connection name; null for a station deleted since.
    • sessionsintegerRequired
    • energy_kwhstringRequired
      Energy delivered in kWh as decimal text (the core's totalKwh, summed exactly).
    • energy_whintegerRequired
      The same energy in integer Wh.
  • stationsStationCountsRequired
    Child attributes
    • as_ofstringRequired
      When the core was read (cached up to 30 seconds).
    • totalintegerRequired
    • onlineintegerRequired
      Connected, with no connector Faulted.
    • offlineintegerRequired
      Not connected to the CSMS.
    • faultedintegerRequired
      Connected, with at least one connector whose last status is Faulted.
    • testinteger
      Test 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 | nullRequired
    The period's revenue; null without billing:read.
    Child attributes
    • basisstringRequired
      Revenue 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
      • currencystringRequired
        ISO 4217 currency of the bills.
      • billed_minorintegerRequired
        Sum of the final bills' total_minor in minor units of currency. Billed, not collected: captures and refunds are the payment provider's.
      • billsintegerRequired
        Final bills counted.
  • testobject | null
    Test 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
    • sessionsintegerRequired
      Transactions that started in the period, active ones included.
    • ended_sessionsintegerRequired
      Of those, the ones that have ended.
    • successful_sessionsintegerRequired
      Ended sessions that delivered energy (at least 1 Wh) and did not stop for a fault, reset, power loss, timeout or deauthorization.
    • success_ratestring | nullRequired
      successful_sessions / ended_sessions as decimal text with 4 places ("0.9500"); null when no session ended.
    • average_duration_secondsinteger | nullRequired
      Mean whole seconds from start to end over ended sessions; null when none ended.
    • energy_kwhstringRequired
      Energy delivered in kWh as decimal text (the core's totalKwh, summed exactly).
    • energy_whintegerRequired
      The 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.