Skip to content

Create a Product Review

Endpoint: https://api.youcan.shop/products/{id}/reviews

Method: POST

Required Scopes

  • edit-products-review

URL Parameters

  • id: Product id

Body

Param NameParam TypeDescriptionRequired
ratingsintegerProduct review ratings are between zero and fiveyes
emailstringProduct reviewer's email addressyes
first_namestringProduct reviewer's first nameyes
last_namestringProduct reviewer's last nameno
contentstringProduct reviewer's last nameno
imagesFile[]Product review imagesno

Responses

[201] Review successfully created

json
{
    "id": "040f993d-76b9-4309-a63d-1fa260f817df",
    "ratings": 3,
    "first_name": "Mohamed",
    "last_name": "",
    "content": "",
    "images_urls": [],
    "created_at": "2021-04-21T12:14:50+00:00"
}

[422] Unprocessable entity

json
{
    "ratings": [
        "The ratings field is required."
    ]
}

[404] Product not found