Skip to main content

Endpoint

GET /api/routes/:routeId/reviews

Authentication

This is a public endpoint. No authentication required.

Path Parameters

routeId
string
required
The unique identifier (UUID) of the route

Query Parameters

page
number
default:"1"
Page number for pagination
limit
number
default:"20"
Number of reviews per page (max: 100)

Response

success
boolean
Indicates if the request was successful
data
array
Array of review objects
pagination
object
Pagination metadata

Example Request

cURL
curl https://api.example.com/api/routes/987e6543-e21b-12d3-a456-426614174000/reviews?page=1&limit=20

Example Response

{
  "success": true,
  "data": [
    {
      "id": "rev_abc123",
      "rating": 5,
      "comment": "Amazing route with beautiful views!",
      "userId": "user_xyz789",
      "routeId": "987e6543-e21b-12d3-a456-426614174000",
      "user": {
        "name": "Maria",
        "lastName": "Garcia",
        "imageUrl": "https://example.com/avatar.jpg"
      },
      "createdAt": "2024-03-10T12:30:00.000Z",
      "updatedAt": "2024-03-10T12:30:00.000Z"
    },
    {
      "id": "rev_def456",
      "rating": 4,
      "comment": "Great route, a bit challenging for beginners",
      "userId": "user_abc123",
      "routeId": "987e6543-e21b-12d3-a456-426614174000",
      "user": {
        "name": "Carlos",
        "lastName": "Lopez",
        "imageUrl": "https://example.com/avatar2.jpg"
      },
      "createdAt": "2024-03-08T15:45:00.000Z",
      "updatedAt": "2024-03-09T10:20:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "totalCount": 45,
    "totalPages": 3,
    "hasNextPage": true,
    "hasPreviousPage": false
  }
}

Notes

  • Reviews are ordered by creation date (newest first)
  • Default pagination: 20 items per page, maximum 100
  • Each user can only review a route once

Create Review

Create a new review for a route

Get Route

Get full route details with reviews

Build docs developers (and LLMs) love