# Push Crash Report Data

## **Introduction**

The data collected by the DriveKit SDK during a trip and  a collision enables insurance platforms to streamline claims processing with precise, contextual insights about recorded accidents.  This data accelerates the claims management process and supports more informed decision-making.

The DriveQuant Crash Report delivers a comprehensive analysis of the conditions in which an accident occurred, combining trip data, driving behavior metrics, and crash detection information to give insurers a complete picture of each incident.

## **Principle**

The Crash Report push service sends a comprehensive report once the trip during which the accident occurred has ended and has been analyzed.&#x20;

The overall process is summarized below:

* The SDK begins recording a trip and activates the crash monitoring.
* In case of a suspected collision, the SDK immediately sends a portion of the data to DriveQuant crash analysis service, which calculates the probability that an accident occurred.
* Once the trip ends, the SDK stops trip recording, and sends the data to DriveQuant trip analysis service.
* As soon as the analysis is complete, the crash report is computed and transmitted to your platform through the crash report push service.

{% hint style="info" %}
Crash reports are exclusively computed for confirmed accidents, for which a trip was recorded and analyzed.
{% endhint %}

## Configuration

See [Configuration](https://docs.drivequant.com/introduction#configuration) in the parent section.

The body of the request is a JSON object with a set of fields that contain the raw data and crash indicators. An example of data in JSON format is given at [the end of this section](#sample-message).

Your service should respond with a `2xx` http status code (typically `200 OK`) when the push request is accepted. **Any other code will be considered as a failure**, and the service will attempt to send the data again as defined in the [Retry Policy section](#retry-policy).

{% hint style="danger" %}
If your service responds with a `2xx` http status code, while the data has *not* been accepted by your platform, then there will be *no further attempt to send the data!*
{% endhint %}

## Retry Policy

Every push request not successfully acknowledged by your service will be retried **once a day**. After 30 unsuccessful attempts, the push data will be permanently discarded.

## Sample Message

The OpenAPI specification can be downloaded [here](https://gist.github.com/DriveQuantPublic/0b3e8225f606487882c2b1d43cae061c) in OpenAPI YAML format.

<details>

<summary>Sample message (click to expand)</summary>

```json
{
  "info": {
    "crashId": "695cdaa9c48d52239bffa7da",
    "itinId": "695cdab2f1ac586b8354f596",
    "userId": "af1bc789-9acd-48c7-b017-088cc7725e21",
    "teamName": "mycompany",
    "crashDate": "2025-10-18T09:40:57.330+0000",
    "tripStartDate": "2025-10-18T14:02:13.330+0000",
    "tripEndDate": "2025-10-18T14:24:56.330+0000"
  },
  "tripConditions": {
    "weather": "CLEAR_SKY",
    "roadContext": "SUBURBAN",
    "day": true
  },
  "driverFatigue": {
    "tripDistance": 15.54,
    "tripDuration": 1363,
    "last12HoursDistance": 202,
    "last12HoursDuration": 17719,
    "breakTime": 7637
  },
  "aggressiveDriving": {
    "safetyScoreAverage": 9,
    "safetyScoreTrip": 8.2,
    "hardBrakingFreqAverage": 10.6,
    "hardBrakingFreqTrip": 38.6
  },
  "phoneUsage": {
    "distractionScoreAverage": 8.31,
    "distractionScoreTrip": 4.45,
    "unlocksTrip": 3,
    "callDurationTrip": 3,
    "callForbiddenDurationTrip": 3,
    "distractionToCrashTime": 0,
    "lastDistractionType": "UNAVAILABLE"
  },
  "speeding": {
    "speedingScoreAverage": 7.01,
    "speedingScoreTrip": 6.2,
    "speedingDistanceTrip": 773,
    "speedingDurationTrip": 24,
    "speedingBeforeCrash": 0
  },
  "riskFactors": {
    "tripConditions": "LOW",
    "driverFatigue": "LOW",
    "aggressiveDriving": "HIGH",
    "phoneUse": "HIGH",
    "speeding": "LOW"
  }
}
```

</details>

## Definitions

The body of the request is a JSON object with a set of fields containing general user information and an assessment of the risk factors that may have contributed to  the accident. Risk factors are, divided into five categories:

1. **Trip conditions:** external factors that can increase the risk of accidents (poor weather, heavy traffic, or challenging road conditions).
2. **Driver fatigue:** lack of adequate rest that can decrease awareness and increase reaction times.
3. **Aggressive driving:** dangerous behaviors that can increase the risk of accidents.
4. **Phone usage:** distractions caused by mobile device interaction while driving.
5. **Speeding:** driving over the speed limit, which can reduce vehicle control and increase collision severity.

The probabilities are expressed as binary values (`LOW`, `HIGH`) depending on whether the factor may have contributed to increase the accident risk.

{% hint style="info" %}
The computation of a speeding risk is only available if the speeding score computation is enabled for your account, and if a speeding score was computed for the associated trip.

Please reach out to us at <contact@drivequant.com> if you need to enable this service.
{% endhint %}

The computation of the probabilities is based on several features, which are also included in the content of the crash report request. The content of these features is described in the following sections.

### Trip Conditions

<table><thead><tr><th width="138.78515625">Field</th><th width="108.47265625">Type</th><th>Description</th></tr></thead><tbody><tr><td>weather</td><td><code>string</code></td><td>Weather conditions during the trip<br><em>Allowed values: <code>UNAVAILABLE</code>, <code>UNKNOWN</code>, <code>CLEAR_SKY</code>, <code>CLOUDY</code>, <code>FOGGY</code>, <code>RAINY</code>, <code>SNOWY</code>, <code>ICY</code></em></td></tr><tr><td>roadContext</td><td><code>string</code></td><td>Main road context of the trip<br><em>Allowed values: <code>TRAFFIC_JAM</code>, <code>HEAVY_URBAN_TRAFFIC</code>, <code>CITY</code>, <code>SUBURBAN</code>, <code>EXPRESSWAYS</code></em></td></tr><tr><td>day</td><td><code>boolean</code></td><td>Indicates if the crash happened during the day (<code>true</code>) or at night (<code>false</code>)</td></tr></tbody></table>

### Driver Fatigue

<table><thead><tr><th width="187.35546875">Field</th><th width="105.03125">Type</th><th>Description</th></tr></thead><tbody><tr><td>tripDistance</td><td><code>number</code></td><td>Trip distance (in km)</td></tr><tr><td>tripDuration</td><td><code>integer</code></td><td>Trip duration (in s)</td></tr><tr><td>last12HoursDistance</td><td><code>number</code></td><td>Distance traveled in the last 12 hours (in km)</td></tr><tr><td>last12HoursDuration</td><td><code>integer</code></td><td>Driving time in the last 12 hours (in s)</td></tr><tr><td>breakTime</td><td><code>integer</code></td><td>Break time between the previous trip and the current trip (in s)</td></tr></tbody></table>

### Aggressive Driving

<table><thead><tr><th width="232.91015625">Field</th><th width="100.5859375">Type</th><th>Description</th></tr></thead><tbody><tr><td>safetyScoreAverage</td><td><code>number</code></td><td>Driver average safety score</td></tr><tr><td>safetyScoreTrip</td><td><code>number</code></td><td>Trip safety score</td></tr><tr><td>hardBrakingFreqAverage</td><td><code>number</code></td><td>Driver average frequency of hard braking events (in events / 100 km)</td></tr><tr><td>hardBrakingFreqTrip</td><td><code>number</code></td><td>Trip frequency of hard braking (in events / 100 km)</td></tr></tbody></table>

### Phone Usage

<table><thead><tr><th width="230.87109375">Field</th><th width="106.54296875">Type</th><th>Description</th></tr></thead><tbody><tr><td>distractionScoreAverage</td><td><code>number</code></td><td>Driver average distraction score</td></tr><tr><td>distractionScoreTrip</td><td><code>number</code></td><td>Trip distraction score</td></tr><tr><td>unlocksTrip</td><td><code>integer</code></td><td>Number of phone unlocks during the trip</td></tr><tr><td>callDurationTrip</td><td><code>integer</code></td><td>Total call duration during the trip (in s)</td></tr><tr><td>callForbiddenDurationTrip</td><td><code>integer</code></td><td>Duration of forbidden calls during the trip (in s)</td></tr><tr><td>distractionToCrashTime</td><td><code>integer</code></td><td>Time between last distraction and crash (if &#x3C; 60 s) (in s)</td></tr><tr><td>lastDistractionType</td><td><code>string</code></td><td>Type of last distraction.<br><em>Allowed values: <code>AUTHORIZED_CALL_START</code>, <code>AUTHORIZED_CALL_END</code>, <code>FORBIDDEN_CALL_START</code>, <code>FORBIDDEN_CALL_END</code>, <code>PHONE_UNLOCK</code>, <code>PHONE_LOCK</code>, <code>UNAVAILABLE</code></em></td></tr></tbody></table>

### Speeding

<table><thead><tr><th width="202.3828125">Field</th><th width="89.80078125">Type</th><th>Description</th></tr></thead><tbody><tr><td>speedingScoreAverage</td><td><code>number</code></td><td>Driver average speeding score</td></tr><tr><td>speedingScoreTrip</td><td><code>number</code></td><td>Trip speeding score</td></tr><tr><td>speedingDistanceTrip</td><td><code>number</code></td><td>Trip speeding distance (in m)</td></tr><tr><td>speedingDurationTrip</td><td><code>integer</code></td><td>Trip speeding duration (in s)</td></tr><tr><td>speedingBeforeCrash</td><td><code>integer</code></td><td>Mean velocity above the speed limit during the 20 seconds before the crash (in km/h)</td></tr></tbody></table>
