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.
Returns:
{ data: Review[]; pagination?: Pagination }
reviews.getRecent(limit?)
Get the most recent reviews.
Returns:
Review[]
reviews.submit(productId, data)
Submit a review for a product. Requires authentication.
Returns:
Review
reviews.getStats()
Get aggregate review statistics for the store.
Types
You can also fetch reviews for a specific product using
sdk.products.getReviews(productId). See Products.
