Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HelenaLM32/ECHO/llms.txt

Use this file to discover all available pages before exploring further.

The venue-event-reviews API lets authenticated users submit ratings and comments for both venues and events on ECHO. Each review targets either a venue or an event via the targetType field and is uniquely scoped to the combination of author, target, and target type — meaning each user may leave at most one review per venue or event. Reviews can be read publicly and deleted by their authors.
The base URL for all endpoints on a local development server is http://localhost:8084. Replace this with your deployed API URL in production.

Get reviews by target

GET /venue-event-reviews?targetId={id}&targetType={type}
Returns all reviews for a specific venue or event. This endpoint is public and requires no authentication.

Query parameters

targetId
number
required
The numeric ID of the venue or event to retrieve reviews for.
targetType
string
required
The type of entity. Must be exactly VENUE or EVENT.

Example

# Reviews for a venue
curl -X GET "http://localhost:8084/venue-event-reviews?targetId=3&targetType=VENUE"

# Reviews for an event
curl -X GET "http://localhost:8084/venue-event-reviews?targetId=21&targetType=EVENT"

Response fields

id
number
required
Unique identifier for the review.
authorId
number
required
ID of the user who submitted the review.
targetId
number
required
ID of the venue or event being reviewed.
targetType
string
required
Whether the review targets a venue or an event. One of VENUE or EVENT.
score
number
required
Rating from 1 (lowest) to 5 (highest).
comment
string
Optional free-text comment accompanying the rating.
createdAt
string
required
ISO 8601 timestamp of when the review was submitted.

Get average score

GET /venue-event-reviews/average?targetId={id}&targetType={type}
Returns the average score for a specific venue or event. Public endpoint.

Query parameters

targetId
number
required
The numeric ID of the venue or event.
targetType
string
required
The type of entity: VENUE or EVENT.

Example

curl -X GET "http://localhost:8084/venue-event-reviews/average?targetId=3&targetType=VENUE"

Create a review

POST /venue-event-reviews
Submits a new review for a venue or event. Authentication is required. Each user may submit at most one review per target — attempting to submit a second review for the same target returns an error.
Each user is allowed exactly one review per venue or event. Submitting a duplicate review for the same targetId and targetType returns a 409 error.

Request body

targetId
number
required
The numeric ID of the venue or event being reviewed.
targetType
string
required
The type of entity being reviewed. Must be exactly VENUE or EVENT (uppercase).
score
number
required
An integer rating between 1 and 5 inclusive.
comment
string
An optional free-text comment to accompany the rating.

Example

curl -X POST http://localhost:8084/venue-event-reviews \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"targetId":3,"targetType":"VENUE","score":5,"comment":"Amazing gallery space with great lighting."}'
To review an event instead, set targetType to EVENT:
{
  "targetId": 21,
  "targetType": "EVENT",
  "score": 4,
  "comment": "Great exhibition, slightly crowded."
}

Error codes

StatusMeaning
400Missing required fields, invalid targetType, or score outside the 1–5 range.
401No valid authentication token provided.
409You have already submitted a review for this venue or event.

Delete a review

DELETE /venue-event-reviews/{id}
Permanently removes a review. Authentication is required. Only the review’s author or an ADMIN may delete it.
This action is irreversible. Once deleted, the review cannot be recovered.

Path parameters

id
number
required
The numeric ID of the review to delete.

Example

curl -X DELETE http://localhost:8084/venue-event-reviews/55 \
  -H "Authorization: Bearer <token>"

Error codes

StatusMeaning
401No valid authentication token provided.
403Not authorized to delete this review.
404No review exists with the given ID.

Build docs developers (and LLMs) love