-
Notifications
You must be signed in to change notification settings - Fork 0
Zones API
This section describes the actions you can take on Zones with the Sunday Peak API.
Top Level Zones are any zones that do not have a parent zone. This API is meant to fetch all the zones that will display on the map when no other zones are selected. The response will be a GeoJSON object with a list of zones as features that fall into this category.
This API doesn't require an auth token because it is meant to be able to be used without logging in to either the website or the app. All data regarding any users is restricted from this call.
https://api.sundaypeak.com/zones/all?type=<AdventureType>
Content-Type: application/json
HTTP Method: GETThe AdventureType variable is one of enum AdventureType
{
data: {
zones: {
<AdventureType>: GeoJSON-Object
}
},
status_code: Int
timestamp: Int
}| Key | Type | Description |
|---|---|---|
| AdventureType | GeoJSON-Object | A mapping structure |
This API gets zones ordered by distance from a specified lat and lng. In the root adventure view, the closest zones to the current of the screen will be populated with this call. The response will be a list of abridged zones that fall into this category.
This API doesn't require an auth token because it is meant to be able to be used without logging in to either the website or the app. All data regarding any users is restricted from this call.
https://api.sundaypeak.com/zones/distance?adventure_type=ski&coordinates_lat=<lat>&coordinates_lng=<lng>
Content-Type: application/json
HTTP Method: GETThe lat and lng variables is are both floating point numbers.
{
data: {
zones: ShortZone[]
},
status_code: Int
timestamp: Int
}| Key | Type | Description |
|---|---|---|
| zones | ShortZone[] | An abridged version of the zone information when many zones are provided |
An individual zone can be fetched with an id parameter. This API populates any data about a specific zone. The response will be structured as below, showing the pertinent parameters about a zone.
This API doesn't require an auth token because it is meant to be able to be used without logging in to either the website or the app. All data regarding any users is restricted from this call.
https://api.sundaypeak.com/zones/details?zone_id=<ZoneId>
Content-Type: application/json
HTTP Method: GETZoneId is the id of the zone requested
{
data: {
zone: Zone
},
statusCode: Int,
timestamp: Int
}| Key | Type | Description |
|---|---|---|
zone |
Zone |