Create Vehicle
Creates a new vehicle. If you need to create many vehicles at once, use the Bulk API to avoid Rate Limiting errors.
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 color of this Vehicle.
The ID of the Fuel Type associated with this Vehicle.
The id of the Group for the vehicle
A pipe delimited group hierarchy. Ex: "Level 1|Level 2|Level 3". Where Level 1 is the parent of Level 2, and 2 is the parent of 3. Any missing nodes in the hierarchy will be created.
The label_id(s) of any Labels to assign to this Vehicle. If you wish to keep any existing Labels, those IDs must be included in this array as well.
The license plate number of this Vehicle.
The name of this Vehicle's manufacturer.
The measurement unit used for the Vehicle's primary, or secondary (if applicable), meter.
The name of the model of this Vehicle.
A name to assign to this Vehicle. Must be unique.
The month in which this Vehicle's registration expires.
The state, province, or territory in which this Vehicle is registered.
Indicates whether or not this Vehicle has a secondary meter.
The measurement unit used for the Vehicle's primary, or secondary (if applicable), meter.
The trim level of this Vehicle.
The ID of the Vehicle Status for this Vehicle.
The ID of the Vehicle Type for this Vehicle.
The Vehicle Identification Number of this Vehicle. Must be unique.
This Vehicle's model year.
The vehicle_id(s) of any Vehicles to link to this Vehicle.
Any External IDs associated with this Vehicle.
The name of the Vehicle Status associated with this Vehicle.
The name of the Vehicle Type associated with this Vehicle.
The date on which this Vehicle was put into service. We recommend using ISO-8601 formatted dates to avoid ambiguity.
The meter value at which this Vehicle was put into service.
The estimated number of months this Vehicle will be in service.
The estimated number of miles before which this Vehicle will be replaced.
The estimated resale price of this Vehicle.
The date on which this Vehicle was or will be retired. We recommend using ISO-8601 formatted dates to avoid ambiguity.
The meter value at which this Vehicle was or will be retired.
*Full details on working with Custom Fields here.
Example request
{
"out_of_service_date": "2023-03-14T13:46:27-06:00"
}Response
OK
The iso8601 date and time at which the vehicle was archived, for an archived vehicle.
The name of the Fuel Type associated with this vehicle.
The name of the Group associated with this vehicle, for vehicles associated with a group.
This vehicle's name.
This vehicles Vehicle Type id.
The name of the Vehicle Type associated with this Vehicle.
Indicates whether this Vehicle record is Sample Data.
The id of the Vehicle Status of this vehicle.
The name of the Vehicle Status associated with this Vehicle.
The hex color code of the Vehicle Status associated with this Vehicle.
The measurement unit used for the Vehicle's primary, or secondary (if applicable), meter.
The current value of the primary meter for this Vehicle.
The date and time at which the primary meter was last updated.
The average number of units of the primary meter used per day.
The measurement unit used for the Vehicle's primary, or secondary (if applicable), meter.
The current value of the secondary meter for this Vehicle.
The date and time at which the secondary meter was last updated.
The average number of units of the secondary meter used per day.
The meter value at which this Vehicle was put into service.
The date on which this Vehicle was put into service.
The meter value at which this Vehicle was or will be retired.
The date on which this Vehicle was or will be retired.
The estimated number of months this Vehicle will be in service.
The estimated number of miles before which this Vehicle will be replaced.
The estimated resale price of this Vehicle in cents.
The number of Fuel Entries associated with this Vehicle.
The number of Service Entries associated with this Vehicle.
The number of Service Reminders associated with this Vehicle.
The number of Vehicle Renewal Reminders associated with this Vehicle.
The number of Comments associated with this Vehicle.
The number of documents attached to this Vehicle.
The number of images attached to this Vehicle.
The number of Issues this Vehicle is associated with.
The number of Work Orders this Vehicle is associated with.
The ancestry of the Group associated with this Vehicle.
The color of this Vehicle.
The license plate number of this Vehicle.
The Vehicle Identification Number of this Vehicle.
This Vehicle's model year.
The name of this Vehicle's manufacturer.
The name of the model of this Vehicle.
The trim level of this Vehicle.
The month in which this Vehicle's registration expires.
The state, province, or territory in which this Vehicle is registered.
The URL of a small-sized version of the default image for this Vehicle.
Any External IDs associated with this Vehicle.
Whether this Vehicle has Auto Integrate enabled for it.
Assetable type for Vehicle is always Vehicle for vehicles.
*Full details on working with Custom Fields here.
The id of the Axle Configuration of this vehicle.
The name of the primary meter for this Vehicle.
The name of the secondary meter for this Vehicle.
The account number for this Vehicle's loan, if applicable.
The date and time at which this Vehicle's loan ends.
The interest rate for this Vehicle's loan.
Notes about this Vehicle's loan.
The date and time at which this Vehicle's loan began. Formatted according to ISO-8601 in User's local time.
The name of the Vendor for this Vehicle's loan.
The number of inspection schedules this Vehicle is associated with.
The URL of the default image for this Vehicle.
The URL of a medium-sized version of the default image for this Vehicle.
The URL of a large-sized version of the default image for this Vehicle.
Example response
{
"archived_at": "2023-03-14T13:46:27-06:00",
"primary_meter_date": "2023-03-14T13:46:27-06:00",
"secondary_meter_date": "2023-03-14T13:46:27-06:00",
"in_service_date": "2023-03-14T13:46:27-06:00",
"out_of_service_date": "2023-03-14T13:46:27-06:00",
"loan_ended_at": "2023-03-14T13:46:27-06:00",
"loan_started_at": "2023-03-14T13:46:27-06:00"
}Changes
No recorded changes to this operation across all 1 revision of this API.