Accidents

Update Accident

Update an Accident. The external_id is set when an Accident is created and is ignored here.

patch/accidents/{id}

Request

Path parameters

idstring required

The id of the relevant record

Request body

vehicle_idinteger

The id of the Vehicle involved in the Accident. Required when creating an Accident.

driver_idinteger

The id of the Contact who was driving. Required when creating an Accident.

occurred_atstring date-time

The date and time at which the Accident occurred. Required when creating an Accident. We recommend using ISO-8601 formatted dates to avoid ambiguity.

street_addressstring nullable

The street address where the Accident occurred.

street_address_line_2string nullable

The second line of the street address.

citystring

The city where the Accident occurred. Required when creating an Accident.

regionstring

The state, province, or territory where the Accident occurred. Required when creating an Accident.

postal_codestring nullable

The postal code where the Accident occurred.

countrystring nullable

The country where the Accident occurred. This is free text. Send an ISO 3166-1 alpha-2 code such as US to match the Fleetio web app.

latitudenumber nullable

The latitude where the Accident occurred.

longitudenumber nullable

The longitude where the Accident occurred.

detection_source'telematics_crash_detection' | 'driver_self_report' | 'dashcam_safety_event' | 'third_party_report' | 'customer_report' | 'insurance_notification' nullable

How the Accident was detected or reported.

weather'clear' | 'rain' | 'snow' | 'fog' | 'sleet' | 'other' nullable

The weather conditions at the time of the Accident.

road_condition'dry' | 'wet' | 'icy' | 'snow_covered' | 'debris' | 'other' nullable

The road conditions at the time of the Accident.

accident_type'rear_end' | 'side_impact' | 'head_on' | 'single_vehicle' | 'backing' | 'parking_lot' | 'hit_and_run' | 'weather_natural_event' | 'vandalism_theft' | 'jobsite_damage' | 'other'

The type of Accident. Required when creating an Accident.

damage_descriptionstring

A description of the damage. Required when creating an Accident.

driver_statementstring nullable

The driver's statement about the Accident.

injuries_reported'no_injuries' | 'minor' | 'serious' | 'fatal'

The most serious level of injury reported. Required when creating an Accident.

police_report_numberstring nullable

The police report number.

other_party_namestring nullable

The name of the other party involved.

other_party_phonestring nullable

The phone number of the other party involved.

other_party_insurancestring nullable

The insurance details of the other party involved.

other_party_vehiclestring nullable

The vehicle of the other party involved.

witness_namestring nullable

The name of a witness.

witness_contactstring nullable

The contact details of a witness.

additional_notesstring nullable

Additional notes about the Accident.

insurance_claim_numberstring nullable

The insurance claim number.

units_involvedinteger nullable

The number of units involved in the Accident.

total_injuredinteger nullable

The total number of people injured. It must be blank or 0 when injuries_reported is no_injuries.

driver_at_faultboolean nullable

Whether the driver was at fault.

total_lossboolean

Whether the vehicle was a total loss.

vehicle_operableboolean nullable

Whether the vehicle was operable after the Accident.

external_idstring nullable

An identifier from an external system, such as the integration that reported the Accident. It is not unique, so creating twice with the same value creates two Accidents. It can be set when creating an Accident and is ignored when updating one.

assigned_contact_idsinteger[]

An array of ids of Contacts assigned to the Accident. The values passed in this array will overwrite any existing assignments.

custom_fieldsCustomFields nullable

*Full details on working with Custom Fields here.

Example request

{
  "occurred_at": "2023-03-14T13:46:27-06:00"
}

Response

OK

idinteger required

The unique identifier of the Accident.

state'open' | 'closed' required

Whether the Accident is open or closed.

vehicle_idinteger required

The id of the Vehicle involved in the Accident.

driver_idinteger nullable

The id of the Contact who was driving.

occurred_atstring date-time nullable

The date and time at which the Accident occurred.

opened_atstring date-time nullable

