Trails API Specification
URL STRUCTURE
https://trailhub.org/api/trails/{Trail System ID}
Array RESPONSE
Below are the properties that come out of each array item (each representing a trail) from a GET request.
activities
Type: Array of objects
Description: An array of activity objects associated with this trail.
Activity object properties:
label - String label for the activity
value - Machine-friendly value representing this activity
status - String representing the status of this trail activity. Options include ‘Open’, ‘Caution’, and ‘Closed’
iconClass - String representing a CSS class for this activity.
createdOn
Type: Object
Description: An object of ‘_seconds’ and ‘_nanoseconds’ representing the time this trail was created.
description
Type: String
Description: The description of this trail.
difficulty
Type: String
Description: Represents the difficulty of this trail. Options include ‘circle’, ‘square’, ‘diamond’, ‘doubleDiamond’, ‘terrainPark’, and ‘notRated’.
distance
Type: Number
Description: The length of this trail in kilometers.
elevations
Type: Array
Description: An array of 50 numbers representing evenly distributed elevations along this trail measured in meters.
geoJson
Type: String
Description: This is a stringified GeoJSON object representing the GIS data of this trail.
geolocation
Type: Object
Description: An object of ‘_latitude’ and ‘_longitude’ representing the geolocation of this trail.
id
Type: String
Description: The ID of this trail.
name
Type: String
Description: The name of this trail.
order
Type: Number
Description: Numbers that can be used to order trails where lower numbers come first.
status
Type: String
Description: Represents the status of this trail system. Options include ‘Open’, ‘Caution’, and ‘Closed’.
trailSystemId
Type: String
Description: String representing the trail system ID of the trail system that this trail belongs to.
updatedOn
Type: Object
Description: An object of ‘_seconds’ and ‘_nanoseconds’ representing the time this trail was last updated.
updates
Type: Object
Description: An object of ‘snowReport’, ‘notice’, and ‘surfaceConditions’ arrays that represent updates added to this trail. For example, the latest notice would be found in the response under updates.notice[0]
*Detailed updates specification to come here. Please contact us with questions related to updates data or simply explore the data yourself.