> For the complete documentation index, see [llms.txt](https://docs.artificient.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.artificient.de/api-documentation/crash.md).

# Crash

<mark style="color:red;">**NOTE: Use the following endpoints only if the crash detection feature is enabled in the GIZO SDK.**</mark>

## Get the List of All Accidents

The endpoint returns all detected accidents for a user.

## GET /api/v1/accidents

>

```json
{"openapi":"3.0.1","info":{"title":"Gizo API v1","version":"1.0"},"servers":[{"url":"https://api.artificient.de"},{"url":"https://api.gizo.pod.artificient.de"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Provide a JWT Bearer","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Gizo.Application.Accidents.V1.Dtos.AccidentDetailResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"timestamp":{"type":"string","format":"date-time"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"speed":{"type":"number","format":"double"},"acceleration":{"type":"number","format":"double"},"impactDirection":{"type":"array","items":{"type":"integer","format":"int32"},"nullable":true},"isConfirmed":{"type":"boolean","nullable":true},"status":{"type":"string","nullable":true},"weather":{"type":"string","nullable":true},"roadType":{"type":"string","nullable":true},"speeding":{"type":"boolean","nullable":true},"harshAccel":{"type":"boolean","nullable":true},"harshBrake":{"type":"boolean","nullable":true},"harshCorner":{"type":"boolean","nullable":true},"focus":{"type":"boolean","nullable":true},"possibleCauseOfAccident":{"type":"array","items":{"type":"string"},"nullable":true},"dayTripsCount":{"type":"integer","format":"int32","nullable":true},"dayTripsDistance":{"type":"number","format":"double","nullable":true},"dayTripsDuration":{"type":"number","format":"double","nullable":true},"travelDirection":{"type":"string","nullable":true},"drivenPostCrash":{"type":"string","nullable":true},"severity":{"type":"string","nullable":true},"fatigue":{"type":"boolean","nullable":true},"fullAddress":{"type":"string","nullable":true},"locality":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"place":{"type":"string","nullable":true},"license":{"type":"string","nullable":true},"carModel":{"type":"string","nullable":true},"evasiveManeuver":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/api/v1/accidents":{"get":{"tags":["Accident"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Gizo.Application.Accidents.V1.Dtos.AccidentDetailResponse"}}}}}}}}}}
```

**Header Request Parameters**

Authentication Bearer Token

#### **Response**

The provided endpoint response contains a list of objects, each includes:

**id:** accident ID\
**timestamp:** the time the accident has occurred, with "yyyy-mm-ddTHH:MM:SS.sssZ" format\
**latitude:** latitude of the location of the accident in degrees\
**longitude:** longitude of the location of the accident in degrees\
**speed:** the vehicle speed at the time of impact in kph\
**acceleration:** the maximum acceleration at the time of impact in G\
**impactDirection:** the list of the directions of impact to the vehicles\
**isConfirmed:** indicates whether the crash has been confirmed by the user when `true`\
**status:** indicates whether the crash has been analysed\
**weather:** indicates the weather condition (xxxxxxxxxxxxxxxx) at the time the crash has occurred\
**roadType:** indicates the road type where the accident has happened,\
**speeding:** indicates whether the vehicle was speeding prior to the crash\
**harshAccel:** indicates whether the driver accelerated harshly prior to the crash\
**harshBrake:** indicates whether the driver braked harshly prior to the crash to evade the accident\
**harshCorner:** indicates whether the driver turned aggressively prior to the crash\
**focus:** indicates whether the driver was attentive (not using her/his phone) prior to the crash\
**possibleCauseOfAccident:** a list of possible reasons for the accidents\
**dayTripsCount:** the number of the trips on the day of the accident until the accident occurred\
**dayTripsDistance:** the total driven distance on the day of the accident until the accident occurred\
**dayTripsDuration:** the total duration of trips on the day of the accident until the accident occurred\
**travelDirection:** indicates whether the vehicle was moving in the forward/backward direction at the time of impact\
**drivenPostCrash:** indicates whether the driver continued driving after the crash\
**severity:** indicates whether the crash is severe (>=10G impact acceleration) or minor (<10G impact acceleration)\
**fatigue:** indicates whether the driver has been tired at the time of crash\
**fullAddress:** Reverse-geocoded (human-readable) address where the accident occurred\
**locality:** the neighbourhood where the accident has occurred\
**address:** the street/road where the accident has occurred\
**postalCode:** the ZIP code where the accident has occurred\
**place:** the city/town where the accident has occurred\
**license:** the license of the crashed vehicle\
**carModel:** the make and model of the crashed vehicle\
**evasiveManeuver:** indicates whether the driver tried to evade the accident by turning/changing the lane

## Get the List of Accidents by Trip ID

The endpoint returns all detected accidents during a trip.

## GET /api/v1/trips/{tripId}/accidents

>

```json
{"openapi":"3.0.1","info":{"title":"Gizo API v1","version":"1.0"},"servers":[{"url":"https://api.artificient.de"},{"url":"https://api.gizo.pod.artificient.de"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Provide a JWT Bearer","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Gizo.Application.Accidents.V1.Dtos.AccidentResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"timestamp":{"type":"string","format":"date-time"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"speed":{"type":"number","format":"double"},"acceleration":{"type":"number","format":"double"},"isConfirmed":{"type":"boolean","nullable":true},"status":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/api/v1/trips/{tripId}/accidents":{"get":{"tags":["Accident"],"parameters":[{"name":"tripId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Gizo.Application.Accidents.V1.Dtos.AccidentResponse"}}}}}}}}}}
```

**Header Request Parameters**

Authentication Bearer Token

**Request Parameters**&#x20;

**tripId:** the ID of the trip of which the accidents are queried.

#### **Response**

The provided endpoint response contains a list of objects, each includes:

**id:** accident ID\
**timestamp:** the time the accident has occurred, with "yyyy-mm-ddTHH:MM:SS.sssZ" format\
**latitude:** latitude of the location of the accident in degrees\
**longitude:** longitude of the location of the accident in degrees\
**speed:** the vehicle speed at the time of impact in kph\
**acceleration:** the maximum acceleration at the time of impact in G\
**isConfirmed:** indicates whether the crash has been confirmed by the user when `true`\
**status:** indicates whether the crash has been analysed

## Get An Accident by Accident ID

The endpoint returns the information regarding an accident.

## GET /api/v1/accidents/{accidentId}

>

```json
{"openapi":"3.0.1","info":{"title":"Gizo API v1","version":"1.0"},"servers":[{"url":"https://api.artificient.de"},{"url":"https://api.gizo.pod.artificient.de"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Provide a JWT Bearer","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Gizo.Application.Accidents.V1.Dtos.AccidentDetailResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"timestamp":{"type":"string","format":"date-time"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"speed":{"type":"number","format":"double"},"acceleration":{"type":"number","format":"double"},"impactDirection":{"type":"array","items":{"type":"integer","format":"int32"},"nullable":true},"isConfirmed":{"type":"boolean","nullable":true},"status":{"type":"string","nullable":true},"weather":{"type":"string","nullable":true},"roadType":{"type":"string","nullable":true},"speeding":{"type":"boolean","nullable":true},"harshAccel":{"type":"boolean","nullable":true},"harshBrake":{"type":"boolean","nullable":true},"harshCorner":{"type":"boolean","nullable":true},"focus":{"type":"boolean","nullable":true},"possibleCauseOfAccident":{"type":"array","items":{"type":"string"},"nullable":true},"dayTripsCount":{"type":"integer","format":"int32","nullable":true},"dayTripsDistance":{"type":"number","format":"double","nullable":true},"dayTripsDuration":{"type":"number","format":"double","nullable":true},"travelDirection":{"type":"string","nullable":true},"drivenPostCrash":{"type":"string","nullable":true},"severity":{"type":"string","nullable":true},"fatigue":{"type":"boolean","nullable":true},"fullAddress":{"type":"string","nullable":true},"locality":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"postalCode":{"type":"string","nullable":true},"place":{"type":"string","nullable":true},"license":{"type":"string","nullable":true},"carModel":{"type":"string","nullable":true},"evasiveManeuver":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/api/v1/accidents/{accidentId}":{"get":{"tags":["Accident"],"parameters":[{"name":"accidentId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Gizo.Application.Accidents.V1.Dtos.AccidentDetailResponse"}}}}}}}}}
```

**Header Request Parameters**

Authentication Bearer Token

**Request Parameters**&#x20;

**accidentId:** the ID of the requested accident.

#### **Response**

The provided endpoint response is an object containing the following information:

**id:** accident ID\
**timestamp:** the time the accident has occurred, with "yyyy-mm-ddTHH:MM:SS.sssZ" format\
**latitude:** latitude of the location of the accident in degrees\
**longitude:** longitude of the location of the accident in degrees\
**speed:** the vehicle speed at the time of impact in kph\
**acceleration:** the maximum acceleration at the time of impact in G\
**impactDirection:** the list of the directions of impact to the vehicles\
**isConfirmed:** indicates whether the crash has been confirmed by the user when `true`\
**status:** indicates whether the crash has been analysed\
**weather:** indicates the weather condition (xxxxxxxxxxxxxxxx) at the time the crash has occurred\
**roadType:** indicates the road type where the accident has happened,\
**speeding:** indicates whether the vehicle was speeding prior to the crash\
**harshAccel:** indicates whether the driver accelerated harshly prior to the crash\
**harshBrake:** indicates whether the driver braked harshly prior to the crash to evade the accident\
**harshCorner:** indicates whether the driver turned aggressively prior to the crash\
**focus:** indicates whether the driver was attentive (not using her/his phone) prior to the crash\
**possibleCauseOfAccident:** a list of possible reasons for the accidents\
**dayTripsCount:** the number of the trips on the day of the accident until the accident occurred\
**dayTripsDistance:** the total driven distance on the day of the accident until the accident occurred\
**dayTripsDuration:** the total duration of trips on the day of the accident until the accident occurred\
**travelDirection:** indicates whether the vehicle was moving in the forward/backward direction at the time of impact\
**drivenPostCrash:** indicates whether the driver continued driving after the crash\
**severity:** indicates whether the crash is severe (>=10G impact acceleration) or minor (<10G impact acceleration)\
**fatigue:** indicates whether the driver has been tired at the time of crash\
**fullAddress:** Reverse-geocoded (human-readable) address where the accident occurred\
**locality:** the neighbourhood where the accident has occurred\
**address:** the street/road where the accident has occurred\
**postalCode:** the ZIP code where the accident has occurred\
**place:** the city/town where the accident has occurred\
**license:** the license of the crashed vehicle\
**carModel:** the make and model of the crashed vehicle\
**evasiveManeuver:** indicates whether the driver tried to evade the accident by turning/changing the lane

## Confirm an Accident

The endpoint allows users to confirm or reject their accidents.

## POST /api/v1/accidents/{accidentId}/confirm

>

```json
{"openapi":"3.0.1","info":{"title":"Gizo API v1","version":"1.0"},"servers":[{"url":"https://api.artificient.de"},{"url":"https://api.gizo.pod.artificient.de"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Provide a JWT Bearer","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Gizo.Application.Accidents.V1.Dtos.AccidentConfirmRequest":{"type":"object","properties":{"isConfirm":{"type":"boolean"},"impactDirection":{"type":"array","items":{"type":"integer","format":"int32"},"nullable":true}},"additionalProperties":false}}},"paths":{"/api/v1/accidents/{accidentId}/confirm":{"post":{"tags":["Accident"],"parameters":[{"name":"accidentId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Gizo.Application.Accidents.V1.Dtos.AccidentConfirmRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Gizo.Application.Accidents.V1.Dtos.AccidentConfirmRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Gizo.Application.Accidents.V1.Dtos.AccidentConfirmRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"boolean"}}}}}}}}}
```

**Header Request Parameters**

Authentication Bearer Token

**Request Parameters**&#x20;

**accidentId:** the ID of the accident to be confirmed or rejected

#### Request Query Parameters

**isConfirm:** set to `true`  to confirm an accident; otherwise set to `false`&#x20;

**impactDirection:** the list direction(s) from which the vehicle has been damaged, e.g. \[0, 5] for a frontal crash. Set to \[] or `null` to ignore.

<table><thead><tr><th width="394.28515625">Direction*</th><th width="100" data-type="number">Value</th></tr></thead><tbody><tr><td>From the center of the hood to the left A-pillar</td><td>0</td></tr><tr><td>From the left A-pillar to the left C-pillar</td><td>1</td></tr><tr><td>From the left C-pillar to the center of the trunk</td><td>2</td></tr><tr><td>From the right C-pillar to the center of the trunk</td><td>3</td></tr><tr><td>From the right A-pillar to the right C-pillar</td><td>4</td></tr><tr><td>From the center of the hood to the right A-pillar</td><td>5</td></tr></tbody></table>

&#x20;\* vehicle side (left/right) is determined w\.r.t. the direction of driving.

**Response**

The endpoint returns `true` if the data are posted successfully.
