Skip to content

Get Product Reviews

Retrieve reviews and ratings for a specific product. By default only approved reviews are returned; pass the status parameter to fetch a different status.

Endpoint

GET /api/shop/products/{productId}/reviews

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key

Path Parameters

ParameterTypeRequiredDescription
productIdintegerYesProduct ID

Query Parameters

ParameterTypeDefaultDescription
statusstringapprovedFilter by status (approved, pending). Omit to get approved reviews only.
ratingintegerFilter by star rating (1–5).
pageinteger1Page number (1-based).
per_pageinteger30Reviews per page. Alias: limit. Maximum 50.

Filtered request examples

GET /api/shop/products/1/reviews?rating=5
GET /api/shop/products/1/reviews?status=pending
GET /api/shop/products/1/reviews?status=approved&rating=4
GET /api/shop/products/1/reviews?per_page=10&page=2

Approved by default — overridable

A storefront product page shows only approved reviews, so this endpoint returns status=approved when no status is supplied. To build moderation or preview tooling, request a specific status explicitly (e.g. ?status=pending).

Response (200 OK)

Returns a JSON array of review objects.

FieldTypeDescription
idintegerReview ID
namestringReviewer display name
titlestringReview title
ratingintegerRating (1–5 stars)
commentstringReview body
statusstringReview status (approved, pending)
createdAtstringReview creation date (ISO 8601)
updatedAtstringLast update date (ISO 8601)

Pagination

Pagination metadata is returned in response headers (not the body):

HeaderDescription
X-Total-CountTotal reviews matching the filters
X-PageCurrent page
X-Per-PageReviews per page
X-Total-PagesTotal page count

Use Cases

  • Display approved product reviews on detail pages
  • Filter reviews by rating
  • Paginate through a product's reviews
  • Build review moderation tooling (?status=pending)

Released under the MIT License.