Update an existing vehicle
POST/company/vehicles/:id
Endpoint to modify the data of an existing vehicle in the fleet. Allows updating all fields or just some.
Important notes:
- The format must be multipart/form-data to support image updates
- New images will replace the existing ones
- Only the fields that need to be updated should be included
Request example:
{
license_plate: ABC1234,
brand: Volvo,
images: [binary_file1]
}
Request
Responses
- 200
- 400
- 401
- 404
Vehicle successfully updated
Invalid Request. Possible causes:
- Incorrect data format
- License plate already exists in the system
- Invalid vehicle type
- Images do not meet requirements
Unauthorized. The JWT token is invalid, has expired, or lacks administrator permissions.
Vehicle not found. The provided ID does not correspond to any existing vehicle.