List a product's reviews
const url = 'https://apibase.ecomweb.app/api/v1/public/stores/example/products/1/reviews?limit=20&offset=0&sort_by=created_at&sort_order=asc&include_replies=false';const options = {method: 'GET', headers: {'x-storefront-api-key': '<x-storefront-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://apibase.ecomweb.app/api/v1/public/stores/example/products/1/reviews?limit=20&offset=0&sort_by=created_at&sort_order=asc&include_replies=false' \ --header 'x-storefront-api-key: <x-storefront-api-key>'Returns a page of the product’s approved reviews. Reviewer emails, account and order details and moderation data are never included. Page with limit and offset, sort with sort_by and sort_order, filter by rating or has_media, and set include_replies to add the store’s visible replies. A non-numeric productId currently answers 500 instead of 400.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The product ID.
The store’s ref, as returned by GET /stores.
Query Parameters
Section titled “Query Parameters”Example
20Number of items per page
Example
0Number of items to skip
Sort field
Example
trueInclude each review’s replies in the response
Filter to reviews with an exact star rating
Filter to reviews that include media
Responses
Section titled “Responses”object
object
ID of the reviewed variant, or null.
Name of the reviewed variant, or null.
URL of the reviewer’s avatar, or null.
Review title, or null.
Photos or other media attached to the review: a list of objects such as { "url": "https://...", "type": "image" }.
object
Position used when sorting by display_order, or null.
The date shown for the review, as an ISO 8601 timestamp, or null.
The store’s visible replies. Present only when include_replies is true.
object
Reply ID.
ID of the review the reply answers.
Reply text.
Always true: hidden replies are not returned.
When the reply was created, as an ISO 8601 timestamp.
When the reply was last updated, as an ISO 8601 timestamp.
Review ID.
ID of the reviewed product.
Name of the reviewed product when the review was written.
Reviewer’s name.
Whether the reviewer bought the product from the store.
Star rating, 1 to 5.
Review text.
What the reviewer liked.
What the reviewer disliked.
Always APPROVED: only approved reviews are returned.
Whether the store features the review.
Whether the review is pinned to the top of the list.
When the review was created, as an ISO 8601 timestamp.
When the review was last updated, as an ISO 8601 timestamp.
object
Total number of items matching the request.
Maximum number of items in this page.
Number of items skipped before this page.
Current page number, starting at 1.
Total number of pages.
Whether a next page exists.
Whether a previous page exists.
Example generated
{ "data": [ { "variant_id": 1, "variant_name": "example", "reviewer_avatar": "example", "title": "example", "media": [ {} ], "display_order": 1, "review_date": "example", "review_replies": [ { "id": "example", "review_id": "example", "content": "example", "is_visible": true, "created_at": "example", "updated_at": "example" } ], "id": "example", "product_id": 1, "product_name": "example", "reviewer_name": "example", "is_verified_buyer": true, "rating": 1, "content": "example", "pros": [ "example" ], "cons": [ "example" ], "status": "example", "is_featured": true, "is_pinned": true, "created_at": "example", "updated_at": "example" } ], "meta": { "total": 1, "limit": 1, "offset": 1, "page": 1, "totalPages": 1, "hasNext": true, "hasPrev": true }}The request is malformed or failed validation.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}