curl --request GET \
--url https://api.getswitch.io/integrations/statuses \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/integrations/statuses"
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/integrations/statuses', 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/integrations/statuses"
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": [
{
"slug": "available",
"label": "Available",
"icon": "CircleCheck",
"role": "available",
"extra_params": {}
}
],
"next_cursor": "NTA=",
"has_more": true,
"total_count": 8
}List Vehicle Statuses
The vehicle statuses your fleet platform accepts, for every location: use a slug with POST /integrations/statuses/{vehicle_id}/set. role marks the status to set while a vehicle is being moved (repositioning) and once it is back in service (available). Filtering, sorting and pagination (filter, sort, limit, cursor) apply to the whole list; follow next_cursor while has_more is true. The list is cached for up to 60 minutes.
Integrations talk to the fleet platform your company is linked to (for example Wunder, ATOM or an MDS feed) and return its data in one common format, whatever the platform. They need a fleet integration configured for your company; GET /integrations/availability shows which kinds of data and operations your platform supports.
Failure Modes:
- 401: Token is missing or invalid
- 403:
access_deniedwhen your role or API key lacks the permission below - 404:
no_data_binding(kind: fleet) when no fleet integration is configured for your company - 422: Invalid parameters, or your fleet platform does not support this (
Unknown provider: ...) - 502: The fleet platform returned an error (
Upstream provider error: ...)
Required Auth Scopes:
integrations:statuses:read
curl --request GET \
--url https://api.getswitch.io/integrations/statuses \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/integrations/statuses"
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/integrations/statuses', 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/integrations/statuses"
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": [
{
"slug": "available",
"label": "Available",
"icon": "CircleCheck",
"role": "available",
"extra_params": {}
}
],
"next_cursor": "NTA=",
"has_more": true,
"total_count": 8
}Authorizations
Query Parameters
Filter on a field of the returned items, as field:op:value (or field:value for eq); repeat the parameter to combine filters (AND). Operators: eq, neq, contains (case-insensitive, text fields), gt, gte, lt, lte (numbers), in (comma-separated values). Nested fields use dots, e.g. extra_params.zone. A filter with an unknown operator is ignored. Example: battery_level:lt:20.
