Update Review
This API helps you to update an existing review for an item.
Path Parameters
- id string required
The Unique identifier of the review.
- application/json
Request Body required
- itemId number required
The Unique identifier of the item.
- rating number required
The review score out of 5.
- title string required
The title of the review.
- description string
The description of the review.
- image string[] required
The images associated with the review.
- isLiked boolean required
The boolean value, indicates whether the review is liked.
- isDisliked boolean required
The boolean value, indicates whether the review is disliked.
Responses
- 201
- 400
Success response
- application/json
- Example
{
"statusCode": 201,
"data": {
"itemId": 352184,
"rating": 3,
"title": "Best Item!",
"description": "...",
"image": [
"https://example.com/:imageId1",
"https://example.com/:imageId2"
],
"createdAt": "2022-10-25T06:44:09.702Z"
}
}
Validation error response
- application/json
- Example
{
"statusCode": 400,
"errors": {
"itemId": [
"itemId must be a number conforming to the specified constraints"
],
"rating": [
"rating must be a number conforming to the specified constraints"
],
"title": [
"title must be a string"
],
"description": [
"description must be a string"
],
"isLiked": [
"isLiked must be a boolean"
],
"isDisliked": [
"isDisliked must be a boolean"
]
},
"message": "Bad Request"
}