Skip to main content

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.

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

Success response


{
"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"
}
}
PATCH /ecommerce/v1/reviews/:id

Authorization

type: oauth2flow: clientCredentialsscopes: reviews:read,reviews:write

Request

Bearer Token
id — path required
Body required
{
"itemId": 0,
"rating": 0,
"title": "string",
"description": "string",
"image": [
"string"
],
"isLiked": true,
"isDisliked": true
}
curl -L -X PATCH 'https://posbytz.github.io/ecommerce/v1/reviews/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"itemId": 0,
"rating": 0,
"title": "string",
"description": "string",
"image": [
"string"
],
"isLiked": true,
"isDisliked": true
}'