List Routes in Session
curl --request GET \
--url https://stage-api.getswitch.io/operations/sessions/{slug}/routes \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.getswitch.io/operations/sessions/{slug}/routes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://stage-api.getswitch.io/operations/sessions/{slug}/routes', 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://stage-api.getswitch.io/operations/sessions/{slug}/routes"
req, _ := http.NewRequest("GET", 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))
}{
"items": [
{
"id": 412,
"session_slug": "3f6c2a9e-8d41-4b7a-9c2e-5a1f0e7d9b13",
"route_identifier": "R1",
"reroute_enabled": true,
"start_at": "2026-11-30T08:00:00Z",
"end_at": "2026-11-30T09:40:00Z",
"total_distance": 14.2,
"status": "active",
"total_operations": 2,
"completed_operations": 1,
"progress": 0.5,
"drivers": [
{
"id": 57,
"full_name": "Marco Bianchi",
"email": "marco.bianchi@acme-mobility.com"
}
]
}
],
"total": 1,
"page": 1,
"size": 10,
"pages": 1
}Routing Sessions
List Routes in Session
List the routes of a routing session, paginated with page and size, with their status, progress and drivers. Set include_children_companies to read a session of one of your child companies.
Failure Modes:
- 401: Token is missing or invalid
- 403: Insufficient permissions, or the session belongs to a company you cannot access
- 404: No session with this slug
- 422: Invalid page parameters
Required Auth Scopes:
routing-sessions:read
GET
/
operations
/
sessions
/
{slug}
/
routes
List Routes in Session
curl --request GET \
--url https://stage-api.getswitch.io/operations/sessions/{slug}/routes \
--header 'Authorization: Bearer <token>'import requests
url = "https://stage-api.getswitch.io/operations/sessions/{slug}/routes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://stage-api.getswitch.io/operations/sessions/{slug}/routes', 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://stage-api.getswitch.io/operations/sessions/{slug}/routes"
req, _ := http.NewRequest("GET", 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))
}{
"items": [
{
"id": 412,
"session_slug": "3f6c2a9e-8d41-4b7a-9c2e-5a1f0e7d9b13",
"route_identifier": "R1",
"reroute_enabled": true,
"start_at": "2026-11-30T08:00:00Z",
"end_at": "2026-11-30T09:40:00Z",
"total_distance": 14.2,
"status": "active",
"total_operations": 2,
"completed_operations": 1,
"progress": 0.5,
"drivers": [
{
"id": 57,
"full_name": "Marco Bianchi",
"email": "marco.bianchi@acme-mobility.com"
}
]
}
],
"total": 1,
"page": 1,
"size": 10,
"pages": 1
}Authorizations
HTTPBearerHTTPBearer
Query Parameters
Response
Routes retrieved. Returns a paginated list with computed status, progress, driver names, and operation counts.
