This is the list of event types that we currently send. For guidance on how to listen to these events, take a look at Svix's guide to consuming webhooks.
Triggered upon the execution of a charging command to the charger, regardless of its success or failure.
{
"code": "RESULT_CONFIRMED",
"type": "charger.charging-command",
"jobId": "charger-start.charge-64253244f8057090fb3a822b",
"action": "charger-start",
"message": "Charger command executed and result confirmed",
"success": true,
"chargerId": "64253244f8057090fb3a822b"
}
Fired when a user grants authorisation to new device(s) to your app. You might see some an additional key named `vehicles` in the event payload, but it's safe to ignore this key. This is sent for backward-compatibility purposes and will be removed soon.
{
"type": "user.devices-connected",
"user": "user-id-in-your-database",
"devices": [
{
"vin": "7SAWDDEQXPS685253",
"make": "Tesla",
"year": 2020,
"model": "Model Y",
"country": "US",
"deviceId": "642f07d280dead60533b57c2",
"nickname": "My Model Y",
"deviceType": "vehicle",
"engineType": "ELECTRIC",
"clientUserId": "user-id-in-your-database"
}
]
}
Fired when a device(s) are disconnected. This might be due to expiry of tokens, revocation of authorisation from user, change of credentials, device disconnection from vendor account etc.
{
"type": "user.devices-disconnected",
"user": "user-id-in-your-database",
"devices": [
"642f07d280dead60533b57c2"
]
}
Triggered upon the execution of a charging command to the vehicle, regardless of its success or failure.
{
"code": "RESULT_CONFIRMED",
"type": "vehicle.charging-command",
"jobId": "charge-start.charge-64253244f8057090fb3a822b",
"action": "charge-start",
"message": "Charging command executed and result confirmed",
"success": true,
"vehicleId": "64253244f8057090fb3a822b"
}
Fired when a vehicle starts / stops charging.
{
"type": "vehicle.charging-status",
"jobId": "641aeef260d202219c22aa3a",
"message": "Charging-status change detected",
"vehicleId": "641aeef260d202219c22f03b",
"currentState": "Charging",
"vehicleState": {
"id": "63ed07f8d2100cc452f57e3d",
"odo": {
"unit": "km",
"value": 12345,
"lastUpdated": "2023-06-29T11:29:11.815Z"
},
"state": "ACTIVE",
"location": {
"latitude": 12.345678,
"longitude": 7.3321,
"lastUpdated": "2023-06-29T11:29:11.815Z"
},
"batteryState": {
"soc": 77,
"range": 216,
"isPlugged": true,
"rangeUnit": "km",
"isCharging": true,
"lastUpdated": "2023-06-29T11:29:11.815Z",
"chargeThresholdMet": true
},
"stateDescription": "The connection to vehicle is active and the data is up to date.",
"staticAttributes": {
"vin": "MAT534006MPTS4325",
"make": "BMW",
"year": 2022,
"model": "X2 xDrive25e",
"country": "ES",
"nickname": "My BMW X2",
"registration": "GJ01M20191"
}
}
}
Fired when a vehicle is plugged / unplugged to charger.
{
"type": "vehicle.plug-status",
"jobId": "641aeef260d202219c22aa3a",
"message": "Plug-status change detected",
"vehicleId": "641aeef260d202219c22f03b",
"currentState": "Plugged",
"vehicleState": {
"id": "63ed07f8d2100cc452f57e3d",
"odo": {
"unit": "km",
"value": 12345,
"lastUpdated": "2023-06-29T11:29:11.815Z"
},
"state": "ACTIVE",
"location": {
"latitude": 12.345678,
"longitude": 7.3321,
"lastUpdated": "2023-06-29T11:29:11.815Z"
},
"batteryState": {
"soc": 77,
"range": 216,
"isPlugged": true,
"rangeUnit": "km",
"isCharging": true,
"lastUpdated": "2023-06-29T11:29:11.815Z",
"chargeThresholdMet": true
},
"stateDescription": "The connection to vehicle is active and the data is up to date.",
"staticAttributes": {
"vin": "MAT534006MPTS4325",
"make": "BMW",
"year": 2022,
"model": "X2 xDrive25e",
"country": "ES",
"nickname": "My BMW X2",
"registration": "GJ01M20191"
}
}
}
Fired when a vehicle reaches target SOC while charging.
{
"type": "vehicle.soc",
"jobId": "641aeef260d202219c22aa3a",
"message": "Target SOC reached",
"targetSoc": 40,
"vehicleId": "641aeef260d202219c22f03b",
"currentSoc": 40.2,
"vehicleState": {
"id": "63ed07f8d2100cc452f57e3d",
"odo": {
"unit": "km",
"value": 12345,
"lastUpdated": "2023-06-29T11:29:11.815Z"
},
"state": "ACTIVE",
"location": {
"latitude": 12.345678,
"longitude": 7.3321,
"lastUpdated": "2023-06-29T11:29:11.815Z"
},
"batteryState": {
"soc": 77,
"range": 216,
"isPlugged": true,
"rangeUnit": "km",
"isCharging": true,
"lastUpdated": "2023-06-29T11:29:11.815Z",
"chargeThresholdMet": true
},
"stateDescription": "The connection to vehicle is active and the data is up to date.",
"staticAttributes": {
"vin": "MAT534006MPTS4325",
"make": "BMW",
"year": 2022,
"model": "X2 xDrive25e",
"country": "ES",
"nickname": "My BMW X2",
"registration": "GJ01M20191"
}
}
}