Product Reviews

Moderate buyer star ratings, publish or reject reviews, and post replies

GET /admin/api/reviews

List product reviews for moderation, newest first, with page-based pagination. Optional filters narrow by moderation status, product, and star rating.

Parameters

Name Type Required Description
page integer optional Page number (1-indexed). Defaults to 1.
per_page integer optional Items per page. Defaults to 20, clamped to a max of 100.
status string optional Filter by moderation status: pending, published, or rejected. Other values are ignored.
product_id integer optional Restrict to reviews of a single product.
rating integer optional Restrict to a single star rating, 1–5. Out-of-range values are ignored.

Response 200

{
  "data": [
    {
      "id": 1,
      "product_id": 42,
      "product_name": "Merino Wool Socks",
      "customer_id": 1001,
      "reviewer_name": "Jordan A.",
      "rating": 5,
      "title": "Cozy and durable",
      "body": "Held up after a dozen washes, still warm.",
      "status": "published",
      "verified_purchase": true,
      "merchant_reply": "Thanks for the kind words, Jordan!",
      "merchant_reply_at": "2026-05-21T14:05:00Z",
      "created_at": "2026-05-20T09:30:00Z"
    },
    {
      "id": 2,
      "product_id": 42,
      "product_name": "Merino Wool Socks",
      "customer_id": 1002,
      "reviewer_name": "Sam P.",
      "rating": 2,
      "title": null,
      "body": "Ran small for me.",
      "status": "pending",
      "verified_purchase": false,
      "merchant_reply": null,
      "merchant_reply_at": null,
      "created_at": "2026-05-22T11:00:00Z"
    }
  ],
  "page": 1,
  "per_page": 20,
  "total": 2,
  "total_pages": 1
}

Example

curl "https://yourshop.zeroshop.io/admin/api/reviews?status=pending&page=1&per_page=20" \
  -H "Authorization: Bearer zspat_..."
PATCH /admin/api/reviews/{id}/status

Set a review's moderation status. Setting a review to published makes it visible on the storefront; pending or rejected hide it. Recomputes the product's aggregate rating. Returns 204 No Content.

Request Body

{
  "status": "published"
}

Response 204

Example

curl -X PATCH "https://yourshop.zeroshop.io/admin/api/reviews/1/status" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{"status": "published"}'
PUT /admin/api/reviews/{id}/reply

Set or clear the single public merchant reply on a review. Passing null or an empty/whitespace-only reply clears any existing reply. Returns 204 No Content.

Request Body

{
  "reply": "Thanks for the kind words, Jordan!"
}

Response 204

Example

curl -X PUT "https://yourshop.zeroshop.io/admin/api/reviews/1/reply" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{"reply": "Thanks for the kind words, Jordan!"}'
DELETE /admin/api/reviews/{id}

Permanently delete a review. This is a hard delete and recomputes the product's aggregate rating. Returns 204 No Content.

Response 204

Example

curl -X DELETE "https://yourshop.zeroshop.io/admin/api/reviews/1" \
  -H "Authorization: Bearer zspat_..."

We value your privacy

We use cookies for essential site functionality and, with your consent, analytics to understand how our platform is used. No personal data is shared with third parties. See our Privacy Policy for details.