Overview
The Reviews API allows tourists to rate and review their tour experiences, and enables guides to respond to reviews. Reviews include ratings, comments, and engagement metrics like likes and replies.Get All Reviews
Endpoint
Response
Returns an array of all reviews.List of all reviews in the system
Get Review by ID
Endpoint
Path Parameters
The unique identifier of the review to retrieve
Response
Returns a single Review object or 404 if not found. See the “Get All Reviews” section above for the full Review object structure.Create Review
Endpoint
Request Body
ID of the trip being reviewed
ID of the tour that was taken
ID of the guide who led the tour
ID of the tourist writing the review
Star rating from 1 to 5
- 1: Poor
- 2: Fair
- 3: Good
- 4: Very Good
- 5: Excellent
Optional written review comment describing the experience
Response
Returns the created Review object with generated fields (id, createdAt, updatedAt, likesCount, repliesCount).Example Response
Update Review
Endpoint
Path Parameters
The unique identifier of the review to update
Request Body
Include the fields you want to update. Typically rating and/or comment.Updated star rating (1-5)
Updated review comment
Response
Returns the updated Review object or 404 if not found.Delete Review
Endpoint
Path Parameters
The unique identifier of the review to delete
Response
Returns 204 No Content on successful deletion (soft delete - sets deletedAt timestamp).Review Replies
Guides can respond to reviews left by tourists. Review replies are managed through a separate endpoint.Get All Review Replies
GET /api/review-replies
Returns an array of all review replies.
Get Review Reply by ID
GET /api/review-replies/{id}
Create Review Reply
POST /api/review-replies
Request Body
ID of the review being replied to
ID of the guide writing the reply
The reply message content
ReviewReply Response Fields
Unique identifier for the reply
ID of the parent review
ID of the guide who wrote the reply
The reply message content
Timestamp when the reply was created
Timestamp when the reply was last updated
Update Review Reply
Endpoint:PUT /api/review-replies/{id}
Delete Review Reply
Endpoint:DELETE /api/review-replies/{id}
Returns 204 No Content on successful deletion.
Best Practices
Review Verification
Only allow tourists to review tours they have actually completed. Verify the trip status before accepting review submissions.Rating Calculations
When displaying guide ratings, calculate the average from all their reviews and display the total review count for credibility.Moderation
Implement content moderation for review comments to prevent spam or inappropriate content.Engagement Metrics
ThelikesCount and repliesCount fields help surface the most helpful reviews. Consider implementing like functionality and displaying guide replies prominently.