Update vehicle by ID
PUT/truckers/vehicles/:id
Updates the information of a specific vehicle identified by its ID.
Allows modification of all fields except the license plate.
Submitted images will completely replace the existing ones.
Parameters:
- id (required): Unique ID of the vehicle to update
Modifiable fields:
- type: Vehicle type
- brand: Brand
- model: Model
- year: Year
- images: Images (completely replaced)
Use cases:
- Update technical information of a specific vehicle
- Replace vehicle images
- Correct erroneous data for a particular vehicle
Request example:
{
type: RIGID,
brand: Volvo,
model: FH16,
year: 2022
}
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
Vehicle updated successfully
Response Headers
Invalid request
Response Headers
Unauthorized
Response Headers
Authorization or validation error. Occurs when the user lacks permissions or the data is invalid.
Response Headers
Vehicle not found
Response Headers
Conflict - The registration cannot be modified.