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.

3 min readEdit this page
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:

GET/v1/projects/$PROJECT/transactions?status=openbash
curl "$API/projects/$PROJECT/transactions?status=open" \
  -H "Authorization: Bearer $TOKEN"

Every filter is optional, and they combine:

ParameterKeeps
since, untilSessions that started inside the window
statusopen (still running) or ended
qSessions whose charger id or card value contains the text
limit, cursorOne 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:

FieldMeaning
startedAt, endedAtendedAt is null while it is still running
energyWhEnergy delivered, in Wh
chargePointId, evseId, connectorNumberWhere it ran, in the project-wide list
idTokenLabel, idTokenTypeThe label and type of the card that started it, never its value
chargingStateCharging, EVConnected, SuspendedEV, SuspendedEVSE or Idle
stoppedReasonWhy it ended
numericId, textIdThe 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:

GET/v1/projects/$PROJECT/transactions/summary ?since=2026-09-01T00:00:00Z&locationId=$LOCATIONbash
curl "$API/projects/$PROJECT/transactions/summary\
?since=2026-09-01T00:00:00Z&locationId=$LOCATION" \
  -H "Authorization: Bearer $TOKEN"
200Response
{
  "total": 412,
  "open": 3,
  "endedEarly": 2,
  "energyWh": 5123400
}

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

GET/v1/projects/$PROJECT/transactions/export ?since=2026-09-01T00:00:00Zbash
curl "$API/projects/$PROJECT/transactions/export\
?since=2026-09-01T00:00:00Z" \
  -H "Authorization: Bearer $TOKEN" -o sessions.csv

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:

GET/v1/transactions/$TRANSACTION/eventsbash
curl "$API/transactions/$TRANSACTION/events" \
  -H "Authorization: Bearer $TOKEN"

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:

GET/v1/transactions/$TRANSACTION/costbash
curl "$API/transactions/$TRANSACTION/cost" \
  -H "Authorization: Bearer $TOKEN"
200Response
{
  "status": "computed",
  "totalCost": {
    "currency": "SEK",
    "typeOfCost": "normal",
    "total": { "exclTax": "52.40", "inclTax": "65.50" },
    "energy": { "exclTax": "52.40", "inclTax": "65.50" }
  },
  "totalUsage": {
    "energyWh": "17466",
    "chargingTimeSeconds": 7200,
    "idleTimeSeconds": 0
  }
}

status is one of three answers, and only one of them is a price:

statusMeans
computedThe cost, split by part: fixed, energy, chargingTime, idleTime
noTariffAssignedNo tariff applies to this charger. Show "no price set", not 0
usageUnavailableThe 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:

ReasonMeans
LocalThe driver ended it at the charger
RemoteA stop sent through the API or the console
EVDisconnected, StoppedByEVThe car ended it, or the cable came out
DeAuthorizedThe card stopped being valid during the session
EnergyLimitReached, TimeLimitReached, SOCLimitReachedA cap did its job
EmergencyStop, GroundFault, OvercurrentFault, PowerLoss, PowerQualityA fault worth alerting on
Reboot, ImmediateResetThe charger restarted
OtherThe 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:

GET/v1/charging-stations/$CHARGER/metrics/powerActiveImport ?range=1Dbash
curl "$API/charging-stations/$CHARGER/metrics/powerActiveImport\
?range=1D" \
  -H "Authorization: Bearer $TOKEN"

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.

Endpoints

Transactions · Metrics · Live events

In the API reference