Skip to content

Update Product Review ​

Edit a review the authenticated customer wrote.

Endpoint ​

PATCH /api/shop/reviews/{reviewId}

The verb is PATCH, and the body must carry Content-Type: application/merge-patch+json. PUT is not routed, and a plain application/json body is rejected with 415.

Request Headers ​

HeaderRequiredDescription
Content-TypeYesapplication/merge-patch+json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token of the customer who wrote the review

Path Parameters ​

ParameterTypeRequiredDescription
reviewIdintegerYesThe review to edit. No product ID is part of the path.

Request Body ​

json
{
  "title": "Great air fryer",
  "rating": 4
}
FieldTypeRequiredDescription
titlestringNoNew headline.
commentstringNoNew body text.
ratingintegerNoNew star rating, 1 to 5.
namestringNoNew display name.

Every field is optional — the update is a partial patch, and anything omitted keeps its stored value.

Response Fields (200 OK) ​

The updated review, flat — the same shape Create returns.

FieldTypeDescription
idintegerReview ID.
namestringDisplay name.
title / commentstringReview text after the edit.
ratingintegerStar rating after the edit.
statusstringModeration status. Editing does not reset it.
createdAt / updatedAtstringISO 8601 timestamps; only updatedAt moves.

Ownership ​

A review may only be edited by the customer who wrote it. The check is on the stored author, not on the token alone, so:

  • Another customer's review answers 403.
  • A review submitted by a guest carries no author and can never be edited — also 403.
  • Editing an already-approved review leaves it approved; the store's moderation status is untouched.

Use Cases ​

  • "Edit your review" on a product page — send only the changed fields; the response carries the full row for immediate re-render.
  • Fix a wrong rating without retyping the text — a body of {"rating": 4} alone is valid.

Best Practices ​

  • Set the merge-patch content type — sending application/json is the most common failure here and returns 415 rather than a validation error.
  • Do not resend the whole review — a partial body avoids overwriting text the shopper edited in another tab.
  • Expect the status to stay as it was — an edit is not resubmitted for approval, so an approved review stays live with the new text.

Released under the MIT License.