Skip to main content
GET
/
events
/
{id_or_alias}
/
{
  "id": 123,
  "name": "<string>",
  "alias": "<string>",
  "description": "<string>",
  "emoji": "<string>",
  "image_url": "<string>",
  "start_time": "<string>",
  "end_time": "<string>",
  "created_by": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "is_active": true,
  "is_happening_now": true,
  "is_future": true,
  "is_current_or_future": true,
  "is_leisure_route": true,
  "visits_total": 123,
  "city": "<string>",
  "destination": {
    "id": 123,
    "name": "<string>",
    "latitude": 123,
    "longitude": 123,
    "area_name": "<string>",
    "city": "<string>",
    "categories": [
      {}
    ]
  },
  "route": {
    "distance": 123,
    "duration": 123,
    "polyline": "<string>"
  },
  "categories": [
    {}
  ],
  "images": [
    {}
  ],
  "has_discount": true,
  "discount": {
    "id": 123,
    "name": "<string>",
    "terms": "<string>",
    "emoji": "<string>"
  }
}

Overview

Get complete details about a cycling event. This endpoint supports lookup by either:
  • Event ID (integer): /events/123/
  • Event Alias (string): /events/culver-city-parks-tour/
Both methods return the same detailed event information.

Authentication

This endpoint is public and does not require authentication.

Path Parameters

id_or_alias
string | number
required
Either the numeric event ID (e.g., 123) or the URL-friendly alias (e.g., "culver-city-parks-tour")

Response

Returns a single event object with complete details:
id
number
Unique event identifier
name
string
Event name
alias
string
URL-friendly alias for the event
description
string
Event description
emoji
string
Event emoji icon
image_url
string
Event cover image URL
start_time
string
ISO 8601 datetime (null for leisure routes)
end_time
string
ISO 8601 datetime (null for leisure routes)
created_by
string
Auth0 user ID of the event creator
created_at
string
ISO 8601 datetime when the event was created
updated_at
string
ISO 8601 datetime when the event was last updated
is_active
boolean
Whether the event is currently active
is_happening_now
boolean
True if the event is currently happening
is_future
boolean
True if the event hasn’t started yet
is_current_or_future
boolean
True if the event hasn’t ended yet
is_leisure_route
boolean
True if this is a permanent leisure route (no start/end times)
visits_total
number
Total number of unique users who completed this event
city
string
City name (automatically determined from route start point using PostGIS).NEW: This field is computed from the event’s route geometry by finding the closest city border. Returns null if the event has no route geometry.Performance: Uses spatial index (GIST) for efficient O(log n) lookups.
destination
object
DEPRECATED: Use the top-level city field instead. This field will be removed in a future version.Destination information (if event is destination-based)
route
object
Route information (if event has a route)
categories
array
Array of category objects with id, name, and emoji
images
array
Array of event images with image_url and created_at
has_discount
boolean
Whether the event has an associated discount
discount
object
Discount information (if available)

Request Examples

cURL
curl "https://api.cyclemate.com/events/culver-city-parks-tour/" \
  -H "Content-Type: application/json"
JavaScript
const response = await fetch(
  'https://api.cyclemate.com/events/culver-city-parks-tour/',
  {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
  }
);

const event = await response.json();
console.log(event);
Python
import requests

url = "https://api.cyclemate.com/events/culver-city-parks-tour/"
response = requests.get(url)
event = response.json()

By ID

cURL
curl "https://api.cyclemate.com/events/123/" \
  -H "Content-Type: application/json"
JavaScript
const response = await fetch(
  'https://api.cyclemate.com/events/123/',
  {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
  }
);

const event = await response.json();
Python
import requests

url = "https://api.cyclemate.com/events/123/"
response = requests.get(url)
event = response.json()

Response Example

{
  "id": 123,
  "name": "Culver City Parks Tour",
  "alias": "culver-city-parks-tour",
  "description": "Explore the beautiful parks of Culver City on this guided bike tour",
  "emoji": "🚴",
  "image_url": "https://storage.googleapis.com/events/123.jpg",
  "start_time": "2025-11-15T10:00:00Z",
  "end_time": "2025-11-15T12:00:00Z",
  "created_by": "google-oauth2|115315991711634062214",
  "created_at": "2025-11-01T08:30:00Z",
  "updated_at": "2025-11-10T14:20:00Z",
  "is_active": true,
  "is_happening_now": false,
  "is_future": true,
  "is_current_or_future": true,
  "is_leisure_route": false,
  "visits_total": 15,
  "city": "Los Angeles",
  "destination": {
    "id": 45,
    "name": "Culver City Park",
    "latitude": 34.021122,
    "longitude": -118.396466,
    "area_name": "Culver City",
    "city": "Los Angeles",
    "categories": [
      {
        "id": 1,
        "name": "Park",
        "emoji": "🌳"
      }
    ]
  },
  "route": {
    "distance": 5280,
    "duration": 1267,
    "polyline": "encoded_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"
    }
  ],
  "has_discount": true,
  "discount": {
    "id": 5,
    "name": "10% off at local cafe",
    "terms": "Show this app at checkout to receive 10% off",
    "emoji": "☕"
  }
}

Error Responses

Event Not Found (404)

When looking up by alias:
{
  "error": "Event not found",
  "alias": "non-existent-event"
}
When looking up by ID:
{
  "error": "Event not found",
  "event_id": 999
}

Notes

  • Aliases are recommended for creating clean, shareable URLs
  • Aliases are unique across all events
  • Aliases are auto-generated from event names (URL-friendly format)
  • Lookup by ID is supported for backward compatibility
  • Both methods return identical response structures
  • Works for all events regardless of their status (past, current, or future)