PUT /api/hotels/{hotelId}/reviews/{reviewId}

Sample request:

PUT /hotels/{hotelId}/reviews/{reviewId} { "Title": "Good Experience", "Description": "The hotel provided good service and comfortable accommodations.", "Rating": 4 }

Path parameters

  • hotelId string(uuid) Required

    The id of the hotel having the review to update

  • reviewId string(uuid) Required

    The id of the review to update

Body

The data for the updated review

  • title string | null

    Title of the review

  • description string | null

    Content of the review (optional)

  • rating integer(int32)

    Rating for the hotel (1-5)

  • Additional properties are NOT allowed

Body

The data for the updated review

  • title string | null

    Title of the review

  • description string | null

    Content of the review (optional)

  • rating integer(int32)

    Rating for the hotel (1-5)

  • Additional properties are NOT allowed

Body

The data for the updated review

  • title string | null

    Title of the review

  • description string | null

    Content of the review (optional)

  • rating integer(int32)

    Rating for the hotel (1-5)

  • Additional properties are NOT allowed

Responses

  • 200

    Success

  • 204

    If the review is successfully updated

  • 400

    If the request data is invalid

  • 401

    User is not authenticated.

  • 403

    User is not authorized (not a guest, or didn't visit the hotel).

  • 404

    If the hotel or review is not found

PUT /api/hotels/{hotelId}/reviews/{reviewId}
curl \
 -X PUT http://api.example.com/api/hotels/{hotelId}/reviews/{reviewId} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"title":"string","description":"string","rating":42}'
curl \
 -X PUT http://api.example.com/api/hotels/{hotelId}/reviews/{reviewId} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: text/json"
curl \
 -X PUT http://api.example.com/api/hotels/{hotelId}/reviews/{reviewId} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/*+json"
Request example
{
  "title": "string",
  "description": "string",
  "rating": 42
}
Request examples
{
  "title": "string",
  "description": "string",
  "rating": 42
}
Request examples
{
  "title": "string",
  "description": "string",
  "rating": 42
}