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
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/merge-patch+json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Authorization | Yes | Bearer token of the customer who wrote the review |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
reviewId | integer | Yes | The review to edit. No product ID is part of the path. |
Request Body
json
{
"title": "Great air fryer",
"rating": 4
}| Field | Type | Required | Description |
|---|---|---|---|
title | string | No | New headline. |
comment | string | No | New body text. |
rating | integer | No | New star rating, 1 to 5. |
name | string | No | New 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.
| Field | Type | Description |
|---|---|---|
id | integer | Review ID. |
name | string | Display name. |
title / comment | string | Review text after the edit. |
rating | integer | Star rating after the edit. |
status | string | Moderation status. Editing does not reset it. |
createdAt / updatedAt | string | ISO 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/jsonis the most common failure here and returns415rather 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.
Related Resources
- Create Product Review — submit a review; it starts as pending
- Delete Product Review — remove the customer's own review
- Get Product Review — one review by id, whatever its status

