Create Accident
Creates a new Accident
Request
- Base URLhttps://secure.fleetio.com/api
- AuthAPI key in header Authorization and API key in header Account-Token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
The id of the Vehicle involved in the Accident. Required when creating an Accident.
The id of the Contact who was driving. Required when creating an Accident.
The date and time at which the Accident occurred. Required when creating an Accident. We recommend using ISO-8601 formatted dates to avoid ambiguity.
The street address where the Accident occurred.
The second line of the street address.
The city where the Accident occurred. Required when creating an Accident.
The state, province, or territory where the Accident occurred. Required when creating an Accident.
The postal code where the Accident occurred.
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.
The latitude where the Accident occurred.
The longitude where the Accident occurred.
How the Accident was detected or reported.
The weather conditions at the time of the Accident.
The road conditions at the time of the Accident.
The type of Accident. Required when creating an Accident.
A description of the damage. Required when creating an Accident.
The driver's statement about the Accident.
The most serious level of injury reported. Required when creating an Accident.
The police report number.
The name of the other party involved.
The phone number of the other party involved.
The insurance details of the other party involved.
The vehicle of the other party involved.
The name of a witness.
The contact details of a witness.
Additional notes about the Accident.
The insurance claim number.
The number of units involved in the Accident.
The total number of people injured. It must be blank or 0 when injuries_reported is no_injuries.
Whether the driver was at fault.
Whether the vehicle was a total loss.
Whether the vehicle was operable after the Accident.
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.
An array of ids of Contacts assigned to the Accident. The values passed in this array will overwrite any existing assignments.
*Full details on working with Custom Fields here.
Example request
{
"occurred_at": "2023-03-14T13:46:27-06:00"
}Response
Created
The unique identifier of the Accident.
Whether the Accident is open or closed.
The id of the Vehicle involved in the Accident.
The id of the Contact who was driving.
The date and time at which the Accident occurred.
The date and time at which the Accident was opened.
The date and time at which the Accident was closed.
The id of the User who closed the Accident.
The note recorded when the Accident was closed.
The id of the User who created the Accident.
The street address where the Accident occurred.
The second line of the street address.
The city where the Accident occurred.
The state, province, or territory where the Accident occurred.
The postal code where the Accident occurred.
The country where the Accident occurred.
The latitude where the Accident occurred.
The longitude where the Accident occurred.
How the Accident was detected or reported.
The weather conditions at the time of the Accident.
The road conditions at the time of the Accident.
The type of Accident.
A description of the damage.
The driver's statement about the Accident.
The most serious level of injury reported.
The police report number.
The name of the other party involved.
The phone number of the other party involved.
The insurance details of the other party involved.
The vehicle of the other party involved.
The name of a witness.
The contact details of a witness.
Additional notes about the Accident.
The insurance claim number.
The number of units involved in the Accident.
The total number of people injured.
Whether the driver was at fault.
Whether the vehicle was a total loss.
Whether the vehicle was operable after the Accident.
An identifier from an external system. It is set by the API caller and is not unique.
The count of comments on the Accident.
The count of documents on the Accident.
The count of images on the Accident.
The date and time at which the Accident's Vehicle was archived.
The date and time at which the Accident was created.
The date and time at which the Accident was last updated.
The id of the linked Work Order. Null when none is linked or the caller cannot read it.
The id of the linked Service Entry. Null when none is linked or the caller cannot read it.
The ids of the Contacts assigned to the Accident.
*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.