ReviewsService class (accessed via client.reviews) handles the storefront side of product reviews — listing approved reviews, submitting a review, deleting your own review, and surfacing helpfulness votes.
Overview
Reviews follow a moderation lifecycle:- A logged-in customer submits a review. It starts as
pending. - The store approves or rejects it. Approval happens in the store’s admin.
- Once approved, the review appears in public listing results.
- Publishable keys — list and get approved reviews, submit a review (with a customer credential), delete the customer’s own review (with a customer credential), mark reviews helpful. A customer credential is either
xAuthToken(session JWT) orxExternalAuth(bring-your-own-auth assertion). - Secret keys — the same storefront actions, for server-side use.
listReviews
Returns reviews for a product. Includes an aggregate summary block (average rating and star distribution) regardless of the status filter applied.
Response shape
Response (200)
getReview
Returns a single review by ID. Publishable keys receive 404 for pending or rejected reviews — only approved reviews are visible.
200:
The
Review object is scoped to a single product and customer; it carries no store_id field. The reviewer’s customer_name is captured from their profile at submission time, so you never supply it.submitReview
Submits a review on behalf of a logged-in customer. Requires both your API key and a customer credential (xAuthToken session JWT or xExternalAuth assertion).
Pass the customer’s session token (obtained from
POST /v1/auth/login) in the xAuthToken parameter. Reviews start as pending and must be approved before they appear publicly.201 — the review is created pending and customer_name is filled in from the account:
order_id is optional — reviews are not gated on purchase history. Customers can review products they received as gifts, bought in-store, or purchased before creating an account. Providing a matching order_id simply unlocks the verified_purchase: true badge on the review. If the order doesn’t belong to the authenticated customer, the review is accepted without the badge — no error is returned.
customer_name on the returned review object is automatically populated from the customer’s profile at submission time. You don’t supply it — it’s read from the account.
Duplicate prevention: A customer may only have one non-rejected review per product. A second submission returns 409 Conflict.
deleteReview
Permanently deletes a review submitted by the authenticated customer. A customer can only delete the review they wrote.
Requires the review author’s customer session token in xAuthToken.
markReviewHelpful
Increments the helpful_count on an approved review. Use this to surface the most useful reviews in your storefront UI.
404.
No server-side deduplication is applied per customer. If you need per-customer dedup, track votes client-side (e.g. in localStorage) before calling this method.

