GET | Get the latest session by driver’s AUTH ID |
Response of this API contains details about the latest session initiated by driver (identified by auth-id) through START charging command. It includes details about some important details associated with session like which location, evse or connector used for charging, start and end time of the charging session etc.,
This API can be used to fetch the latest or ongoing session id which will be used as an input in the STOP command request to stop the charging.
Parameters
Name | auth_id |
Data Type | String (2) |
Variable Type | required |
Description | Unique ID of the whitelisted EV Driver per CPO |
Sample Request and Response
Latest session by driver id :
GET https://api-gateway-evnnovator.com/api/ocpi/api/v1/sessions/demo-driver-1/latest
Response Json :
{ "status_code": 1000, "status_message": "Success", "timestamp": "2022-03-26T14:49:54.135", "data": { "evseId": "f17195c3-7028-446a-b51d-b114fcaa7416", "connectorId": "1", "id": "ae18c8e04f45946f0706735285a0a069", "created_date": "2022-03-23T05:12:36.039+00:00", "last_modified_date": "2022-03-23T05:16:12.912+00:00", "party_id": "TCZ", "country_code": "IN", "location_id": "D5F5E912-CD27-49D5-8586-FB93CA65A134", "session_id": "20796751", "cpoId": "59371e3bef3cb74f510fed1e102b6737", "start_datetime": "2022-03-23T05:12:22.000+00:00", "end_datetime": "2022-03-23T05:15:59.647+00:00", "kwh": 0.16, "auth_id": "demo-driver-1", "auth_method": "COMMAND", "location": { "coordinates": { "latitude": 28.457523, "longitude": 77.026344 }, "evses": [ { "id": "3d2542dc29da4512d061391db6a18377", "uid": "F17195C3-7028-446A-B51D-B114FCAA7416", "evse_id": "IN*TCZ*2", "status": "AVAILABLE", "connectors": [], "floor_level": "ONE" } ], "id": "2b10508db844fada81778c8b1bce853e", "created_date": "2022-03-11T07:28:42.458+00:00", "last_modified_date": "2022-03-25T10:00:39.081+00:00", "location_id": "D5F5E912-CD27-49D5-8586-FB93CA65A134", "cpo_id": "1152ba0c0ff2057084051747267b49fd", "cpo_resource_id": "59371e3bef3cb74f510fed1e102b6737", "type": "PARKING_TOP", "name": "GJ | Vadodara | Charge+Zone Office2", "address": "401, Benison Complex, Opp. Shiv Mahal Palace, Old Padra Rd, Vadodara, Gujarat 390007", "city": "Vadodara", "postal_code": "123458", "country": "IND", "time_zone": "IST", "charging_when_closed": false, "last_modified_by": "admin", "rating": 0.0, "country_code": "IN", "party_id": "TCZ", "publish": true }, "currency": "INR", "charging_periods": [ { "start_date_time": "2022-03-23T10:45:59.647" } ], "total_cost": 2.88, "status": "ACTIVE", "last_updated": "0001-01-01T00:00:00.000+00:00" } }
Response
Code | Description |
200 | OK |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |