Overview
The Review Management API provides endpoints for creating, reading, updating, and deleting reviews. Reviews allow users to rate and comment on their experiences at housing listings.All endpoints require JWT authentication via the
Authorization: Bearer {token} header.Get All Reviews
Retrieve a list of all reviews in the system.Response
Array of ReviewDTO objects
Example Response
Example Response
Status Codes
| Code | Description |
|---|---|
| 200 | Successfully retrieved list of reviews |
| 403 | Forbidden - Access denied |
Get Review by ID
Retrieve a specific review by its ID.ID of the review to retrieve (e.g., 1)
Response
Returns a single ReviewDTO object with all review details.Example Response
Example Response
Status Codes
| Code | Description |
|---|---|
| 200 | Successfully retrieved review |
| 404 | Review not found |
| 403 | Forbidden - Access denied |
Create Review
Create a new review with the provided details.Request Body
Numeric rating (typically 1-5, where 5 is the highest rating)
Text review/comment describing the user’s experience
Code/ID of the housing/hotel being reviewed (must be an existing housing listing)
Name of the user writing the review
DNI of the user writing the review (must be an existing user)
The
reviewId field is auto-generated and should not be included in the request body.Response
Returns the created review with an auto-generated reviewId.Example Response
Example Response
Status Codes
| Code | Description |
|---|---|
| 201 | Review created successfully |
| 400 | Invalid input (e.g., invalid rating, non-existent hotel or user) |
| 403 | Forbidden - Access denied |
Update Review
Update an existing review.ID of the review to update (e.g., 1)
Request Body
All ReviewDTO fields can be updated (see Create Review for field descriptions).Response
Returns the updated review.Example Response
Example Response
Status Codes
| Code | Description |
|---|---|
| 200 | Review updated successfully |
| 404 | Review not found |
| 400 | Invalid input |
| 403 | Forbidden - Access denied |
Delete Review
Delete a review by its ID.ID of the review to delete (e.g., 1)
Response
No content is returned on successful deletion.Status Codes
| Code | Description |
|---|---|
| 204 | Review deleted successfully |
| 404 | Review not found |
| 403 | Forbidden - Access denied |
Get Comments for a House (Paginated)
Retrieve paginated comments/reviews for a specific house.This endpoint is part of the Custom AJAX API and provides pagination support for displaying reviews on the frontend.
ID of the house
Page number (0-based, default: 0)
Number of items per page (default: 3)
Response
Returns a paginated list of Review entities (full objects including hotel and user details).Example Response
Example Response
Status Codes
| Code | Description |
|---|---|
| 200 | Successfully retrieved paginated comments |
| 500 | Internal server error |
Rating Guidelines
5 Stars
Exceptional - Exceeded expectations in every way
4 Stars
Great - Minor issues but overall very positive experience
3 Stars
Good - Met expectations with some room for improvement
2 Stars
Fair - Below expectations with notable issues
1 Star
Poor - Major problems and disappointing experience
Best Practices
Authentication
All Review Management endpoints require JWT authentication:Error Responses
Error type
Detailed error message
Example Error Response
Example Error Response
