curl --request PUT \
--url https://api.example.com/api/reviews/:id \
--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>"
}Update an existing review. Only the review owner can update their review.
curl --request PUT \
--url https://api.example.com/api/reviews/:id \
--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 PUT https://api.losinmaduros.com/api/reviews/123e4567-e89b-12d3-a456-426614174000 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"rating": 4,
"comment": "Updated my review with more details."
}'
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"routeId": "987e6543-e21b-12d3-a456-426614174000",
"userId": "456e7890-e12b-34d5-a678-901234567890",
"rating": 4,
"comment": "Updated my review with more details.",
"createdAt": "2026-02-09T12:00:00Z",
"updatedAt": "2026-03-04T14:30:00Z",
"user": {
"id": "456e7890-e12b-34d5-a678-901234567890",
"name": "John Doe",
"imageUrl": "https://example.com/avatar.jpg"
}
},
"message": "Review updated successfully"
}
rating, just the comment, or both fields in a single request.updatedAt timestamp will be automatically updated to reflect the modification time.comment.