Skip to main content
POST
/
reviews
Create review
curl --request POST \
  --url https://store.salesive.com/api/v1/reviews \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-shop-id: <api-key>' \
  --data '
{
  "productId": "<string>",
  "rating": 3,
  "comment": "<string>",
  "orderId": "<string>"
}
'

Request

POST /reviews
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
Content-Type: application/json

{
  "productId": "68e5bb463a1fc56a8ac150bf",
  "orderId": "690ff00acf4de460fd1f6114",
  "rating": 5,
  "comment": "Excellent product! Very satisfied with the quality."
}

Headers

HeaderTypeDescription
AuthorizationstringProvide the customer token as Bearer <jwt>.
x-shop-idstringIdentify the shop.
Content-TypestringAlways set to application/json.

Body parameters

FieldTypeRequiredDescription
productIdstringYesProduct identifier to review.
orderIdstringYesOrder ID that includes the product.
ratingintegerYesRating from 1 to 5.
titlestringNoReview title.
commentstringNoReview text.
imagesarrayNoArray of image URLs to attach to the review.

Successful response

{
    "status": 200,
    "success": true,
    "message": "Review created successfully",
    "data": {
        "_id": "6a27d8d4289b87893fcbdeca",
        "rating": 5,
        "title": "Great Product",
        "comment": "I loved this product, it was amazing!",
        "shop": "68b8f52575da81b332af29f1",
        "user": "69360693a7a8f7dc8ae32d6d",
        "product": "68bc52f0e15404b8e40a7c52",
        "order": "6938414ad9485f4d96134f8c",
        "images": [],
        "createdAt": "2026-06-09T09:11:48.272Z",
        "updatedAt": "2026-06-09T09:11:48.272Z",
        "__v": 0
    }
}

Error response

{
    "status": 400,
    "success": false,
    "message": "You can only review products from completed orders",
    "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Body

application/json
productId
string
required
rating
integer
required
Required range: 1 <= x <= 5
comment
string
required
orderId
string

Response

201

Review created