Create Review
Create a new product review.
Endpoint
POST /api/reviews/createRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
| storeId | string | Yes | Store ID |
| product | object | Yes | Product info (id, name, image) |
| customer | object | Yes | Customer info (id, firstname, lastname) |
| content | string | Yes | Review content |
| images | array | No | Array of image URLs |
| rating | number | Yes | Rating (0-5) |
| published | boolean | No | Published 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!",
...
}
}