Skip to content

Zones API

Andrew Maclean edited this page Jun 24, 2024 · 9 revisions

This section describes the actions you can take on Zones with the Sunday Peak API.

Get Top Level Zones

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.

Zones Endpoint

https://api.sundaypeak.com/zones/all?type=<AdventureType>

Content-Type: application/json
HTTP Method: GET

The 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

Get Individual Zone

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.

Get Zone Endpoint

https://api.sundaypeak.com/zones/details?zone_id=<zone_id>

Content-Type: application/json
HTTP Method: GET

Response:

{
  data: {
    zone: Zone
  },
  statusCode: Int,
  timestamp: Int
}

Clone this wiki locally