JouloDocs

Get energy statistics

Returns monthly energy aggregates and lifetime totals. Headline fields (total_kwh, total_ere_credits, total_sessions and the matching month fields) count only sessions on MID-eligible chargers • the same filter as the dashboard top line, since only those sessions produce ERE. The *_all fields cover every charger on your account. tags gives the same totals per RFID card or token, with the name you gave it in the dashboard. Pass from and to to ask for a period of whole Amsterdam calendar months: months then holds only that period and period holds its sum. The lifetime totals stay the same.

GET
/energy
AuthorizationBearer <token>

API token from the Joulo dashboard, or an OAuth2 access token.

In: header

Query Parameters

from?string

First month of the period, YYYY-MM in Amsterdam time. A date is accepted when it is the first day of a month. Given alone, the period is that one month.

to?string

Last month of the period, YYYY-MM in Amsterdam time. A date is accepted when it is the last day of a month. Given alone, the period is that one month.

Response Body

curl -X GET "https://api.joulo.nl/functions/v1/api/energy?from=2026-10&to=2026-10"
{
  "total_kwh": 2847.52,
  "total_ere_credits": 427.13,
  "total_sessions": 186,
  "total_kwh_all": 3102.18,
  "total_sessions_all": 203,
  "months": [
    {
      "month": "2026-04",
      "kwh": 124.3,
      "ere_credits": 18.65,
      "sessions": 8,
      "kwh_all": 139.12,
      "sessions_all": 9
    },
    {
      "month": "2026-03",
      "kwh": 387.45,
      "ere_credits": 58.12,
      "sessions": 22,
      "kwh_all": 402.83,
      "sessions_all": 24
    }
  ],
  "tag_count": 1,
  "tags": [
    {
      "id_tag": "04A1B2C3D4E5F6",
      "label": "Tesla",
      "kwh": 511.75,
      "ere_credits": 170.26,
      "sessions": 30,
      "kwh_all": 511.75,
      "sessions_all": 30,
      "first_started_at": "2026-03-02T19:10:00Z",
      "last_started_at": "2026-04-08T18:30:00Z"
    }
  ]
}
{
  "error": "connection_type is required and must be \"ocpp\""
}
{
  "error": "Missing or invalid API token"
}
{
  "error": "Insufficient scope",
  "required_scope": "chargers:read"
}