Skip to content

Reviews (admin API)

Admin routes of the reviews module. Every route needs a staff session and the permission named on it; send X-Resolve-Locale: false to receive every locale of a translatable field for editing.

List reviews (admin)

Parameters:

  • page in query (number, min 1, optional).
  • pageSize in query (number, min 1, max 100, optional).
  • productId in query (string, optional).
  • rating in query (number, min 1, max 5, optional).
  • sortBy in query ("createdAt", "helpfulCount", "rating", "updatedAt", optional).
  • sortOrder in query ("asc", "desc", optional).
  • status in query ("HIDDEN", "PENDING", "PUBLISHED", optional).
  • userId in query (string, optional).

Responses:

  • 200: Reviews retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Delete review (admin)

Parameters:

  • id in path (string, required).

Responses:

  • 204: Review deleted.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Review not found.

Update review (admin)

Parameters:

  • id in path (string, required).

Request body: AdminUpdateReviewDto.

Responses:

  • 200: Review updated.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Review not found.

Approve review

Parameters:

  • id in path (string, required).

Responses:

  • 200: Review approved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Review not found.

Reject review

Parameters:

  • id in path (string, required).

Request body: ModerateReviewDto.

Responses:

  • 200: Review rejected.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Review not found.
  • rating (number, min 1, max 5, optional).
  • title (string, max length 200, optional).
  • body (string, max length 5000, optional).
  • assetIds (array of string, uuid, optional).
  • status ("HIDDEN", "PENDING", "PUBLISHED", optional).
  • reason (string, max length 1000, optional).
  • reason (string, max length 1000, optional).
As seen on Open Source Alternatives The Merchant Engine badge