Remove a Vehicle from Carpool
DELETE/carpool/vehicles/:vehicle_id
Removes a vehicle from the Carpool inventory by switching its Carpool enrolment off. The vehicle itself is not touched and stays in the fleet.
If the vehicle has affected bookings (requested or approved bookings over
the next two years) the answer is 409 and nothing is written. With
force=true the vehicle is removed and each affected booking is moved to
another assignable vehicle, or cancelled when none exists, in the same
request. A driver whose booking is cancelled is notified, under the
account's notification rules. force only accepts true and false.
This operation is available to the main account only.
Request
Responses
- 200
- 401
- 403
- 404
- 409
- 422
- 500
The vehicle was removed from Carpool. data carries the vehicle id and what happened to each affected booking, meta carries the message.
Unauthorized access. Authentication is required.
The operation requires main account credentials. Valid subusers receive this response.
The requested resource was not found.
The request affects bookings and force=true was not sent. Nothing was written. Review the bookings, then repeat the request with force=true.
Request field validation or Carpool business validation failed.
Internal server error.