The Reviews API allows guests to leave star ratings and text feedback on the properties and tours they have booked. Reviews are tied to a specific booking — not just a resource — which means every review is verified against a real stay or tour participation. Approved reviews feed directly into the vendor’s aggregateDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/IvanchoDev89/maleku-system/llms.txt
Use this file to discover all available pages before exploring further.
rating and total_reviews score, which influences listing ranking across the platform.
Only users who have a booking with
status = "completed" for the target property or tour can submit a review. Attempting to review an incomplete or non-existent booking returns 400 Bad Request. Each booking can only be reviewed once — duplicate review attempts return 409 Conflict.POST /api/v1/reviews
Creates a new review. The review is automatically linked to the property or tour associated with the booking. On success, the owning vendor’srating and total_reviews are recalculated immediately using an aggregated query across all approved reviews for that vendor’s listings.
Auth: Bearer token
UUID of the completed booking being reviewed.
Star rating from 1 to 5 (inclusive).
Optional short headline for the review (e.g.
"Amazing experience!").Optional full review text.
201
| Status | Cause |
|---|---|
404 | Booking not found or does not belong to the authenticated user |
400 | Booking status is not completed |
400 | Booking has no associated property or tour |
409 | A review already exists for this booking |
List Reviews
Reviews are not exposed through a dedicated list route in the Reviews router. They are returned as part of thePropertyResponse and TourResponse objects when fetching a specific listing via GET /api/v1/properties/{id} or GET /api/v1/tours/{id}.
Key Fields
Unique review identifier.
Star rating between 1 (worst) and 5 (best). Validated with
ge=1, le=5.Optional short headline for the review.
Optional free-text review body.
Full name of the reviewer, derived from
current_user.full_name at review creation time.Timestamp when the review was submitted.
Review model also stores:
| Field | Description |
|---|---|
booking_id | FK to the booking that backs this review |
property_id | FK to the reviewed property (if a property booking) |
tour_id | FK to the reviewed tour (if a tour booking) |
user_id | FK to the reviewer |
is_approved | Auto-set to true on creation; can be moderated by admins |
deleted_at | Soft-delete timestamp |
Effect on Vendor Ratings
When a review is created or deleted, the system recalculates the vendor’s aggregate score in a single SQL aggregation:Vendor.rating (rounded to 1 decimal place) and Vendor.total_reviews. This keeps vendor scores consistent with only approved, non-deleted reviews and means new reviews are reflected in vendor listings immediately.