fetchCollisions API Endpoint

fetchCollisionInfo API Endpoint

The fetchCollisionInformation API fetches all the information about the trip associated with a particular collision ID, as well as specific information regarding the collision and sensors.

For details about trip information, see Trip Scores. Collision-specific and sensor-specific data points are described below.

API Details

Fetch Collision Info

GET https://api.zendrive.com/v3/driver/<driver_id>/collision/<collision_id>

Use a collision's ID to retrieve trip information, including but not limited to timestamp, location (latitude and longitude), and confidence number and confidence level.

Query Parameters

Name
Type
Description

driver_id

String

The Driver ID associated with the collision.

collision_id

String

The collision's unique identifier.

{
    "data": {
        "info": {
            "start_time": "2023-10-01T18:59:35-04:00",
            "end_time": "2023-10-01T19:13:42-04:00",
            "trip_id": 1696201175168,
            "latitude_start": 40.84726573299213,
            "longitude_start": -81.94557601610396,
            "latitude_end": 40.987975240163976,
            "longitude_end": -81.99479910514093,
            "trip_max_speed_kmph": 127.33061886000938,
            "duration_seconds": 846.833,
            "distance_km": 16.487,
            "session_id": "NA",
            "tracking_id": "NA",
            "insurance_period": "NA",
            "device_type": "iPhone 13 Pro Max",
            "platform": "ios",
            "user_mode": "driver",
            "drive_type": "driving",
            "vehicle_type": "Car"
        },
        "events": [
            {
                "event_type": 2,
                "event_type_name": "PHONE_USE",
                "start_time": "2023-10-01T19:08:16-04:00",
                "end_time": "2023-10-01T19:08:30-04:00",
                "latitude_start": 40.95293328428811,
                "longitude_start": -81.99425521255851,
                "latitude_end": 40.95514433961397,
                "longitude_end": -81.9944848517862
            },
            {
                "event_type": 4,
                "event_type_name": "COLLISION",
                "start_time": "2023-10-01T19:08:21-04:00",
                "end_time": "2023-10-01T19:08:21-04:00",
                "latitude_start": 40.95436768989321,
                "longitude_start": -81.99435373342257,
                "latitude_end": 40.95436768989321,
                "longitude_end": -81.99435373342257
            },
            {
                "event_type": 0,
                "event_type_name": "HARD_BRAKE",
                "start_time": "2023-10-01T19:08:24-04:00",
                "end_time": "2023-10-01T19:08:24-04:00",
                "latitude_start": 40.95387247640907,
                "longitude_start": -81.99429891341607,
                "latitude_end": 40.95503434680336,
                "longitude_end": -81.99446283732698
            },
        ],
        "simple_path": [
            {
                "latitude": 40.84726573299213,
                "longitude": -81.94557601610396,
                "time_millis": 1696201175999,
                "timestamp": "2023-10-01T18:59:35.999000-04:00"
            },
            {
                "latitude": 40.987975240163976,
                "longitude": -81.99479910514093,
                "time_millis": 1696202022001,
                "timestamp": "2023-10-01T19:13:42.001000-04:00"
            },
            {
                "latitude": 40.98796754931309,
                "longitude": -81.99479906422792,
                "time_millis": 1696202022238,
                "timestamp": "2023-10-01T19:13:42-04:00"
            }
        ],
        "collision_information": {
            "callbacks": "[{\"callback_type\": \"intermediate\", \"confidence\": 82, \"timestamp\": 1696201720682}, {\"callback_type\": \"final\", \"confidence\": 86, \"timestamp\": 1696201760680}]",
            "confidence_number": 86,
            "road_type": "Main Road",
            "physical_address": "12xxx Z Rd, OH 44214-xxxx, United States",
            "road_speed_limit_mps": 24.72221457376,
            "current_speed_mps": 29.823061220597335,
            "g_force": 14.130227326719895,
            "heading_degrees": 333.0,
            "brake_distance_meters": 168.00850356499933,
            "deceleration_rate_miles_per_hour_per_second": -13.393516216755955,
            "airbag_deployed": false,
            "collision_severity": "HIGH",
            "direction_of_impact": "REAR",
            "latitude": 40.95436768989321,
            "longitude": -81.99435373342257,
            "confidence": "HIGH",
            "time": "2023-10-01T19:08:21-04:00"
        },
        "sensor_info": {
            "gps": [
                {
                    "course": 62.0,
                    "horizontal_accuracy": 7.0,
                    "latitude": 40.84726573299213,
                    "longitude": -81.94557601610396,
                    "timestamp": 1696201175999,
                    "raw_speed_mps": 6.522237,
                    "heading": 70.0,
                    "date_time": "2023-10-01T18:59:35-04:00"
                },
                {
                    "course": 350.0,
                    "horizontal_accuracy": 4.0,
                    "latitude": 40.955404409746954,
                    "longitude": -81.99454257615018,
                    "timestamp": 1696201720000,
                    "raw_speed_mps": 0.976774,
                    "heading": 44.0,
                    "date_time": "2023-10-01T19:08:40-04:00"
                },
                {
                    "course": 350.0,
                    "horizontal_accuracy": 4.0,
                    "latitude": 40.95539267511795,
                    "longitude": -81.99454078494357,
                    "timestamp": 1696201721000,
                    "raw_speed_mps": 0.0,
                    "heading": 44.0,
                    "date_time": "2023-10-01T19:08:41-04:00"
                }
            ],
            "motion": [
                {
                    "timestamp": 1696201691182,
                    "date_time": "2023-10-01T19:08:11-04:00",
                    "acceleration_R": 0.11097596511243128
                },
                {
                    "timestamp": 1696201711159,
                    "date_time": "2023-10-01T19:08:31-04:00",
                    "acceleration_R": 0.07437027473126814
                },
                {
                    "timestamp": 1696201711169,
                    "date_time": "2023-10-01T19:08:31-04:00",
                    "acceleration_R": 0.07783637833254008
                }
            ]
        }
    },
    "collision_id": "1696201701175",
    "driver_id": "sample_driver"
}

