Update Fleet Settings
curl --request PATCH \
--url https://api.getswitch.io/operations/fleet-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_station_based": false
}
'import requests
url = "https://api.getswitch.io/operations/fleet-settings"
payload = { "is_station_based": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_station_based: false})
};
fetch('https://api.getswitch.io/operations/fleet-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getswitch.io/operations/fleet-settings"
payload := strings.NewReader("{\n \"is_station_based\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"is_station_based": true
}Fleet Management
Update Fleet Settings
Set whether your company runs a station-based (docked) or a free-floating fleet.
Failure Modes:
- 401: Token is missing or invalid
- 403: Insufficient permissions to change your company settings
- 409: Your company settings changed at the same time; retry
- 422: Invalid request body
Required Auth Scopes:
copilot:optimize
PATCH
/
operations
/
fleet-settings
Update Fleet Settings
curl --request PATCH \
--url https://api.getswitch.io/operations/fleet-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_station_based": false
}
'import requests
url = "https://api.getswitch.io/operations/fleet-settings"
payload = { "is_station_based": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_station_based: false})
};
fetch('https://api.getswitch.io/operations/fleet-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getswitch.io/operations/fleet-settings"
payload := strings.NewReader("{\n \"is_station_based\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"is_station_based": true
}Authorizations
HTTPBearerHTTPBearer
Body
application/json
