curl --request GET \
--url https://api.getswitch.io/copilot/station-based/{provider}/capacity_alerts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/copilot/station-based/{provider}/capacity_alerts"
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/copilot/station-based/{provider}/capacity_alerts', 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/copilot/station-based/{provider}/capacity_alerts"
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))
}{
"all_stations_status": [
{
"available_bikes": 24,
"available_docks": 0,
"available_ebikes": 7,
"capacity": 24,
"capacity_stress": 1,
"ebike_ratio": 0.29,
"geolabel": "milan",
"is_full": true,
"provider": "acme-bikes",
"station_id": 101,
"station_latitude": 45.4642,
"station_longitude": 9.19,
"station_name": "Duomo",
"timestamp": "2026-11-29T08:55:00Z",
"total_vehicles_available": 24
},
{
"available_bikes": 4,
"available_docks": 26,
"available_ebikes": 1,
"capacity": 30,
"capacity_stress": 0.13,
"ebike_ratio": 0.25,
"geolabel": "milan",
"is_full": false,
"provider": "acme-bikes",
"station_id": 245,
"station_latitude": 45.4859,
"station_longitude": 9.2045,
"station_name": "Stazione Centrale",
"timestamp": "2026-11-29T08:56:00Z",
"total_vehicles_available": 4
}
],
"feasibility": "feasible",
"full_capacity_stations": [
{
"available_bikes": 24,
"available_docks": 0,
"available_ebikes": 7,
"capacity": 24,
"capacity_stress": 1,
"ebike_ratio": 0.29,
"geolabel": "milan",
"is_full": true,
"provider": "acme-bikes",
"station_id": 101,
"station_latitude": 45.4642,
"station_longitude": 9.19,
"station_name": "Duomo",
"timestamp": "2026-11-29T08:55:00Z",
"total_vehicles_available": 24
}
],
"high_capacity_stations": [
{
"available_bikes": 19,
"available_docks": 1,
"available_ebikes": 8,
"capacity": 20,
"capacity_stress": 0.95,
"ebike_ratio": 0.42,
"geolabel": "milan",
"is_full": false,
"provider": "acme-bikes",
"station_id": 318,
"station_latitude": 45.4532,
"station_longitude": 9.176,
"station_name": "Darsena",
"timestamp": "2026-11-29T08:54:00Z",
"total_vehicles_available": 19
}
],
"message": "Real-time alerting system for stations at capacity where users cannot return bikes. Data from last 24 hours. Snapshot semantics: one record per station (latest within window)."
}Get Station Capacity Alerts
Retrieve real-time station capacity status and identify stations at or near full capacity where users cannot return vehicles. Returns lists of full-capacity stations, high-capacity stations (>90% full), current status of all stations, and a feasibility assessment.
Each station is reported at its most recent availability record of the last 24 hours.
Failure Modes:
- 401: Token is missing or invalid
- 403: Insufficient permissions
- 404:
no_data_bindingwhen the provider or location is not enabled for your company, or no data for that location and period - 422: Invalid query parameters
- 500: Internal server error
Required Auth Scopes:
copilot:analytics, and read access to live fleet data for your company
curl --request GET \
--url https://api.getswitch.io/copilot/station-based/{provider}/capacity_alerts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getswitch.io/copilot/station-based/{provider}/capacity_alerts"
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/copilot/station-based/{provider}/capacity_alerts', 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/copilot/station-based/{provider}/capacity_alerts"
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))
}{
"all_stations_status": [
{
"available_bikes": 24,
"available_docks": 0,
"available_ebikes": 7,
"capacity": 24,
"capacity_stress": 1,
"ebike_ratio": 0.29,
"geolabel": "milan",
"is_full": true,
"provider": "acme-bikes",
"station_id": 101,
"station_latitude": 45.4642,
"station_longitude": 9.19,
"station_name": "Duomo",
"timestamp": "2026-11-29T08:55:00Z",
"total_vehicles_available": 24
},
{
"available_bikes": 4,
"available_docks": 26,
"available_ebikes": 1,
"capacity": 30,
"capacity_stress": 0.13,
"ebike_ratio": 0.25,
"geolabel": "milan",
"is_full": false,
"provider": "acme-bikes",
"station_id": 245,
"station_latitude": 45.4859,
"station_longitude": 9.2045,
"station_name": "Stazione Centrale",
"timestamp": "2026-11-29T08:56:00Z",
"total_vehicles_available": 4
}
],
"feasibility": "feasible",
"full_capacity_stations": [
{
"available_bikes": 24,
"available_docks": 0,
"available_ebikes": 7,
"capacity": 24,
"capacity_stress": 1,
"ebike_ratio": 0.29,
"geolabel": "milan",
"is_full": true,
"provider": "acme-bikes",
"station_id": 101,
"station_latitude": 45.4642,
"station_longitude": 9.19,
"station_name": "Duomo",
"timestamp": "2026-11-29T08:55:00Z",
"total_vehicles_available": 24
}
],
"high_capacity_stations": [
{
"available_bikes": 19,
"available_docks": 1,
"available_ebikes": 8,
"capacity": 20,
"capacity_stress": 0.95,
"ebike_ratio": 0.42,
"geolabel": "milan",
"is_full": false,
"provider": "acme-bikes",
"station_id": 318,
"station_latitude": 45.4532,
"station_longitude": 9.176,
"station_name": "Darsena",
"timestamp": "2026-11-29T08:54:00Z",
"total_vehicles_available": 19
}
],
"message": "Real-time alerting system for stations at capacity where users cannot return bikes. Data from last 24 hours. Snapshot semantics: one record per station (latest within window)."
}Authorizations
Path Parameters
Identifier of the mobility provider whose data you analyse, e.g. acme-bikes. It must be the provider of a data source enabled for your company's station-based analytics; any other value is refused with 404 no_data_binding (kind: source). Your SWITCH contact tells you the provider identifiers and locations enabled for your company.
Query Parameters
Response
Capacity alert data retrieved. Returns full-capacity stations, high-capacity stations, all station statuses, and a feasibility assessment.
Capacity alerts analysis response with real-time station status.
