Skip to main content
PUT
Update Driver

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

driver_id
integer
required

ID of the driver profile (id, not user_id).

Body

application/json

Schema for partially updating a driver.

Only provided fields are applied; omitted fields remain unchanged. User-level fields (email, name) cannot be updated here.

phone
string | null

Updated phone.

Example:

"+39 02 1234 5678"

license_number
string | null

Updated license.

Example:

"MI1234567X"

availability
Availability · object | null

New working hours; replaces the whole object.

Example:
is_active
boolean | null

Activate or deactivate the driver.

Example:

true

Response

Driver updated successfully. Returns the updated driver profile including user details, availability, license info, and active status.

Public schema for a driver resource.

Exposes driver details to API consumers, including user details, availability, license info, and active status.

id
integer
required

Driver ID.

Example:

1

user_id
integer
required

ID of the driver's user account; use it to assign the driver to routes.

Example:

10

is_active
boolean
required

Whether the driver is active.

Example:

true

full_name
string
required

Driver's full name, from their user account.

Example:

"Marco Bianchi"

email
string
required

Driver's email, from their user account.

Example:

"marco.bianchi@acme-mobility.com"

company_slug
string
required

Company of the driver's user account.

Example:

"acme-mobility"

created_at
string<date-time>
required

Datetime when the record was created.

phone
string | null

Phone number.

Example:

"+39 02 1234 5678"

license_number
string | null

License number.

Example:

"MI1234567X"

availability
Availability · object

Working hours per weekday: keys monday to sunday, each {"start": "HH:MM", "end": "HH:MM"}; a missing day means not available.

Example:
updated_at
string<date-time> | null

Datetime when the record was last updated, if ever.