---
title: "Updated a review"
method: PATCH
path: "/v1/reviews"
tags: ["reviews"]
---

# Updated a review

`PATCH /v1/reviews`

This resource manages the update of reviews for a given review ID. Description and rating can be updated on a review. The agent must be the one that owns the reservation associated to the review to modify, otherwise a forbidden response is returned.

**NOTE**: Reviews in state 'PUBLISHED' or 'DENIED' cannot be updated. Only those in status 'CREATED' are allowed to be updated.

####Request:
The request needs to have 3 parameters for reservation reviewId (public reviewId), description and rating.

* **reviewId**: Id of the review. **Required**.
* **description**: Text content of the review. If not set (null value) it won't be considered for update.
* **rating**: Integer value from 1 to 6 with the rating given. If not set (null value) it won't be considered for update.

In case both description and rating are set to null, nothing happens to the review: it is not updated and its state remains.

####Response:
The response is a review object containing information about the review.

* **reviewId**: The Id of the updated review.
* **status**: Status of the updated review. Can be 'CREATED', 'PUBLISHED' or 'DENIED'. Upon a successful update, the status 'CREATED' is returned.
* **links**: A series of links where to get details of the updated review.

Example curl:
```
curl -H "Content-Type: application/json" -X PATCH https://{host}/v{X}/reviews/ -d '
{
    "reviewId": "01a53b36-3f48-11e5-a151-feff819cdc9f",
    "description": "Some updated description for the review",
    "rating": 2
}
```

Example response:
```
{
    "reviewId": "01a53b36-3f48-11e5-a151-feff819cdc9f",
    "status": "CREATED",
    "links": [{
        "href": "http://localhost:39250/v1/reviews/01a53b36-3f48-11e5-a151-feff819cdc9f",
        "method": "GET",
        "rel": "get-review"
    }]
}
```

## Request body

- UpdateReviewDto
  - `reviewId` string, uuid, required — UUID identifying the review.
  - `rating` integer — Rating associated to this review. Possible values: 1 to 6.
  - `description` string — Description associated to this review.

## Response `200`

OK

- ChangedReviewDto
  - `reviewId` string, uuid, required — Id of to the review.
  - `status` 'AVAILABLE_TO_REVIEW' | 'CREATED' | 'DENIED' | 'PUBLISHED' — The status of the change.
  - `links` LinkRelationDto[], required — The links related to this entity.
    - `href` string, url
    - `method` string
    - `rel` 'DETAILS' | 'WIDGET' | 'WIDGET_DETAILS' | 'GET_MERCHANT' | 'PARENT' | 'SELF' | 'SETTINGS' | 'AVAILABILITY_DAYS' | 'AVAILABILITIES' | 'CREATE_RESERVATION' | 'GET_RESERVATION' | 'UPDATE_RESERVATION' | 'GET_CUSTOMER_RESERVATION' | 'GET_REVIEW' | 'PORTAL_PREORDER_FORM' | 'RESERVATION_CHECKOUT_PAGE' | 'CREDIT_CARD_DETAILS_PAGE' | 'CUSTOMER_EDIT_RESERVATION'

## Other responses

- `400` — Bad request
- `403` — Access denied
- `404` — Reservation not found
- `500` — Internal server error

---

[API](https://skmtc.net/quandoo/apis/quandooapidocumentation.md) · [All operations](https://skmtc.net/quandoo/apis/quandooapidocumentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quandoo/quandooapidocumentation/revisions/6863a5956792/schema)
