Remove Driver from Route
curl --request DELETE \
--url https://api.getswitch.io/operations/routes/{route_id}/drivers/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/operations/routes/{route_id}/drivers/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getswitch.io/operations/routes/{route_id}/drivers/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getswitch.io/operations/routes/{route_id}/drivers/{user_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Routing Sessions
Remove Driver from Route
Remove a driver from a route. The driver no longer sees the route in assigned_to_me.
Failure Modes:
- 401: Token is missing or invalid
- 403: Insufficient permissions, or you cannot manage the route’s company
- 404: No route with this ID, or the driver is not assigned to it
Required Auth Scopes:
routing-operations:manage
DELETE
/
operations
/
routes
/
{route_id}
/
drivers
/
{user_id}
Remove Driver from Route
curl --request DELETE \
--url https://api.getswitch.io/operations/routes/{route_id}/drivers/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/operations/routes/{route_id}/drivers/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getswitch.io/operations/routes/{route_id}/drivers/{user_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getswitch.io/operations/routes/{route_id}/drivers/{user_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
HTTPBearerHTTPBearer
Path Parameters
Response
Driver removed. No content returned.
