Skip to main content
GET
/
user
/
routes
/
{route_id}
/
{
  "id": 123,
  "date_started": "<string>",
  "local_timezone": "<string>",
  "polyline": "<string>",
  "destination_name": "<string>",
  "destination_address": "<string>",
  "distance_traveled": 123,
  "duration_traveled": 123,
  "completed": true,
  "event": {
    "id": 123,
    "name": "<string>",
    "alias": "<string>",
    "emoji": "<string>",
    "start_time": "<string>",
    "end_time": "<string>",
    "created_by": "<string>",
    "destination": {},
    "categories": [
      {}
    ]
  },
  "weather_conditions": [
    {}
  ],
  "temperature": 123,
  "wind_speed": 123,
  "weather_fetched_at": "<string>",
  "weather_display": "<string>",
  "images": [
    {}
  ],
  "welcome_message": "<string>"
}

Overview

Get complete details about a specific route by ID. The route must belong to the authenticated user.

Authentication

Required: This endpoint requires Auth0 authentication. Include a valid JWT token in the Authorization header. Only routes belonging to the authenticated user can be accessed.

Path Parameters

route_id
number
required
The unique identifier of the route

Response

Returns a single route object with complete details:
id
number
Unique route identifier
date_started
string
ISO 8601 datetime when the ride started
local_timezone
string
IANA timezone identifier where the ride took place (e.g., “America/Los_Angeles”)
polyline
string
Encoded polyline representation of the route path (Google Encoded Polyline, precision 5)
destination_name
string
Name of the destination (if applicable)
destination_address
string
Address of the destination (if applicable)
distance_traveled
number
Distance traveled in meters
duration_traveled
number
Duration of the ride in seconds
completed
boolean
Whether the ride was completed
event
object
Complete event information if the route was associated with an event
weather_conditions
array
Array of weather condition strings (e.g., [“Clear”, “Cold”])
temperature
number
Temperature in Fahrenheit at the time/location of the ride
wind_speed
number
Wind speed in mph
weather_fetched_at
string
ISO 8601 datetime when weather data was retrieved
weather_display
string
Human-readable weather description (e.g., “Sunny, Windy (69°F)”)
images
array
Array of route images with image_url and created_at
welcome_message
string
Optional welcome or completion message for the route

Request Example

cURL
curl "https://api.cyclemate.com/user/routes/1234/" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"
JavaScript
const routeId = 1234;
const response = await fetch(
  `https://api.cyclemate.com/user/routes/${routeId}/`,
  {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${yourJwtToken}`,
    },
  }
);

const route = await response.json();
console.log(`Route distance: ${route.distance_traveled}m`);
Python
import requests

route_id = 1234
url = f"https://api.cyclemate.com/user/routes/{route_id}/"
headers = {
    "Content-Type": "application/json",
    "Authorization": f"Bearer {your_jwt_token}"
}

response = requests.get(url, headers=headers)
route = response.json()

Response Example

{
  "id": 1234,
  "date_started": "2025-11-13T14:30:00Z",
  "local_timezone": "America/New_York",
  "polyline": "encoded_polyline_string_here",
  "destination_name": "Central Park",
  "destination_address": "Central Park, New York, NY",
  "distance_traveled": 5280.5,
  "duration_traveled": 1267,
  "completed": true,
  "event": {
    "id": 123,
    "name": "Central Park Morning Ride",
    "alias": "central-park-morning-ride",
    "description": "Casual group ride through Central Park",
    "emoji": "🚴",
    "image_url": "https://storage.googleapis.com/events/123.jpg",
    "start_time": "2025-11-13T08:00:00Z",
    "end_time": "2025-11-13T10:00:00Z",
    "created_by": "google-oauth2|115315991711634062214",
    "created_at": "2025-11-01T10:00:00Z",
    "updated_at": "2025-11-01T10:00:00Z",
    "is_active": true,
    "is_happening_now": false,
    "is_future": false,
    "is_current_or_future": false,
    "is_leisure_route": false,
    "visits_total": 42,
    "destination": {
      "id": 45,
      "name": "Central Park",
      "latitude": 40.785091,
      "longitude": -73.968285,
      "area_name": "Manhattan",
      "city": "New York City",
      "categories": [
        {
          "id": 1,
          "name": "Park",
          "emoji": "🌳"
        }
      ]
    },
    "route": {
      "distance": 6437,
      "duration": 1543,
      "polyline": "event_polyline_string_here"
    },
    "categories": [
      {
        "id": 2,
        "name": "Group Ride",
        "emoji": "👥"
      }
    ],
    "images": [
      {
        "image_url": "https://storage.googleapis.com/event-photos/1.jpg",
        "created_at": "2025-11-01T10:00:00Z"
      }
    ]
  },
  "weather_conditions": ["Clear", "Mild"],
  "temperature": 68.5,
  "wind_speed": 5.2,
  "weather_fetched_at": "2025-11-13T14:30:00Z",
  "weather_display": "Clear, Mild (69°F)",
  "images": [
    {
      "image_url": "https://storage.googleapis.com/route-photos/1234-1.jpg",
      "created_at": "2025-11-13T14:45:00Z"
    },
    {
      "image_url": "https://storage.googleapis.com/route-photos/1234-2.jpg",
      "created_at": "2025-11-13T15:00:00Z"
    }
  ],
  "welcome_message": "Great ride! You completed the Central Park Morning Ride event."
}

Error Responses

Route Not Found (404)

When the route doesn’t exist or doesn’t belong to the authenticated user:
{
  "error": "Route not found"
}

User Not Found (404)

When the authenticated user doesn’t exist in the database:
{
  "error": "User not found"
}

Unauthorized (401)

{
  "error": "Authentication credentials were not provided."
}

Notes

  • Only routes belonging to the authenticated user can be accessed
  • Attempting to access another user’s route will return a 404 error
  • The event field includes complete event details with destination, categories, and images
  • Weather data is captured at the time the route is created
  • Images show photos uploaded during or after the ride
  • The completed field indicates whether the user finished the ride
  • Distance is in meters, duration is in seconds
  • Temperature is in Fahrenheit, wind speed is in mph
  • The polyline can be decoded and displayed on a map for route replay

Use Cases

  • Route Replay: Visualize the exact path taken on a map
  • Activity Details: Show comprehensive ride statistics and conditions
  • Sharing: Generate shareable ride summaries
  • Analytics: Analyze individual ride performance
  • Event Verification: Confirm participation in specific events
  • Photo Gallery: Display photos from the ride