Skip to main content
The sdk.reviews namespace provides methods to fetch store-wide reviews, get review statistics, and submit new reviews. Listing reviews is public; submitting a review requires authentication.

Methods

reviews.getAll(params?)

Get a paginated list of store reviews, optionally filtered by rating.
Parameters: Returns: { data: Review[]; pagination?: Pagination }

reviews.getRecent(limit?)

Get the most recent reviews.
Parameters: Returns: Review[]

reviews.submit(productId, data)

Submit a review for a product. Requires authentication.
Parameters: Returns: Review

reviews.getStats()

Get aggregate review statistics for the store.
Returns: Review statistics object (varies by store configuration).

Types

You can also fetch reviews for a specific product using sdk.products.getReviews(productId). See Products.