collisionsNotification Webhook
The Collisions notification is sent by Zendrive when a collision is detected. Your application can now query the Zendrive API for Collision Info for this trip. See First Notification of Loss.
POST
Headers
Authorization*
Application/JSON
APIKEY <apikey>
The notification data block contains the following fields.
version
Currently, the value of this field is 3.
type
The type
for this notification is a collision
.
driver_id
The unique identification of the driver whose trip was just scored.
trip_id
The unique identification of the trip which was just scored.
data
A dictionary with the following details about the trip, available only to applications who are set up to receive trip details via the webhook. Contact [email protected] to set this up for your application. Otherwise, this field will be an empty dictionary:
info
: The recorded information about the trip [ Total kilometers driven, drive time, and so on].simple_path
: A coarse GPS trail of the trip, useful for trip path visualization.events
: Events detected by Zendrive during the trip such as speeding, hard braking, phone use, and so on.collision_information
: Data related to the detected collision including time, location, g-force, and whether airbags were deployed, among others.
Sample Notification
{
"version": 3,
"type": "COLLISION",
"collision_id": "1416227804134",
"driver_id": "10101672903689391",
"data": {
"info": {
"time": "2020-03-10T19:32:29-05:00",
"trip_id": 1583868749000, # new_field for everyone
"trip_max_speed_kmph": 48.311961625088735,
"duration_seconds": 1608.526,
"distance_km": 3.812,
"session_id": "NA",
"tracking_id": "34451-b",
"insurance_period": 2,
"device_type": "google pixel 2",
"platform": "android",
"user_mode": "passenger",
"drive_type": "driving"
},
"simple_path": [
{
"latitude": 40.7048046,
"timestamp": "2018-01-25T16:28:35.318000-05:00",
"longitude": -73.7980828,
"time_millis": 1516915715318
},
{
"latitude": 40.7048046,
"timestamp": "2018-01-25T16:29:10.805000-05:00",
"longitude": -73.7980314,
"time_millis": 1516915750805
}
],
"events": [
{
"event_type": 3,
"event_type_name": "OVERSPEEDING",
"latitude_end": 40.9145881796243,
"longitude_end": -74.2668195549313,
"longitude_start": -74.2656172626412,
"latitude_start": 40.9139556857207,
"average_driver_speed_kmph": 49.535568691545045,
"max_driver_speed_kmph": 78.98654033076772,
"end_time": "2017-09-07T15:16:45-04:00",
"posted_speed_limit_kmph": 32.186854250516596,
"start_time": "2017-09-07T15:15:56-04:00"
}
],
"collision_information": {
"latitude": 23.23,
"longitude": 223.2323,
"collision_severity": "LOW", # Available SDK 8.2 onwards
"direction_of_impact": "FRONT", # Available SDK 8.3 onwards
"time": "2017-09-07T15:15:56-04:00",
"road_type": "road_type",
"physical_address": "add",
"road_speed_limit_mps": 23,
"current_speed_mps": 1.23,
"g_force": 23.23,
"heading_degrees": 23.23,
"brake_distance_meters": 23.23,
"deceleration_rate_miles_per_hour_per_second": 2323.23,
"airbag_deployed": true,
"confidence_number": 32,
"confidence" : "high",
"latitude": 23.23,
"longitude": 223.2323,
"message": "Message Sent by SDK inside the Data field"
}
}
}
Was this helpful?