Vehicle API - V2
List vehicles.
Returns a list of all vehicles, including basic details such as vehicle type and license plate. Optional data such as fleet number and VIN may also be included.
Endpoint
GET - https://api.travisroadservices.com/v2/vehicles
Copy
Query params
| Parameter | Type | Description |
|---|---|---|
search
|
string | Searches vehicles by type name, license plate, fleet number, or vehicle depot name. |
licensePlate
|
string | Filters vehicles by license plate. |
fleetNumber
|
string | Filters vehicles by fleet number. |
vehicleTypes[]
|
string | Filters vehicles by vehicle type IDs. Available vehicle types can be retrieved via the vehicle type API. Multiple values can be passed to broaden the filter. |
vehicleDepots[]
|
string | Filters vehicles by vehicle depot ID. Available depot IDs can be retrieved via the vehicle depot API. Multiple values can be passed to broaden the filter. |
canCombineWithVehicleType
|
string | Filters vehicles that can be combined with the given vehicle type ID. |
service
|
string | Filters vehicles by service. Possible values: truckwash, parking, repair, tankcleaning, truckcharging, carwash. |
vehicleCategory
|
string | Filters vehicles by category. Possible values: towing, towed. |
isReadyToWash
|
string | Filters vehicles by wash readiness status. Possible values: true, false. |
exists[vehicleDepot]
|
string | Filters vehicles by whether they are assigned to a depot. Possible values: true, false. |
fuelCards[]
|
string | Filters vehicles by fuel card ID. Multiple values can be passed to broaden the filter. |
insideWashFrequencyStatuses[]
|
string | Filters vehicles by inside wash frequency status. Possible values: overdue, onTime. Multiple values can be passed to broaden the filter. |
outsideWashFrequencyStatuses[]
|
string | Filters vehicles by outside wash frequency status. Possible values: overdue, onTime. Multiple values can be passed to broaden the filter. |
insideWashFrequencyDaysUntilOverdue
|
string | Filters vehicles that require inside cleaning within the given number of days. |
outsideWashFrequencyDaysUntilOverdue
|
string | Filters vehicles that require outside cleaning within the given number of days. |
order[id]
|
string | Sorts results by vehicle ID. Possible values: asc, desc. |
order[vehicleDepotName]
|
string | Sorts results by vehicle depot name. Possible values: asc, desc. |
order[licensePlate]
|
string | Sorts results by license plate. Possible values: asc, desc. |
order[fleetNumber]
|
string | Sorts results by fleet number. Possible values: asc, desc. |
order[createdAt]
|
string | Sorts results by creation date. Possible values: asc, desc. |
page
|
string | The collection page number |
itemsPerPage
|
string | The number of items per page |
Request body
No request bodyResponse body
Response 200
VehicleResource collection
Fields
| Field | Type | Description |
|---|---|---|
id
|
integer | Unique identifier of the vehicle |
licensePlate
|
string | License plate of the vehicle. May contain alphanumeric characters, dashes, and spaces. Dashes and spaces are stripped before validation; minimum 4 characters, maximum 12. |
fuelCard
|
object | Fuel card linked to this vehicle, used when a booking or transaction is made. |
id
|
integer | Unique identifier of the fuel card. |
cardNumber
|
string | Card number of the fuel card. |
fleetNumber
|
string | Fleet number to which this vehicle belongs. |
vehicleDepot
|
object | Vehicle depot this vehicle is assigned to. The depot ID can be retrieved via the vehicle depot API. |
id
|
object | Unique identifier of the vehicle depot. |
name
|
string | Name of the vehicle depot. |
vehicleType
|
object | Type of the vehicle. Available vehicle types can be retrieved via the vehicle type API. |
id
|
int | Unique identifier of the vehicle type (integer). |
name
|
string | Human-readable name of the vehicle type. |
icon
|
string | URL of the vehicle type icon. May be null if no icon is assigned. |
washFrequency
|
object | Wash frequency configuration for the vehicle. Only available for accounts with the control or automate subscription. |
inside
|
object | Inside wash frequency configuration for the vehicle. |
interval
|
integer | Maximum number of days allowed between inside washes. |
status
|
string | |
lastWashedAt
|
string (date-time) | Date and time when the vehicle was last washed. |
outside
|
object | Outside wash frequency configuration for the vehicle. |
interval
|
integer | Maximum number of days allowed between outside washes. |
status
|
string | |
lastWashedAt
|
string (date-time) | Date and time when the vehicle was last washed. |
created
|
object | Information about when and by whom the vehicle was created. |
at
|
string (date-time) | Date and time when the vehicle was created. |
by
|
object | User or system that created the vehicle. |
id
|
integer | Identifier of the user which created the API Resource |
name
|
string | Name of the user which created the API Resource |
importId
|
string (uuid) | Identifier of the import batch this vehicle was created from. |
Example