Reviews allow authenticated users to rate places and events on a 1–5 star scale with an optional written comment. The API enforces one review per user per item — submitting a second review updates the existing record. Computed average ratings are exposed directly on the place and event endpoints.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/astrxnomo/tourify/llms.txt
Use this file to discover all available pages before exploring further.
Average ratings computed from reviews are returned on the place and event list and detail endpoints — you do not need to calculate them client-side.
POST /api/places//reviews
Submits a star rating and optional comment for a place. Because the endpoint usesupdateOrCreate, submitting a second review for the same place simply updates the existing record rather than creating a duplicate. Returns HTTP 201 for both new and updated reviews.
This endpoint requires authentication. Include your bearer token in the
Authorization header.auth:sanctum).
Path Parameters
The ID of the place being reviewed.
Request Body
Star rating for the place. Must be an integer between
1 and 5 (inclusive).Optional written review. Maximum 1000 characters.
Response Fields
Unique identifier of the review record.
ID of the user who submitted the review.
ID of the reviewed item (the place ID).
Morph type string for the reviewed item. Value:
place.The submitted star rating (1–5).
The submitted comment, or
null if none was provided.The user who authored the review.
Timestamp when the review was first created.
Timestamp when the review was last updated. Will differ from
created_at on repeat submissions.Example request
POST /api/events//reviews
Submits a star rating and optional comment for an event. Like the place review endpoint, repeat submissions update the existing review rather than creating a new one. Returns HTTP 201 for both new and updated reviews.This endpoint requires authentication. Include your bearer token in the
Authorization header.auth:sanctum).
Path Parameters
The ID of the event being reviewed.
Request Body
Star rating for the event. Must be an integer between
1 and 5 (inclusive).Optional written review. Maximum 1000 characters.
Response Fields
Unique identifier of the review record.
ID of the user who submitted the review.
ID of the reviewed item (the event ID).
Morph type string for the reviewed item. Value:
event.The submitted star rating (1–5).
The submitted comment, or
null if none was provided.The user who authored the review.
Timestamp when the review was first created.
Timestamp when the review was last updated.
Example request