The date and time at which the Accident was opened.

closed_atstring date-time nullable

The date and time at which the Accident was closed.

closed_by_idinteger nullable

The id of the User who closed the Accident.

closed_notestring nullable

The note recorded when the Accident was closed.

created_by_idinteger nullable

The id of the User who created the Accident.

street_addressstring nullable

The street address where the Accident occurred.

street_address_line_2string nullable

The second line of the street address.

citystring nullable

The city where the Accident occurred.

regionstring nullable

The state, province, or territory where the Accident occurred.

postal_codestring nullable

The postal code where the Accident occurred.

countrystring nullable

The country where the Accident occurred.

latitudenumber nullable

The latitude where the Accident occurred.

longitudenumber nullable

The longitude where the Accident occurred.

detection_source'telematics_crash_detection' | 'driver_self_report' | 'dashcam_safety_event' | 'third_party_report' | 'customer_report' | 'insurance_notification' nullable

How the Accident was detected or reported.

weather'clear' | 'rain' | 'snow' | 'fog' | 'sleet' | 'other' nullable

The weather conditions at the time of the Accident.

road_condition'dry' | 'wet' | 'icy' | 'snow_covered' | 'debris' | 'other' nullable

The road conditions at the time of the Accident.

accident_type'rear_end' | 'side_impact' | 'head_on' | 'single_vehicle' | 'backing' | 'parking_lot' | 'hit_and_run' | 'weather_natural_event' | 'vandalism_theft' | 'jobsite_damage' | 'other' nullable

The type of Accident.

damage_descriptionstring nullable

A description of the damage.

driver_statementstring nullable

The driver's statement about the Accident.

injuries_reported'no_injuries' | 'minor' | 'serious' | 'fatal' nullable

The most serious level of injury reported.

police_report_numberstring nullable

The police report number.

other_party_namestring nullable

The name of the other party involved.

other_party_phonestring nullable

The phone number of the other party involved.

other_party_insurancestring nullable

The insurance details of the other party involved.

other_party_vehiclestring nullable

The vehicle of the other party involved.

witness_namestring nullable

The name of a witness.

witness_contactstring nullable

The contact details of a witness.

additional_notesstring nullable

Additional notes about the Accident.

insurance_claim_numberstring nullable

The insurance claim number.

units_involvedinteger nullable

The number of units involved in the Accident.

total_injuredinteger nullable

The total number of people injured.

driver_at_faultboolean nullable

Whether the driver was at fault.

total_lossboolean

Whether the vehicle was a total loss.

vehicle_operableboolean nullable

Whether the vehicle was operable after the Accident.

external_idstring nullable

An identifier from an external system. It is set by the API caller and is not unique.

comments_countinteger

The count of comments on the Accident.

documents_countinteger

The count of documents on the Accident.

images_countinteger

The count of images on the Accident.

vehicle_archived_atstring date-time nullable

The date and time at which the Accident's Vehicle was archived.

created_atstring date-time

The date and time at which the Accident was created.

updated_atstring date-time

The date and time at which the Accident was last updated.

work_order_idinteger nullable

The id of the linked Work Order. Null when none is linked or the caller cannot read it.

service_entry_idinteger nullable

The id of the linked Service Entry. Null when none is linked or the caller cannot read it.

assigned_contact_idsinteger[]

The ids of the Contacts assigned to the Accident.

custom_fieldsCustomFields nullable

*Full details on working with Custom Fields here.

Example response

{
  "occurred_at": "2023-03-14T13:46:27-06:00",
  "opened_at": "2023-03-14T13:46:27-06:00",
  "closed_at": "2023-03-14T13:46:27-06:00",
  "vehicle_archived_at": "2023-03-14T13:46:27-06:00",
  "created_at": "2023-03-14T13:46:27-06:00",
  "updated_at": "2023-03-14T13:46:27-06:00"
}

Changes

No recorded changes to this operation across all 1 revision of this API.