Update a driver
The playground uses your live account
Updates a driver from your team. The member must have the "driver" role.
BasicAuthAuthorizationBasic <token>Use the API key as the username and leave the password empty.
driverId*stringThe driver id
^[a-zA-Z0-9---_]{1,50}$The request body for updating a driver.
application/json- body
The request body for updating a driver.
name?|The driver's full name
displayName?|The name displayed for the driver in the UI
depots?array<>|The depot IDs associated with the driver in the format depots/<id>, duplicates will be ignored. If set to null or not provided, the team's Main depot will be set as driver depot.
routeOverrides?|Overrides for the driver route behavior.
The updated driver
application/json- response
The updated driver
id*stringThe driver id, in the format drivers/<id>
^drivers\/[a-zA-Z0-9---_]{1,50}$name*|The name of the driver.
email*|The email of the driver.
phone*|The phone number of the driver.
displayName*|The display name of the driver.
active*booleanWhether the driver membership is active or paused. Paused drivers will not be assigned to any routes.
depots*array<>Depots associated with the driver.
routeOverrides*Settings to override default route settings.
curl -X PATCH 'https://api.spoke.com/public/v1/drivers/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "name": null, "email": null, "phone": null, "displayName": null, "active": true, "depots": [ "string" ], "routeOverrides": { "startTime": { "hour": 0, "minute": 0 }, "endTime": { "hour": 0, "minute": 0 }, "startAddress": { "address": "string", "addressLineOne": "string", "addressLineTwo": "string", "latitude": -90, "longitude": -180, "placeId": "string", "placeTypes": [ "string" ] }, "endAddress": { "address": "string", "addressLineOne": "string", "addressLineTwo": "string", "latitude": -90, "longitude": -180, "placeId": "string", "placeTypes": [ "string" ] }, "maxStops": -9007199254740991, "drivingSpeed": "slower", "deliverySpeed": "slower", "vehicleType": "bike" }}