MobiariDocs
Storefront APIEngagement

Submit a product review

POST
/storefront-api/{store_slug}/api/products/{product_ref}/reviews

Stored as pending when the store moderates reviews, approved otherwise. Marked as a verified purchase when the e-mail bought the product in this store.

Path Parameters

store_slug*string

Store slug

product_ref*string

Product slug or id

Header Parameters

Idempotency-Key?string

A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/storefront-api/string/api/products/string/reviews" \  -H "Content-Type: application/json" \  -d '{    "author_email": "string",    "author_name": "string",    "body": "string",    "rating": 0  }'
{
  "author_email": "string",
  "author_name": "string",
  "body": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "is_verified_purchase": true,
  "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
  "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
  "rating": 0,
  "status": "pending",
  "store_id": "7fe87115-950c-4ae8-bd7e-970406bc9ac0",
  "title": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}