Response Fields

collision_information Fields

Data points are in alphabetical order.

Collision Information Data Points
Description

airbag_deployed

The boolean value that indicates whether airbags were deployed or not.

brake_distance_meters

The distance at which the vehicle speed starts dropping till the collision time stamp.

confidence

Confidence level. Can be either HIGH or LOW.

HIGH confidence equates to a confidence number of 75+ on Android and 85+ on iOS.

confidence_number

A numeric value (0-100) that specifies how confident Zendrive is that a collision occurred. Used to apply custom thresholds for emergency action.

collision_severity

The measure of collision severity, indicated as LOW, HIGH or UNKNOWN.

current_speed_mps

The speed at which the event occurred, expressed in metres per second.

deceleration_rate_miles_per_hour_per_second

Indicates how quickly the vehicle decelerated within the collision window.

direction_of_impact

The direction from which the vehicle was hit. The value for the direction_of_impact field can be FRONT, REAR, BROADSIDE or UNKNOWN.

g_force

The maximum g-force generated within the collision window.

heading_degrees

The direction of motion indicated via a degree of rotation from the North.

latitude

The latitudinal value of the location of the collision.

longitude

The longitudinal value of the location of the collision.

physical_address

The physical address of the location where the collision occurred.

road_speed_limit_mps

Posted speed limit at which the event occured, expressed in meters per second.

road_type

The type of road at the location of the collision.

time

Time of occurrence of the collision. Uses the timezone of the location where the collision occurred, for example, 2017-09-07T15:15:56-04:00.

callbacks

Details about collision callbacks such as type, confidence, timestamp and so on.

sensor_info Fields

sensor_info Data Points
Description

gps

The GPS coordinates of the collision location.

gps.course

The direction of movement before collision, expressed as degrees of rotation from the North.

gps.heading

The compass direction in which a user's device is travelling.

gps.date_time

Human-readable timestamp, for example: 2017-09-07T15:15:56-04:00.

gps.horizontal_accuracy

Accuracy of location of collision, expressed in meters.

gps.latitude

The latitude value of the location recorded by the GPS sensor.

gps.longitude

The longitude value of the location recorded by the GPS sensor.

gps.raw_speed_mps

Raw speed of vehicle before collision as detected by the GPS sensor, expressed in meters per second.

gps.timestamp

The time at which the GPS information was recorded, expressed as a Unix timestamp, for example, 153758231481.

motion

Motion data from 20 seconds before the collision.

motion.acceleration_R

Overall acceleration recorded by accelerometer in Gs.

motion.date_time

Human-readable timestamp, for example, 2017-09-07T15:15:56-04:00.

motion.timestamp

The time at which the motion information was recorded, expressed as a Unix timestamp, for example, 537582314814.

Sample Response Body

