curl --request POST \
--url https://api.example.com/api/routes/:routeId/reviews \
--header 'Content-Type: application/json' \
--data '
{
"rating": 123,
"comment": "<string>"
}
'{
"success": true,
"data": {
"data.id": "<string>",
"data.routeId": "<string>",
"data.userId": "<string>",
"data.rating": 123,
"data.comment": "<string>",
"data.createdAt": "<string>",
"data.updatedAt": "<string>",
"data.user": {
"data.user.id": "<string>",
"data.user.name": "<string>",
"data.user.imageUrl": "<string>"
}
},
"message": "<string>"
}Create a new review for a specific route. Each user can only review a route once.
curl --request POST \
--url https://api.example.com/api/routes/:routeId/reviews \
--header 'Content-Type: application/json' \
--data '
{
"rating": 123,
"comment": "<string>"
}
'{
"success": true,
"data": {
"data.id": "<string>",
"data.routeId": "<string>",
"data.userId": "<string>",
"data.rating": 123,
"data.comment": "<string>",
"data.createdAt": "<string>",
"data.updatedAt": "<string>",
"data.user": {
"data.user.id": "<string>",
"data.user.name": "<string>",
"data.user.imageUrl": "<string>"
}
},
"message": "<string>"
}curl -X POST https://api.losinmaduros.com/api/routes/123e4567-e89b-12d3-a456-426614174000/reviews \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"rating": 5,
"comment": "Excellent route! Very well signposted and great pavement quality."
}'
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"routeId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "987e6543-e21b-12d3-a456-426614174000",
"rating": 5,
"comment": "Excellent route! Very well signposted and great pavement quality.",
"createdAt": "2026-02-09T12:00:00Z",
"updatedAt": "2026-02-09T12:00:00Z",
"user": {
"id": "987e6543-e21b-12d3-a456-426614174000",
"name": "John Doe",
"imageUrl": "https://example.com/avatar.jpg"
}
},
"message": "Review created successfully"
}
comment field is optional and can be omitted if you only want to provide a rating.