Skip to main content
PUT
/
reviews
/
{reviewId}
update
curl --request PUT \
  --url http://localhost:8000/v1/reviews/{reviewId} \
  --header 'Content-Type: application/json' \
  --data '
{
  "rating": 5,
  "review": "A newer review"
}
'
{
  "data": {
    "updatedReview": {
      "__v": 0,
      "_id": "670e317b59f06fc0a2501117",
      "book": "670e2ce78296c4aa4d1374ad",
      "createdAt": "2024-10-15T09:10:19.964Z",
      "downvoters": [],
      "isRemoved": false,
      "rating": 5,
      "review": "A newer review",
      "reviewer": "6708d54f9c193b2aeae09b80",
      "updatedAt": "2024-10-15T09:33:24.339Z",
      "upvoters": []
    }
  },
  "error": null
}

Path Parameters

reviewId
string
required
Example:

"670e317b59f06fc0a2501117"

Body

application/json
rating
number
Example:

5

review
string
Example:

"A newer review"

Response

update - success

data
object
error
unknown