Update Station
curl --request PUT \
--url https://api.getswitch.io/operations/stations/{station_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_capacity": 24
}
'import requests
url = "https://api.getswitch.io/operations/stations/{station_id}"
payload = { "max_capacity": 24 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({max_capacity: 24})
};
fetch('https://api.getswitch.io/operations/stations/{station_id}', 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/stations/{station_id}"
payload := strings.NewReader("{\n \"max_capacity\": 24\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"address": "Piazza del Duomo, 20122 Milano MI",
"company_name": "Acme Mobility",
"company_slug": "acme-mobility",
"created_at": "2026-09-18T10:05:00Z",
"id": 21,
"latitude": 45.4642,
"longitude": 9.19,
"max_capacity": 20,
"name": "Duomo",
"polygon": [
[
9.1893,
45.4638
],
[
9.1907,
45.4638
],
[
9.1907,
45.4647
],
[
9.1893,
45.4647
],
[
9.1893,
45.4638
]
],
"updated_at": "2026-11-03T08:31:00Z"
}Fleet Management
Update Station
Update a station. Only the fields you send change; send latitude and longitude together to move it, and polygon: null to remove its area.
Failure Modes:
- 401: Token is missing or invalid
- 403: Insufficient permissions, or you cannot manage the station’s company or the new
company_slug - 404: No station with this ID
- 422: Invalid request body
Required Auth Scopes:
stations:manage
PUT
/
operations
/
stations
/
{station_id}
Update Station
curl --request PUT \
--url https://api.getswitch.io/operations/stations/{station_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_capacity": 24
}
'import requests
url = "https://api.getswitch.io/operations/stations/{station_id}"
payload = { "max_capacity": 24 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({max_capacity: 24})
};
fetch('https://api.getswitch.io/operations/stations/{station_id}', 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/stations/{station_id}"
payload := strings.NewReader("{\n \"max_capacity\": 24\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"address": "Piazza del Duomo, 20122 Milano MI",
"company_name": "Acme Mobility",
"company_slug": "acme-mobility",
"created_at": "2026-09-18T10:05:00Z",
"id": 21,
"latitude": 45.4642,
"longitude": 9.19,
"max_capacity": 20,
"name": "Duomo",
"polygon": [
[
9.1893,
45.4638
],
[
9.1907,
45.4638
],
[
9.1907,
45.4647
],
[
9.1893,
45.4647
],
[
9.1893,
45.4638
]
],
"updated_at": "2026-11-03T08:31:00Z"
}Authorizations
HTTPBearerHTTPBearer
Body
application/json
Schema for partially updating a station.
Only provided fields are applied; omitted fields remain unchanged.
Latitude and longitude are only applied when both are sent; send
polygon: null to remove the boundary.
Response
Station updated successfully. Returns the updated station profile including coordinates, capacity, optional polygon boundary, and company ownership.
Public schema for a station resource.
Exposes station details to API consumers, including coordinates, capacity, optional polygon boundary, and company ownership.
