route
Path Requiredstring
Canonical runtime route value such as SR-18. Unknown or unsupported canonical route values return 404 ROUTE_NOT_FOUND.
Developers
Route summary
Overview
/v1/routes/:route/summary
Route summary is the route-specific drilldown surface. Use it after destination discovery or when the caller already knows which route they want to inspect.
Path and query parameters are documented together so the request surface stays easy to scan.
route
Path Requiredstring
Canonical runtime route value such as SR-18. Unknown or unsupported canonical route values return 404 ROUTE_NOT_FOUND.
jurisdiction
Query Optionalstring
Optional for the active Big Bear MVP. If omitted, the effective jurisdiction defaults to US-CA. If provided, it must canonicalize to US-CA.
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
| route | Path | Yes | string | Canonical runtime route value such as SR-18. Unknown or unsupported canonical route values return 404 ROUTE_NOT_FOUND. |
| jurisdiction | Query | No | string | Optional for the active Big Bear MVP. If omitted, the effective jurisdiction defaults to US-CA. If provided, it must canonicalize to US-CA. |
Use the same endpoint across all three snippets. The tabs switch only the client syntax.
cURL
curl -sS "https://api-staging.mountainswitch.co/v1/routes/SR-18/summary" \
-H "Accept: application/json" TypeScript
const response = await fetch(
"https://api-staging.mountainswitch.co/v1/routes/SR-18/summary",
{
headers: {
Accept: "application/json",
},
},
);
const payload = await response.json(); Python
import requests
response = requests.get(
"https://api-staging.mountainswitch.co/v1/routes/SR-18/summary",
headers={"Accept": "application/json"},
)
payload = response.json()
The example response shows the documented JSON envelope with endpoint data in
data and request metadata in
_meta.
{
"data": {
"route": "SR-18",
"jurisdictions_covered": ["US-CA"],
"worst_status": "restricted",
"worst_chain_control_severity": 3,
"worst_chain_control_code": "chains_awd_exempt",
"worst_chain_control_raw": "R-2",
"active_restrictions": 14,
"total_segments": 32,
"summary": "Chain or traction restrictions are reported on SR-18. Chains or traction devices required. AWD with snow tires exempt.",
"sections": [
{
"alert_type": "chain_control",
"source": "ca-chain-controls",
"segments": [
{
"id": "ca-chain-controls:2012",
"route": "SR-18",
"direction": "N",
"segment_description": "Lower Waterman Cyn to Vista Point",
"overall_status": "restricted",
"chain_control_severity": 3,
"chain_control_code": "chains_awd_exempt",
"chain_control_raw": "R-2",
"status_description": "Chains or traction devices required. AWD with snow tires exempt.",
"start_lat": 34.2101,
"start_lon": -117.2847,
"end_lat": null,
"end_lon": null,
"valid_until": null
}
]
},
{
"alert_type": "lane_closure",
"source": "ca-lane-closures",
"segments": [
{
"id": "ca-lane-closures:LC12345-LOG001-20260319-SR-18",
"route": "SR-18",
"direction": "E",
"segment_description": "Rim of the World Dr to SR-138",
"overall_status": "restricted",
"chain_control_severity": 0,
"chain_control_code": "none",
"chain_control_raw": null,
"status_description": "Curb/Gutter/Sidewalk Work on SR-18 East. 1 of 2 lanes closed. Estimated delay: 15 min.",
"start_lat": 34.243,
"start_lon": -117.189,
"end_lat": 34.255,
"end_lon": -117.175,
"valid_until": "2026-03-19T22:01:00Z"
}
]
}
]
},
"_meta": {
"sources": [
{
"source": "ca-chain-controls",
"freshness": "healthy",
"live_eligible": true,
"covers_query": true,
"source_updated_at": "2026-03-19T12:43:00Z",
"fetched_at": "2026-03-19T12:45:00Z"
},
{
"source": "ca-lane-closures",
"freshness": "healthy",
"live_eligible": true,
"covers_query": true,
"source_updated_at": "2026-03-19T12:40:00Z",
"fetched_at": "2026-03-19T12:45:00Z"
}
],
"query_coverage": "full",
"request_id": "req_route_summary_docs",
"response_generated_at": "2026-03-19T12:47:30Z",
"pagination": null
}
} This reference stays flat on purpose so the documented fields remain easy to scan.
These rows keep the repo-wide rate-limit and infrastructure behavior visible without inventing endpoint-specific transport semantics.
| Status | Code | When it happens |
|---|---|---|
| 400 | INVALID_PARAMETER | The request contains an unsupported jurisdiction value, a malformed query parameter, or a repeated query parameter. |
| 400 | INVALID_JURISDICTION | The provided jurisdiction value does not canonicalize to a known jurisdiction code. |
| 404 | ROUTE_NOT_FOUND | The canonical route value is unknown or unsupported for the resolved jurisdiction. |
| 429 | RATE_LIMIT_EXCEEDED | The caller exceeded the shared API rate limit. |
| 503 | SERVICE_UNAVAILABLE | D1 or another critical dependency is unavailable. |
These notes capture the contract edges that matter most for consumers of the endpoint.
For the active Big Bear MVP, GET /v1/routes/:route/summary uses US-CA when jurisdiction is omitted. If a caller provides a different known jurisdiction, the request fails with INVALID_PARAMETER.
The structured route summary can still be returned with partial coverage. Read _meta.query_coverage and _meta.sources before treating the summary text as a fully verified live answer.
This endpoint follows the Big Bear full-only cache posture. The API caches responses only when _meta.query_coverage is full. Partial and none responses are no-store.