Crash

NOTE: Use the following endpoints only if the crash detection feature is enabled in the GIZO SDK.

Get the List of All Accidents

The endpoint returns all detected accidents for a user.

get
/api/v1/accidents
Authorizations
AuthorizationstringRequired

Provide a JWT Bearer

Responses
chevron-right
200

Success

application/json
idinteger Β· int64Optional
timestampstring Β· date-timeOptional
latitudenumber Β· doubleOptional
longitudenumber Β· doubleOptional
speednumber Β· doubleOptional
accelerationnumber Β· doubleOptional
impactDirectioninteger Β· int32[] Β· nullableOptional
isConfirmedboolean Β· nullableOptional
statusstring Β· nullableOptional
weatherstring Β· nullableOptional
roadTypestring Β· nullableOptional
speedingboolean Β· nullableOptional
harshAccelboolean Β· nullableOptional
harshBrakeboolean Β· nullableOptional
harshCornerboolean Β· nullableOptional
focusboolean Β· nullableOptional
possibleCauseOfAccidentstring[] Β· nullableOptional
dayTripsCountinteger Β· int32 Β· nullableOptional
dayTripsDistancenumber Β· double Β· nullableOptional
dayTripsDurationnumber Β· double Β· nullableOptional
travelDirectionstring Β· nullableOptional
drivenPostCrashstring Β· nullableOptional
severitystring Β· nullableOptional
fatigueboolean Β· nullableOptional
fullAddressstring Β· nullableOptional
localitystring Β· nullableOptional
addressstring Β· nullableOptional
postalCodestring Β· nullableOptional
placestring Β· nullableOptional
licensestring Β· nullableOptional
carModelstring Β· nullableOptional
evasiveManeuverstring Β· nullableOptional
get
/api/v1/accidents
200

Success

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
Authorizations
AuthorizationstringRequired

Provide a JWT Bearer

Path parameters
tripIdinteger Β· int64Required
Responses
chevron-right
200

Success

application/json
idinteger Β· int64Optional
timestampstring Β· date-timeOptional
latitudenumber Β· doubleOptional
longitudenumber Β· doubleOptional
speednumber Β· doubleOptional
accelerationnumber Β· doubleOptional
isConfirmedboolean Β· nullableOptional
statusstring Β· nullableOptional
get
/api/v1/trips/{tripId}/accidents
200

Success

Header Request Parameters

Authentication Bearer Token

Request Parameters

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}
Authorizations
AuthorizationstringRequired

Provide a JWT Bearer

Path parameters
accidentIdinteger Β· int64Required
Responses
chevron-right
200

Success

application/json
idinteger Β· int64Optional
timestampstring Β· date-timeOptional
latitudenumber Β· doubleOptional
longitudenumber Β· doubleOptional
speednumber Β· doubleOptional
accelerationnumber Β· doubleOptional
impactDirectioninteger Β· int32[] Β· nullableOptional
isConfirmedboolean Β· nullableOptional
statusstring Β· nullableOptional
weatherstring Β· nullableOptional
roadTypestring Β· nullableOptional
speedingboolean Β· nullableOptional
harshAccelboolean Β· nullableOptional
harshBrakeboolean Β· nullableOptional
harshCornerboolean Β· nullableOptional
focusboolean Β· nullableOptional
possibleCauseOfAccidentstring[] Β· nullableOptional
dayTripsCountinteger Β· int32 Β· nullableOptional
dayTripsDistancenumber Β· double Β· nullableOptional
dayTripsDurationnumber Β· double Β· nullableOptional
travelDirectionstring Β· nullableOptional
drivenPostCrashstring Β· nullableOptional
severitystring Β· nullableOptional
fatigueboolean Β· nullableOptional
fullAddressstring Β· nullableOptional
localitystring Β· nullableOptional
addressstring Β· nullableOptional
postalCodestring Β· nullableOptional
placestring Β· nullableOptional
licensestring Β· nullableOptional
carModelstring Β· nullableOptional
evasiveManeuverstring Β· nullableOptional
get
/api/v1/accidents/{accidentId}
200

Success

Header Request Parameters

Authentication Bearer Token

Request Parameters

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
Authorizations
AuthorizationstringRequired

Provide a JWT Bearer

Path parameters
accidentIdinteger Β· int64Required
Body
isConfirmbooleanOptional
impactDirectioninteger Β· int32[] Β· nullableOptional
Responses
chevron-right
200

Success

application/json
booleanOptional
post
/api/v1/accidents/{accidentId}/confirm
200

Success

Header Request Parameters

Authentication Bearer Token

Request Parameters

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

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.

Direction*
Value

From the center of the hood to the left A-pillar

0

From the left A-pillar to the left C-pillar

1

From the left C-pillar to the center of the trunk

2

From the right C-pillar to the center of the trunk

3

From the right A-pillar to the right C-pillar

4

From the center of the hood to the right A-pillar

5

* vehicle side (left/right) is determined w.r.t. the direction of driving.

Response

The endpoint returns true if the data are posted successfully.

Last updated