Track sessions, energy and cost
List and filter charging sessions, total their energy, export them to a spreadsheet, read what each one cost and follow them live.
On this page
Every charge is a session, recorded from the moment it starts: where it ran, which card started it, how much energy it delivered, why it stopped and what it cost. The API calls a session a transaction.
Find sessions
List a project's sessions, most recently started first:
Every filter is optional, and they combine:
| Parameter | Keeps |
|---|---|
since, until | Sessions that started inside the window |
status | open (still running) or ended |
q | Sessions whose charger id or card value contains the text |
limit, cursor | One page; pass nextCursor back as cursor |
The same list exists per charger and per connector, at /v1/charging-stations/{id}/transactions and /v1/connectors/{id}/transactions.
Each session carries:
| Field | Meaning |
|---|---|
startedAt, endedAt | endedAt is null while it is still running |
energyWh | Energy delivered, in Wh |
chargePointId, evseId, connectorNumber | Where it ran, in the project-wide list |
idTokenLabel, idTokenType | The label and type of the card that started it, never its value |
chargingState | Charging, EVConnected, SuspendedEV, SuspendedEVSE or Idle |
stoppedReason | Why it ended |
numericId, textId | The charger's own id for it, needed to stop it |
A report that groups by day should allow for endedAt being null: the session that charged overnight is still open.
Total a period
For counts and energy across a whole period rather than one page, ask for a summary. It takes the list's filters, plus locationId and chargingStationId:
200Response
endedEarly counts sessions a fault or a charger restart ended, rather than the driver, the car or a limit. It is the number to watch on a dashboard.
Export to a spreadsheet
The whole filtered set arrives as one CSV file with no page limit, streamed as it is written. The columns are transactionId, chargePointId, evseId, connectorNumber, startedAt, endedAt, energyWh and idTokenLabel.
Read a session's energy
energyWh is worked out for you from the charger's meter readings. It appears once the charger has sent two readings, and until then it is absent, never 0, so a session without it is one whose energy is not yet known.
For the detail behind the figure, read the session's event log:
Events come oldest first: Started, any number of Updated, and Ended. Each carries the meter readings the charger sent with it in meterValues. The energy reading is the Energy.Active.Import.Register measurand.
If a session has no energy readings at all, the charger is not set up to send them. Read and change charger settings shows how to turn them on.
Read a session's cost
When a tariff applies to a session, Flowion prices it for you, running or ended:
200Response
status is one of three answers, and only one of them is a price:
status | Means |
|---|---|
computed | The cost, split by part: fixed, energy, chargingTime, idleTime |
noTariffAssigned | No tariff applies to this charger. Show "no price set", not 0 |
usageUnavailable | The energy is not known yet. Ask again after the next reading |
typeOfCost is normal, or min/max when the tariff's minimum or maximum cost decided the total. Amounts are decimal strings: parse them as decimals, never as floats.
Why a session stopped
stoppedReason tells a normal end from a problem:
| Reason | Means |
|---|---|
Local | The driver ended it at the charger |
Remote | A stop sent through the API or the console |
EVDisconnected, StoppedByEV | The car ended it, or the cable came out |
DeAuthorized | The card stopped being valid during the session |
EnergyLimitReached, TimeLimitReached, SOCLimitReached | A cap did its job |
EmergencyStop, GroundFault, OvercurrentFault, PowerLoss, PowerQuality | A fault worth alerting on |
Reboot, ImmediateReset | The charger restarted |
Other | The charger gave no more detail |
A charger that gives no reason at all is recorded as Local, the ordinary case.
Follow sessions live
Instead of polling, open the project's live update stream. transactionStarted, transactionUpdated and transactionEnded tell you a session changed, and meterValuesUpdated that new readings landed, grouped so a busy charger does not flood you. Each event is a cue to re-read the session. Re-read what you show after every reconnect too, so a missed event never leaves a gap.
For a server-to-server feed that survives your own downtime, use webhooks instead.
Chart readings over time
For a chart rather than a ledger, ask for a measurement over a fixed window:
range is 1D, 1W or 1M, and the same exists per connector at /v1/connectors/{id}/metrics/{metric}. For everything a location's chargers drew, bucket by bucket, use GET /v1/locations/{locationId}/energy with range of 4h, 24h, 7d or 30d.