---
title: "Update a product review"
method: PUT
path: "/products/{product_id}/reviews/{id}"
---

# Update a product review

`PUT /products/{product_id}/reviews/{id}`

## Request

- Base URL: `https://api.ecommerceapi.uk/v1`
- URL: `https://api.ecommerceapi.uk/v1/products/{product_id}/reviews/{id}`
- Auth: HTTP basic

Updates an existing product review.

## Path parameters

- `product_id` integer, required
- `id` integer, required

## Query parameters

- `fields` string

## Request body

- ProductReviewUpdate
  - `name` string: Updated name of the customer who added the review.
  - `content` string: Updated content of the review.
  - `rating` integer: Updated review rating (between 1 and 5).
  - `active` boolean: Indicates whether the review should be displayed.

## Response `200`

Product review updated successfully.

- ProductReview
  - `id` integer: Unique identifier for the product review.
  - `createdAt` string, date-time: Timestamp when the review was created.
  - `name` string: The name of the customer who added the review.
  - `content` string: The content of the review.
  - `rating` integer: The review rating (between 1 and 5).
  - `active` boolean: Indicates whether the review is displayed.

## Other responses

- `400`: Invalid request data.
- `401`: Unauthorized. Invalid or missing API key.
- `404`: Review not found.
- `500`: Server error.

---

[API](https://skmtc.dev/ecommerceapi/apis/product-reviews.md) - [All operations](https://skmtc.dev/ecommerceapi/apis/product-reviews/llms.txt) - [OpenAPI document](https://skmtc.dev/ecommerceapi/apis/product-reviews/revisions/e7212702d624?raw)
