-
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
Response:
{
data: {
zones: {
<AdventureType>: GeoJSON-Object
}
},
status_code: Int
timestamp: Int
}Description: `GeoJSON-Object is a mapping structure
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=<zone_id>
Content-Type: application/json
HTTP Method: GETResponse:
{
data: {
zone: Zone
},
statusCode: Int,
timestamp: Int
}{
zone_name: String,
id: Int,
adventure_type: AdventureType,
bio: String,
approach: String,
nearest_city: String,
date_created: Int,
creator_id: Int,
creator_name: String,
creator_email: String,
creator_picture_url: String,
coordinates: CoordinatesObject,
public: Boolean,
adventures: SubAdventure[],
zones: SubZone[],
breadcrumb: BreadcrumbObject[],
images: String[]
}| Key | Type | Description |
|---|---|---|
adventure_type |
AdventureType | Zone adventure type |
approach |
String | A description of the approach path to the given zone |
date_created |
Int | A js timestamp denoting when the zone was created |
creator_id |
Int | Maps to a user id that created the adventure |
creator_name |
String | Formatted as first_name last_name of the user that created this adventure |
creator_email |
String | The email from the user account that created the adventure |
creator_picture_url |
String | A url string of the user that created this adventure |
coordinates |
CoordinatesObject | |
public |
Boolean | A boolean describing if the zone is public or private |
adventures |
AdventureObject[] | Describing each sub adventure |
zones |
ZoneObject[] | describing each sub zone |
breadcrumb |
BreadcrumbObject[] | |
images |
String[] | An array of image urls |
{
adventure_type: AdventureType,
adventure_name: String,
adventure_id: Int,
public: Boolean,
path: GeoJSONCoordinateObject[],
coordinates: CoordinatesObject
}| Key | Type | Description |
|---|---|---|
adventure_type |
AdventureType | Zone adventure type |
adventure_id |
Int | Correlates to the id of the adventure |
public |
Boolean | A boolean describing if the adventure is public or private |
path |
GeoJSONCoordinate[] | |
coordinates |
Coordinates |
{
adventure_type: AdventureType,
zone_name: String,
zone_id: Int,
public: Boolean,
coordinates: CoordinatesObject
}| Key | Type | Description |
|---|---|---|
adventure_type |
AdventureType | Zone adventure type |
zone_id |
Int | Correlates to the id of the zone |
public |
Boolean | A boolean describing if the zone is public or private |
coordinates |
Coordinates |
{
adventure_type: AdventureType,
name: String,
id: Int,
category_type: CategoryType
}| Key | Type | Description |
|---|---|---|
adventure_type |
AdventureType | Zone adventure type |
id |
Int | Correlates to the id of the zone or adventure |
name |
Boolean | The name of the zone or adventure |
category_type |
CategoryType | Describes an adventure or zone |
enum('adventure' | 'zone')Description:
Differentiating between an adventure and a zone