Session API
What is a session
A session object describes one charging session.
It is a combination of the Meter Values and Location information and is included in the CDR.
Link to Sessions API .
Sessions can be used to get real-time information on the progress of the session in terms of:
- Energy
- Overall time
- Parking time
Use Cases:
- Real time information of a charging sessions

Schematic overview of a session
Flow and Lifecycle
Push/Webhook model
GreenFlux can establish a push connection to CPO Customers.
When a charging session starts, a Session object is created as a PUT call.
Any changes to a Session in the CPO system are sent by calling PATCH on the Sessions endpoint with the updated Session object.
Sessions cannot be deleted, final status of a session is: COMPLETED.
Frequency of push messages
Session as pushed once the platform receives an updated meter value. This is on the one hand determined by the charge station itself as well as the configuration set on the portal.
GreenFlux has set a minimum Session interval at 3mins for load balancing. Any more frequent metervalues will not be pushed.
Pull model
Partners who do not support the push model need to call GET on the Sessions endpoint to receive a list of Sessions.
Sessions can only be pulled after the session is completed.
This only includes session information on the aggregate level, so the total kWh, time etc. and does not return an array of the session intervals. For intervals it is required to implement PUSH.

Schematic Overview of example request
Example responses
Following the diagram above, below are example of payloads:
1 - PUT session
{
"id":"NLGFX637561499213897595-ef07d",
"start_datetime":"2021-05-09T09:38:39Z",
"end_datetime":null,
"kwh":0.0,
"auth_id":"NL*GFX*0dd6AE*6",
"auth_method":"WHITELIST",
"location":{
"id":"0d4ef8c6-e0c8-54c1d-b4f4-eb245f3f7afa",
"type":"ON_STREET",
"publish": true,
"name":"Gent Zuid",
"address":"F.Rooseveltlaan 3A",
"city":"Gent",
"postal_code":"9000",
"country":"BEL",
"coordinates":{
"latitude":"51.047599",
"longitude":"3.729944"
},
"related_locations":null,
"evses":[
{
"uid":"BE-BEC-E041503001",
"evse_id":"BE*BEC*E041503001",
"status":"CHARGING",
"status_schedule":[ ],
"capabilities":[ ],
"connectors":[
{
"id":"1",
"standard":"IEC_62196_T2",
"format":"CABLE",
"power_type":"AC_3_PHASE",
"voltage":220,
"amperage":16,
"tariff_id":"11",
"last_updated":"2015-03-16T10:10:02Z"
}
],
"floor_level":null,
"coordinates":null,
"physical_reference":null,
"directions":[
],
"parking_restrictions":null,
"images":null,
"last_updated":"2021-05-07T05:15:21Z"
}
],
"directions":[ ],
"operator":{
"name":"GreenFlux",
"website":"https://www.greenfluxenergy.com/",
"logo":null
},
"suboperator":{
"name":"GreenFlux",
"website":"https://www.greenfluxenergy.com/",
"logo":null
},
"owner":{
"name":"GreenFlux",
"website":"https://www.greenfluxenergy.com/",
"logo":null
},
"facilities":[ ],
"time_zone":null,
"opening_times":{
"regular_hours":null,
"twentyfourseven":true,
"exceptional_openings":null,
"exceptional_closings":null
},
"charging_when_closed":null,
"images":null,
"energy_mix":null,
"last_updated":"2021-05-07T11:36:21Z"
},
"meter_id":null,
"currency":"EUR",
"charging_periods":null,
"status":"ACTIVE",
"last_updated":"2021-05-09T09:38:41Z"
}
2 - PATCH Session - Charging
{
"id": "NLGFX637561499213897595-ef07d",
"charging_periods": [
{
"start_date_time": "2021-05-09T09:38:39Z",
"dimensions": [
{
"type": "TIME",
"volume": 0.0833
},
{
"type": "ENERGY",
"volume": 0.285
}
]
}
],
"last_updated": "2021-05-09T09:43:39Z",
"status": "ACTIVE",
"kwh": 0.285
}
3 - PATCH session - charging
Note how the TIME and ENERGY increases and the last_updated is the timestamps when this update was received.
Time is in decimal values. so 0.166 is 0.166*60min = 9min & 57.7sec (i.e. 10 mins)
{
"id": "NLGFX637561499213897595-ef07d",
"charging_periods": [
{
"start_date_time": "2021-05-09T09:38:39Z",
"dimensions": [
{
"type": "TIME",
"volume": 0.1666
},
{
"type": "ENERGY",
"volume": 0.577
}
]
}
],
"last_updated": "2021-05-09T09:48:39Z",
"status": "ACTIVE",
"kwh": 0.577
}
4 - PATCH Session - Parking
PATCH Sessions {end point provided by Origin}/AU/GFX/AUGFX637561499213897595-ef07d
Note: Parking indicates that GFX does not detect an increase in kWh and interprets this as parking.
It does not include the previous meter values. For more information, see Parking detection
{
"id":"NLGFX637561499213897595-ef07d",
"charging_periods": [
{
"start_date_time": "2021-05-09T13:13:39Z",
"dimensions": [
{
"type": "PARKING_TIME",
"volume": 0.0
}
]
}
],
"last_updated": "2021-05-09T13:13:39Z"
}
5 - PATCH session - Parking
{
"id": "NLGFX637561499213897595-ef07d",
"charging_periods": [
{
"start_date_time": "2021-05-09T13:13:39Z",
"dimensions": [
{
"type": "PARKING_TIME",
"volume": 16.1602
}
]
}
],
"last_updated": "2021-05-09T13:13:39Z"
}
6 - PATCH Session - Completed
{
"last_updated": "2021-05-10T05:27:27Z",
"status": "COMPLETED",
"start_datetime": "2021-05-09T09:38:39Z",
"end_datetime": "2021-05-10T05:27:25Z"
}
PATCH updates only send changed fields.
The final PATCH therefore might not include a final kwh total if it has not changed. This is the situation when a vehicle has been parking.
7 - GET session - Completed
{
"id":"NLGFX637561499213897595-ef07d",
"start_datetime":"2021-05-09T09:38:39Z",
"end_datetime":"2021-05-10T05:27:25Z",
"kwh":11.712,
"auth_id":"NLU-GFX-CRES-5014-00001",
"auth_method":"WHITELIST",
"location":{
"id":"e1da4647-ccf5-4927-a63e-5a264f530efe",
"type":"ON_STREET",
"publish":true,
"name":"7-5 QUEEN ST ALBERTON SA 5014",
"address":"Queen St 7-5",
"city":"Alberton",
"postal_code":"5014",
"country":"AUS",
"coordinates":{
"latitude":"-35.280780",
"longitude":"149.131400"
},
"related_locations":null,
"evses":[
{
"uid":"NLU-GFX-ERES-5014-00001-1",
"evse_id":"NL*GFX*ERES*5014*00001*1",
"status":"REMOVED",
"status_schedule":[
],
"capabilities":[
],
"connectors":[
{
"id":"1",
"standard":"IEC_62196_T2",
"format":"CABLE",
"power_type":"AC_1_PHASE",
"voltage":230,
"amperage":32,
"tariff_id":"A0",
"terms_and_conditions":null,
"last_updated":"2021-01-12T01:17:16Z"
}
],
"floor_level":null,
"coordinates":null,
"physical_reference":null,
"directions":[
],
"parking_restrictions":null,
"images":null,
"last_updated":"2021-05-07T05:15:21Z"
}
],
"directions":[
],
"operator":{
"name":"GreenFlux",
"website":"https://www.greenfluxenergy.com",
"logo":null
},
"suboperator":{
"name":"GreenFlux",
"website":"https://www.greenfluxenergy.com",
"logo":null
},
"owner":{
"name":"GreenFlux",
"website":"https://www.greenfluxenergy.com",
"logo":null
},
"facilities":[
],
"time_zone":null,
"opening_times":{
"regular_hours":null,
"twentyfourseven":true,
"exceptional_openings":null,
"exceptional_closings":null
},
"charging_when_closed":null,
"images":null,
"energy_mix":null,
"last_updated":"2021-05-07T11:36:21Z"
},
"meter_id":null,
"currency":"EUR",
"charging_periods":[
{
"start_date_time":"2021-05-09T13:13:39Z",
"dimensions":[
{
"type":"PARKING_TIME",
"volume":16.1602
}
]
},
{
"start_date_time":"2021-05-09T09:38:39Z",
"dimensions":[
{
"type":"TIME",
"volume":3.4986
},
{
"type":"ENERGY",
"volume":11.712
}
]
}
],
"status":"COMPLETED",
"last_updated":"2021-05-10T05:27:27Z"
}
Example with State of Charge
If the Charge station sends a State of charge, then this will be included in a Patch session. State of Charge value is also sent as part of the Patch message. So not only kWh value but also SOC. (only if charger sends SOC in Meter Value)
Currently, state of charge can only be transferred via DC chargers. It is technically not possible to pass the data via AC chargers.
Furthermore, it can depend on the DC charger model and the vehicle to pass this information to GreenFlux.
{
"id": "NLGFX637562467536391322-aee21",
"charging_periods":[
{
"start_date_time": "2021-05-10T12:32:32Z",
"dimensions":[
{
"type": "TIME",
"volume":0.4509
},
{
"type": "ENERGY",
"volume": 16.063
}
]
}
],
"last_updated": "2021-05-10T12:59:32Z",
"status": "ACTIVE",
"kwh": 16.063,
"state_of_charge": 91.0
}
Updated about 1 month ago