{
    "data": {
        "info": {
            "start_time": "2023-10-01T18:59:35-04:00",
            "end_time": "2023-10-01T19:13:42-04:00",
            "trip_id": 1696201175168,
            "latitude_start": 40.84726573299213,
            "longitude_start": -81.94557601610396,
            "latitude_end": 40.987975240163976,
            "longitude_end": -81.99479910514093,
            "trip_max_speed_kmph": 127.33061886000938,
            "duration_seconds": 846.833,
            "distance_km": 16.487,
            "session_id": "NA",
            "tracking_id": "NA",
            "insurance_period": "NA",
            "device_type": "iPhone 13 Pro Max",
            "platform": "ios",
            "user_mode": "driver",
            "drive_type": "driving",
            "vehicle_type": "Car"
        },
        "events": [
            {
                "event_type": 2,
                "event_type_name": "PHONE_USE",
                "start_time": "2023-10-01T19:08:16-04:00",
                "end_time": "2023-10-01T19:08:30-04:00",
                "latitude_start": 40.95293328428811,
                "longitude_start": -81.99425521255851,
                "latitude_end": 40.95514433961397,
                "longitude_end": -81.9944848517862
            },
            {
                "event_type": 4,
                "event_type_name": "COLLISION",
                "start_time": "2023-10-01T19:08:21-04:00",
                "end_time": "2023-10-01T19:08:21-04:00",
                "latitude_start": 40.95436768989321,
                "longitude_start": -81.99435373342257,
                "latitude_end": 40.95436768989321,
                "longitude_end": -81.99435373342257
            },
            {
                "event_type": 0,
                "event_type_name": "HARD_BRAKE",
                "start_time": "2023-10-01T19:08:24-04:00",
                "end_time": "2023-10-01T19:08:24-04:00",
                "latitude_start": 40.95387247640907,
                "longitude_start": -81.99429891341607,
                "latitude_end": 40.95503434680336,
                "longitude_end": -81.99446283732698
            },
        ],
        "simple_path": [
            {
                "latitude": 40.84726573299213,
                "longitude": -81.94557601610396,
                "time_millis": 1696201175999,
                "timestamp": "2023-10-01T18:59:35.999000-04:00"
            },
            {
                "latitude": 40.987975240163976,
                "longitude": -81.99479910514093,
                "time_millis": 1696202022001,
                "timestamp": "2023-10-01T19:13:42.001000-04:00"
            },
            {
                "latitude": 40.98796754931309,
                "longitude": -81.99479906422792,
                "time_millis": 1696202022238,
                "timestamp": "2023-10-01T19:13:42-04:00"
            }
        ],
        "collision_information": {
            "callbacks": "[{\"callback_type\": \"intermediate\", \"confidence\": 82, \"timestamp\": 1696201720682}, {\"callback_type\": \"final\", \"confidence\": 86, \"timestamp\": 1696201760680}]",
            "confidence_number": 86,
            "road_type": "Main Road",
            "physical_address": "12xxx Z Rd, OH 44214-xxxx, United States",
            "road_speed_limit_mps": 24.72221457376,
            "current_speed_mps": 29.823061220597335,
            "g_force": 14.130227326719895,
            "heading_degrees": 333.0,
            "brake_distance_meters": 168.00850356499933,
            "deceleration_rate_miles_per_hour_per_second": -13.393516216755955,
            "airbag_deployed": false,
            "collision_severity": "HIGH",
            "direction_of_impact": "REAR",
            "latitude": 40.95436768989321,
            "longitude": -81.99435373342257,
            "confidence": "HIGH",
            "time": "2023-10-01T19:08:21-04:00"
        },
        "sensor_info": {
            "gps": [
                {
                    "course": 62.0,
                    "horizontal_accuracy": 7.0,
                    "latitude": 40.84726573299213,
                    "longitude": -81.94557601610396,
                    "timestamp": 1696201175999,
                    "raw_speed_mps": 6.522237,
                    "heading": 70.0,
                    "date_time": "2023-10-01T18:59:35-04:00"
                },
                {
                    "course": 350.0,
                    "horizontal_accuracy": 4.0,
                    "latitude": 40.955404409746954,
                    "longitude": -81.99454257615018,
                    "timestamp": 1696201720000,
                    "raw_speed_mps": 0.976774,
                    "heading": 44.0,
                    "date_time": "2023-10-01T19:08:40-04:00"
                },
                {
                    "course": 350.0,
                    "horizontal_accuracy": 4.0,
                    "latitude": 40.95539267511795,
                    "longitude": -81.99454078494357,
                    "timestamp": 1696201721000,
                    "raw_speed_mps": 0.0,
                    "heading": 44.0,
                    "date_time": "2023-10-01T19:08:41-04:00"
                }
            ],
            "motion": [
                {
                    "timestamp": 1696201691182,
                    "date_time": "2023-10-01T19:08:11-04:00",
                    "acceleration_R": 0.11097596511243128
                },
                {
                    "timestamp": 1696201711159,
                    "date_time": "2023-10-01T19:08:31-04:00",
                    "acceleration_R": 0.07437027473126814
                },
                {
                    "timestamp": 1696201711169,
                    "date_time": "2023-10-01T19:08:31-04:00",
                    "acceleration_R": 0.07783637833254008
                }
            ]
        }
    },
    "collision_id": "1696201701175",
    "driver_id": "sample_driver"
}

Was this helpful?