Skip to main content

Enrol a Driver in Carpool

POST 

/carpool/drivers

Enrols a driver that already exists and is active in the fleet. The driver record is not created or changed, only the Carpool link and the department. A driver that is already enrolled returns 409.

The three flags decide what the driver may do. At least one must be true, otherwise nothing would be enrolled and the answer is 422.

Each flag belongs to an account setting in the Carpool booking settings.

FlagCarpool setting
can_book_carpoolDrivers can book carpool
allow_system_auto_bookingDrivers can auto booking
allow_specific_vehicle_bookingDrivers can book specific vehicles

A 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. These three settings are not listed or changed by GET /carpool/rules and PATCH /carpool/rules/{booking_rule_id}, so the API has no way to switch one back off. Do that in FleetWeb if the account had turned one off on purpose.

This operation is available to the main account only.

Request​

Responses​

The enrolled driver.