Edit existing vehicle
PUT/api/vehicle/:id
Update the data of an existing vehicle.
Differences from creation:
- All fields are optional (only sent fields are updated)
- It is not required to send all fields again
- Previous values are retained for fields not included
Validations:
- The vehicle must exist and belong to the company
- Types (vehicle_type, shipping_type, cargo_type) are validated if sent
- The license plate (plate) is validated if sent
Request example:
{
vehicle_type: van,
shipping_type: fresh,
fresh_cargo_temp: 4,
image: (binary)
}
Request
Responses
- 200
- 400
- 401
Individual vehicle
Request error
Unauthorized