Skip to main content
POST
Assign Drivers to Route

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer <key>. Create one in the SWITCH Copilot under Settings → API keys (needs the API keys permission in your company), or with POST /auth/api-keys. The key is shown once, at creation.

Path Parameters

route_id
integer
required

Route ID, from the session detail or the route list.

Body

application/json

Request body to assign one or more drivers to a route.

driver_ids
integer[]
required

User IDs of the drivers to assign (user_id of a driver).

Minimum array length: 1

Response

Drivers assigned. Returns the assignment records.

id
integer
required

ID of the assignment.

route_id
integer
required

Route ID.

driver_id
integer
required

User ID of the driver.

created_at
string<date-time>
required

When the driver was assigned.