Skip to main content
GET
/
trips
Get All Trips
curl --request GET \
  --url https://api.example.com/trips
[
  {
    "id": 1,
    "user_id": 5,
    "title": "Summer Beach Trip",
    "shelter": {
      "type": "Point",
      "coordinates": [-118.2437, 34.0522]
    },
    "arrive_date": "2026-07-15",
    "leave_date": "2026-07-22"
  },
  {
    "id": 2,
    "user_id": 3,
    "title": "Mountain Hiking Adventure",
    "shelter": {
      "type": "Point",
      "coordinates": [-105.2705, 40.0150]
    },
    "arrive_date": "2026-08-01",
    "leave_date": "2026-08-07"
  }
]

Endpoint

GET /trips
Retrieve a list of all trips in the system.

Response

trips
array
Array of trip objects

Example Request

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

Example Response

[
  {
    "id": 1,
    "user_id": 5,
    "title": "Summer Beach Trip",
    "shelter": {
      "type": "Point",
      "coordinates": [-118.2437, 34.0522]
    },
    "arrive_date": "2026-07-15",
    "leave_date": "2026-07-22"
  },
  {
    "id": 2,
    "user_id": 3,
    "title": "Mountain Hiking Adventure",
    "shelter": {
      "type": "Point",
      "coordinates": [-105.2705, 40.0150]
    },
    "arrive_date": "2026-08-01",
    "leave_date": "2026-08-07"
  }
]

Status Codes

  • 200 - Success: Returns array of all trips
  • 500 - Server Error: An error occurred while fetching trips

Build docs developers (and LLMs) love