Update a Carpool Driver
PATCH/carpool/drivers/:driver_id
Updates an enrolled driver. Send at least one field. A field left out keeps its stored value.
license_type_ids and special_licenses replace the driver's stored lists
as a whole, so send the complete list the driver should hold.
The three booking flags cannot all become false. That would remove the
driver, which is what DELETE is for and where the bookings guard lives.
The answer is 422.
Each booking flag belongs to an account setting in the Carpool booking settings.
| Flag | Carpool setting |
|---|---|
can_book_carpool | Drivers can book carpool |
allow_system_auto_booking | Drivers can auto booking |
allow_specific_vehicle_booking | Drivers can book specific vehicles |
A booking flag only takes effect while its setting is switched on for the
account. Setting a flag to true therefore switches that setting on for
the whole account if it was off, the same as in FleetWeb. Setting a flag to
false leaves the account's setting as it is. These three settings are not
listed or changed by GET /carpool/rules and
PATCH /carpool/rules/{booking_rule_id}.
A driver that is deactivated in the fleet answers 404 and nothing is
written, because GET /carpool/drivers does not list it. DELETE still
accepts it, so its Carpool access can be removed.
This operation is available to the main account only.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 500
The updated driver.
Unauthorized access. Authentication is required.
The operation requires main account credentials. Valid subusers receive this response.
The requested resource was not found.
Request field validation or Carpool business validation failed.
Internal server error.