Charging sessions

Charging session objects

Charging session objects consist of the following properties:

id
The charging session’s unique identifier.
rfidId
The token that was used to start the session.
socketId
The socket that was used.
chargingStationId
The charging station where the vehicle charged.
completed
Boolean: if true, the charging session is completed. If false, the charging session is ongoing.
timeStarted
Time the session was started.
timeStartedCharging
Time the vehicle first charged. This is the time of the first tick of the kWh meter.
timeStoppedCharging
Time the vehicle last charged. This is the time of the last update to the kWh meter.
timeStoppedSession
Time the session was ended (i.e. the car disconnected). If the session is not yet completed, time of the last update from the charging station.
kiloWattHour
The amount of kWh used up to this point.
totalPrice
The price for the charging session, only calculated after the charging session is completed.
pricingPolicyId
The identifier of the pricing policy that was applied.
vehicleId
The identifier of the vehicle type, if known.
maximumCurrent
The maximum current of this charging session. This is less than or equal to the current of the socket as the car may draw less than the socket provides.
requestedDurationSeconds
The requested session duration in seconds, if specified.
requestedKiloWattHour
The requested kilowatt hour amount, if specified.
powerValue
The last set power value (W) for this charging session. May be null if it was never set. This is usually the case for stations that are not connected to the smartgrid.

If meterValues are requested, they will be provided as a separate JSON object. The keys will be timestamps and the values will be the meter values at the corresponding timestamp.

Example object

A charging session object:

{ "id": 10180,
  "rfidId": 7,
  "socketId": 7,
  "chargingStationId": 3,
  "completed": true,
  "timeStarted": 1351703625,
  "timeStoppedCharging": 1351704301,
  "timeStoppedSession": 1351704378,
  "kiloWattHour": 0.5,
  "totalPrice": 1.53,
  "pricingPolicyId": 10001,
  "powerValue": 3680 }

A meter values object:

{ "1351703700": 0.1,
  "1351703760": 0.2,
  ... }

Charging session services

GET /abs/frontend/chargingSession/(id)

Retrieve a specific charging session.

Role:

host

Query Parameters:
 
  • meterValues? – Include meter values if true (default false).
Status Codes:
  • 203 – Unknown session.
PUT /abs/frontend/chargingSession/(id)

Set/modify the charging session parameters.

Role:

admin

Query Parameters:
 
  • vehicleId? – The vehicle type.
  • requestedKiloWattHour? – The desired kilowatt hour amount.
  • requestedDurationSeconds? – The desired session duration in seconds.
Status Codes:
  • 203 – Unknown session.
  • 217 – Unknown vehicle.
GET /abs/frontend/chargingSession/host

Retrieve a list of charging sessions.

Role:

host

Query Parameters:
 
  • limit? – The amount of charging sessions to return (default=100)
  • zoneId? – Limit the returned data to charging sessions in the provided zone.
  • chargingStationId? – Limit the returned data to charging sessions belonging to the provided charging station.
  • timeFrom? – Limit to charging sessions started after this timestamp.
  • timeTo? – Limit to charging sessions ended before this timestamp.
GET /abs/frontend/activeChargingSessions

Retrieve all active charging session. Hosts will only retrieve sessions on their own stations.

Role:

admin, host

Query Parameters:
 
  • chargingStationId? – Get the active sessions for the provided charging station
GET /abs/frontend/activeChargingSessions/host

Retrieve all active charging session on the user’s own stations (host point-of-view).

Role:

host

Query Parameters:
 
  • chargingStationId? – Get the active sessions for the provided charging station