Vehicle API - V2
Create vehicle.
Adds a new vehicle and returns its ID, type, license plate, and details.
Endpoint
POST - https://api.travisroadservices.com/v2/vehicles
Copy
Request body
Fields
| Field | Type | Required | Description |
|---|---|---|---|
licensePlate
|
string | No | 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
|
integer | No | ID of the fuel card to link to this vehicle. Used when a booking or transaction is made. |
fleetNumber
|
string | No | Fleet number to which this vehicle belongs. |
vehicleDepot
|
string (iri-reference) | No | Vehicle depot this vehicle is assigned to. The depot ID can be retrieved via the vehicle depot API. |
vehicleType
|
string (iri-reference) | No | Type of the vehicle. Available vehicle types can be retrieved via the vehicle type API. |
vin
|
string | No | VIN number of the vehicle. |
washFrequency
|
object | No | Wash frequency configuration for the vehicle. Only available for accounts with the control or automate subscription. |
inside
|
object | No | Inside wash frequency configuration for the vehicle. |
interval
|
integer | No | Maximum number of days allowed between inside washes. |
outside
|
object | No | Outside wash frequency configuration for the vehicle. |
interval
|
integer | No | Maximum number of days allowed between outside washes. |
Example
Response body
Response 201
VehicleResource resource created
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. |
isMainCard
|
boolean | Indicates whether this is the main fuel card for the vehicle. |
status
|
string | Current status 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. |
vin
|
string | VIN number of the vehicle. |
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. |
isDeletable
|
boolean |
Example