destination
Path Requiredstring
Canonical destination slug from GET /v1/destinations. For the active Big Bear MVP flow, use a live slug such as big-bear. Unknown slugs return 404 DESTINATION_NOT_FOUND.
Developers
Destination access
Overview
/v1/destinations/:destination/access
Destination access is the primary access-answer endpoint for agent flows. Use it after destination discovery when the caller needs a destination-level verdict, path coverage, and the reason behind the current answer.
Path and query parameters are documented together so the request surface stays easy to scan.
destination
Path Requiredstring
Canonical destination slug from GET /v1/destinations. For the active Big Bear MVP flow, use a live slug such as big-bear. Unknown slugs return 404 DESTINATION_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 or the request returns INVALID_PARAMETER or INVALID_JURISDICTION.
| Name | Location | Required | Type | Description |
|---|---|---|---|---|
| destination | Path | Yes | string | Canonical destination slug from GET /v1/destinations. For the active Big Bear MVP flow, use a live slug such as big-bear. Unknown slugs return 404 DESTINATION_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 or the request returns INVALID_PARAMETER or INVALID_JURISDICTION. |
Use the same endpoint across all three snippets. The tabs switch only the client syntax.
cURL
curl -sS "https://api-staging.mountainswitch.co/v1/destinations/big-bear/access?jurisdiction=US-CA" \
-H "Accept: application/json" TypeScript
const response = await fetch(
"https://api-staging.mountainswitch.co/v1/destinations/big-bear/access?jurisdiction=US-CA",
{
headers: {
Accept: "application/json",
},
},
);
const payload = await response.json(); Python
import requests
response = requests.get(
"https://api-staging.mountainswitch.co/v1/destinations/big-bear/access",
params={"jurisdiction": "US-CA"},
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": {
"destination": "big-bear",
"jurisdiction": "US-CA",
"coverage": "full",
"access_state": "restricted",
"reason_excerpt": "Chains or traction devices are required on SR-330.",
"paths": [
{
"id": "ca:big-bear:west_via_330_18",
"label": "West approach via SR-330 and SR-18",
"role": "primary",
"coverage": "full",
"access_state": "restricted",
"reason_excerpt": "Chains or traction devices are required on SR-330.",
"segments": [
{
"id": "ca:big-bear:sr330_highland_to_running_springs",
"route": "SR-330",
"route_slug": "sr-330",
"label": "Highland to Running Springs",
"role": "primary",
"start_boundary_label": "Highland",
"end_boundary_label": "Running Springs",
"coverage": "full",
"access_state": "restricted",
"reason_excerpt": "Chains or traction devices are required from Highland to Running Springs.",
"segment_description": null,
"type_of_closure": null,
"type_of_work": null,
"lanes_closed": null,
"total_existing_lanes": null,
"estimated_delay_minutes": null,
"valid_until": "2026-04-15T18:00:00Z",
"chain_control_severity": 3,
"chain_control_raw": "R-2",
"restriction_items": [
{
"reason_excerpt": "Chains or traction devices are required from Highland to Running Springs.",
"segment_description": null,
"type_of_closure": null,
"type_of_work": null,
"lanes_closed": null,
"total_existing_lanes": null,
"estimated_delay_minutes": null,
"valid_until": "2026-04-15T18:00:00Z",
"chain_control_severity": 3,
"chain_control_raw": "R-2"
}
]
},
{
"id": "ca:big-bear:sr18_running_springs_to_big_bear",
"route": "SR-18",
"route_slug": "sr-18",
"label": "Running Springs to Big Bear Valley",
"role": "primary",
"start_boundary_label": "Running Springs",
"end_boundary_label": "Big Bear Valley",
"coverage": "full",
"access_state": "open",
"reason_excerpt": null,
"segment_description": null,
"type_of_closure": null,
"type_of_work": null,
"lanes_closed": null,
"total_existing_lanes": null,
"estimated_delay_minutes": null,
"valid_until": null,
"chain_control_severity": null,
"chain_control_raw": null,
"restriction_items": []
}
]
},
{
"id": "ca:big-bear:north_via_38",
"label": "North approach via SR-38",
"role": "alternate",
"coverage": "full",
"access_state": "restricted",
"reason_excerpt": "One lane is closed on SR-38 approaching Big Bear Lake.",
"segments": [
{
"id": "ca:big-bear:sr38_redlands_to_big_bear_lake",
"route": "SR-38",
"route_slug": "sr-38",
"label": "Redlands to Big Bear Lake",
"role": "alternate",
"start_boundary_label": "Redlands",
"end_boundary_label": "Big Bear Lake",
"coverage": "full",
"access_state": "restricted",
"reason_excerpt": "One lane is closed on SR-38 approaching Big Bear Lake.",
"segment_description": "SR-38 approaching Big Bear Lake",
"type_of_closure": "Lane closure",
"type_of_work": "Emergency work",
"lanes_closed": 1,
"total_existing_lanes": 2,
"estimated_delay_minutes": 20,
"valid_until": "2026-04-15T20:00:00Z",
"chain_control_severity": null,
"chain_control_raw": null,
"restriction_items": [
{
"reason_excerpt": "One lane is closed on SR-38 approaching Big Bear Lake.",
"segment_description": "SR-38 approaching Big Bear Lake",
"type_of_closure": "Lane closure",
"type_of_work": "Emergency work",
"lanes_closed": 1,
"total_existing_lanes": 2,
"estimated_delay_minutes": 20,
"valid_until": "2026-04-15T20:00:00Z",
"chain_control_severity": null,
"chain_control_raw": null
}
]
}
]
}
]
},
"_meta": {
"sources": [
{
"source": "ca-chain-controls",
"freshness": "healthy",
"live_eligible": true,
"covers_query": true,
"source_updated_at": "2026-04-15T16:50:00Z",
"fetched_at": "2026-04-15T16:55:00Z"
},
{
"source": "ca-lane-closures",
"freshness": "healthy",
"live_eligible": true,
"covers_query": true,
"source_updated_at": "2026-04-15T16:45:00Z",
"fetched_at": "2026-04-15T16:55:00Z"
}
],
"query_coverage": "full",
"request_id": "req_destination_access_docs",
"response_generated_at": "2026-04-15T17:00:00Z",
"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 a repeated or unrecognized query parameter, or jurisdiction resolves to a known code other than US-CA. |
| 400 | INVALID_JURISDICTION | The provided jurisdiction value does not canonicalize to a known jurisdiction code. |
| 404 | DESTINATION_NOT_FOUND | The destination slug is unknown or unsupported for the requested jurisdiction. |
| 429 | RATE_LIMIT_EXCEEDED | The caller exceeded the shared API rate limit. |
| 503 | SERVICE_UNAVAILABLE | D1 or another critical dependency is unavailable. Source coverage gaps remain HTTP 200 with query_coverage instead of switching to 503. |
These notes capture the contract edges that matter most for consumers of the endpoint.
Start with GET /v1/destinations when the caller needs to discover the live slug. Once the slug is known, use destination access before route summary or raw conditions for the destination-level reachability answer.
Check _meta.query_coverage for endpoint-wide source health and the per-object coverage values for destination, path, and segment rows. When coverage is partial or none, access_state can be null and clients must not synthesize open.
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 and should be treated as uncached live reads.