List reviews
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/reviews?filters=%5B%7B%22field%22%3A%22status%22%2C%22operator%22%3A%22is%22%2C%22values%22%3A%5B%22PENDING%22%5D%7D%5D&sort_order=asc&limit=20&offset=0&status=PENDING';const options = {method: 'GET', headers: {'x-api-key': '<x-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/stores/example/reviews?filters=%5B%7B%22field%22%3A%22status%22%2C%22operator%22%3A%22is%22%2C%22values%22%3A%5B%22PENDING%22%5D%7D%5D&sort_order=asc&limit=20&offset=0&status=PENDING' \ --header 'x-api-key: <x-api-key>'Returns the store’s product reviews in pages, whatever their moderation status. By default pinned reviews come first, then the newest; set sort_by to change that. Filter with the query parameters or with filters. Pass include_replies=true to attach each review’s replies. Deleted reviews are not returned.
Required scopes: read:reviews
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Query Parameters
Section titled “Query Parameters”Search review titles and content.
Example
[{"field":"status","operator":"is","values":["PENDING"]}]Filters as a JSON array of {field, operator, values} clauses, at most 10 clauses with at most 50 values each. Fields: status (is, is_not), rating (gte, lte), is_verified_buyer, has_media, has_reply, product_id (is) and created_at (gte, lte).
Field to sort by: created_at, updated_at, rating, display_order or is_featured. Without it, pinned reviews come first, then the newest.
Sort direction. Applies only when sort_by is set; defaults to desc.
Maximum number of reviews to return.
Number of reviews to skip.
Send true to include each review’s visible and hidden replies in review_replies.
Only reviews of this product ID.
Only reviews with this status.
Only reviews with this rating, 1 to 5.
Only reviews with at least this rating, 1 to 5.
Only reviews with at most this rating, 1 to 5.
Send true for verified-buyer reviews only, false for the rest.
Send true for reviews with photos or media, false for reviews without.
Send true for reviews that have a reply, false for reviews without one.
Only reviews created at or after this ISO 8601 timestamp.
Only reviews created at or before this ISO 8601 timestamp.
Responses
Section titled “Responses”object
object
ID of the reviewed variant, or null.
Name of the reviewed variant, or null.
ID of the order the review is about, or null.
Number of the order the review is about, or null.
ID of the customer account that wrote the review, 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
Moderation status: PENDING, APPROVED, REJECTED or HIDDEN. Only APPROVED reviews are shown to shoppers.
Internal moderation notes, or null.
ID of the user who approved the review, or null.
When the review was approved, as an ISO 8601 timestamp, or null.
Why the review was rejected, or null.
Position used when sorting by display_order, or null.
The review’s ID on the platform it was imported from, or null.
The date shown for the review, as an ISO 8601 timestamp, or null. Imported reviews keep their original date here.
When the review was deleted. Always null on reviews you can read.
The review’s replies. Present only when replies are requested with include_replies on the list route.
object
When the reply was deleted. Always null on replies you can read.
Reply ID.
ID of the review the reply answers.
Reply text.
ID of the user who wrote the reply.
Name shown as the reply’s author.
Whether the reply is shown to shoppers.
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.
Reviewer’s email.
Whether the reviewer bought the product from the store.
Star rating, 1 to 5.
Review text.
What the reviewer liked.
What the reviewer disliked.
Whether the review is featured.
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
{ "data": [ { "status": "PENDING" } ]}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"}