Skip to main content
GET
/
trips
/
{id}
Get Trip by ID
curl --request GET \
  --url https://api.example.com/trips/{id}
{
  "title": "Summer Beach Trip",
  "shelter": {
    "type": "Point",
    "coordinates": [-118.2437, 34.0522]
  },
  "arrive_date": "2026-07-15",
  "leave_date": "2026-07-22",
  "stops": [
    {
      "id": 101,
      "name": "Santa Monica Pier",
      "category": "Attraction",
      "order": 1,
      "coming": "2026-07-15T10:00:00Z",
      "leaving": "2026-07-15T12:00:00Z"
    },
    {
      "id": 102,
      "name": "Venice Beach",
      "category": "Beach",
      "order": 2,
      "coming": "2026-07-15T14:00:00Z",
      "leaving": "2026-07-15T18:00:00Z"
    }
  ]
}

Endpoint

GET /trips/{id}
Retrieve detailed information about a specific trip, including all associated stops.

Path Parameters

id
integer
required
The unique identifier of the trip to retrieve

Response

title
string
Title of the trip
shelter
object
Geographic point representing the shelter location (PostGIS POINT type)
arrive_date
string
Arrival date for the trip
leave_date
string
Departure date for the trip
stops
array
Array of stops associated with this trip

Example Request

curl --request GET \
  --url https://api.maytravel.com/trips/1

Example Response

{
  "title": "Summer Beach Trip",
  "shelter": {
    "type": "Point",
    "coordinates": [-118.2437, 34.0522]
  },
  "arrive_date": "2026-07-15",
  "leave_date": "2026-07-22",
  "stops": [
    {
      "id": 101,
      "name": "Santa Monica Pier",
      "category": "Attraction",
      "order": 1,
      "coming": "2026-07-15T10:00:00Z",
      "leaving": "2026-07-15T12:00:00Z"
    },
    {
      "id": 102,
      "name": "Venice Beach",
      "category": "Beach",
      "order": 2,
      "coming": "2026-07-15T14:00:00Z",
      "leaving": "2026-07-15T18:00:00Z"
    }
  ]
}

Status Codes

  • 200 - Success: Returns trip details with stops
  • 500 - Server Error: An error occurred while fetching the trip

Build docs developers (and LLMs) love