Skip to content
On this page

Create Review ​

Create a new product review.

Endpoint ​

POST /api/reviews/create

Request Body ​

FieldTypeRequiredDescription
storeIdstringYesStore ID
productobjectYesProduct info (id, name, image)
customerobjectYesCustomer info (id, firstname, lastname)
contentstringYesReview content
imagesarrayNoArray of image URLs
ratingnumberYesRating (0-5)
publishedbooleanNoPublished status

Example ​

json
{
  "product": {
    "_id": "product_id",
    "name": "Product Name",
    "image": "https://cdn.example.com/product.jpg"
  },
  "customer": {
    "_id": "customer_id",
    "firstname": "John",
    "lastname": "Doe"
  },
  "content": "Great product!",
  "images": ["https://cdn.example.com/review1.jpg"],
  "rating": 5,
  "published": true
}

Response ​

json
{
  "status": "success",
  "data": {
    "_id": "string",
    "content": "Great product!",
    ...
  }
}

Released under the MIT License.