Get Depot by ID
curl --request GET \
--url https://api.getswitch.io/operations/depots/{depot_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/operations/depots/{depot_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getswitch.io/operations/depots/{depot_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/depots/{depot_id}"
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))
}{
"address": "Via Rombon 11, 20134 Milano MI",
"company_slug": "acme-mobility",
"created_at": "2026-09-18T10:02:00Z",
"id": 7,
"latitude": 45.4887,
"longitude": 9.2415,
"name": "Lambrate Depot",
"updated_at": "2026-11-03T08:30:00Z"
}Fleet Management
Get Depot by ID
Get one depot by ID.
Failure Modes:
- 401: Token is missing or invalid
- 403: Insufficient permissions, or the depot belongs to a company you cannot access
- 404: No depot with this ID
Required Auth Scopes:
depots:read
GET
/
operations
/
depots
/
{depot_id}
Get Depot by ID
curl --request GET \
--url https://api.getswitch.io/operations/depots/{depot_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/operations/depots/{depot_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getswitch.io/operations/depots/{depot_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/depots/{depot_id}"
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))
}{
"address": "Via Rombon 11, 20134 Milano MI",
"company_slug": "acme-mobility",
"created_at": "2026-09-18T10:02:00Z",
"id": 7,
"latitude": 45.4887,
"longitude": 9.2415,
"name": "Lambrate Depot",
"updated_at": "2026-11-03T08:30:00Z"
}Authorizations
HTTPBearerHTTPBearer
Response
Depot retrieved successfully. Returns the complete depot profile including coordinates, address, and company ownership.
Public schema for a depot resource.
Exposes depot details to API consumers, including coordinates, address, and company ownership.
