Search Documentation
Search for a documentation page...
Reviews API
REST API endpoints for reading product reviews and submitting verified buyer reviews.
Reviews are ratings (1-5 stars) and text written by customers who bought the product. A review needs a review token that proves the purchase, and it is created pending approval (approved: false). YNS decides which reviews are published, so the store API is read-only for moderation: store credentials can list and read reviews but cannot approve, unpublish, or delete them. Only approved reviews appear on the storefront.
List Reviews
Returns the store's reviews, including those waiting for YNS approval. Read-only. To submit a review, use POST /api/v1/products/{idOrSlug}/reviews.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 10 | Reviews per page (1-100) |
offset | number | 0 | Reviews to skip |
approved | boolean | – | Filter by approval status (omit for all, including pending) |
productId | string | – | Filter to reviews of a single product (UUID) |
rating | number | – | Filter by star rating (1-5) |
Response (200)
Get Review
Returns a single review by UUID. orderId is the paid order behind a verified review; it is null (and verified is false) for reviews written before purchase verification.
Response (200)
List Product Reviews
Returns approved reviews for a single product, with pagination and summary statistics (average rating and total review count). verified is true for a review written from a paid order; reviews from before purchase verification are false. The product can be referenced by UUID or slug. When translations are enabled, pass ?lang= to resolve a translated slug.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 10 | Reviews per page (1-100) |
offset | number | 0 | Reviews to skip |
Response (200)
Create Product Review
Submits a buyer's review. Only customers who bought the product can review it, so the request must carry a review token. The reviewer's email is taken from the order. Each purchase can be reviewed once per product. Reviews are created with approved: false and appear publicly after YNS approves them.
Get a token from the ?token= parameter of the review link in the delivered-order email, or, for a signed-in buyer, from the storefront's same-origin GET /checkout/api/review-token?product={productId}.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
token | string | Yes | Review token proving the purchase |
author | string | Yes | Reviewer display name (1-100 characters) |
content | string | Yes | Review text (1-5000 characters) |
rating | number | Yes | Star rating (1-5) |
Response (201)
Errors
| Status | Meaning |
|---|---|
403 | The token does not prove a purchase of this product in this store (also returned if the order was cancelled or refunded) |
404 | Product not found |
409 | This purchase has already been reviewed |