Submit a review
POST
/cms/product/{id}/reviews
const url = 'https://api.example.com/cms/product/1/reviews';const options = { method: 'POST', headers: { 'API-Key': '<API-Key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"rating":1,"body":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.example.com/cms/product/1/reviews \ --header 'API-Key: <API-Key>' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "rating": 1, "body": "example" }'Only customers with a paid order of the product can review it, once. The review is pending until approved by a moderator.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
rating
required
integer
body
required
string
Example generated
{ "rating": 1, "body": "example"}Responses
Section titled “Responses”Review created (pending moderation)
Media typeapplication/json
Product Review
A customer review of a product. Only approved reviews are listed publicly.
object
id
Review ID
integer format: int64
product_id
Product ID
integer format: int64
author_name
Public name of the reviewer (nickname, display name, or first and last name)
string
rating
Rating
integer
body
Review text (plain text)
string
status
Moderation status
string
timestamp
Submission date
string format: date-time
last_edited
Last edit by the customer
string format: date-time
Example
{ "status": "pending"}INVALID_RATING, REVIEW_BODY_REQUIRED or REVIEW_BODY_TOO_LONG
REVIEWS_DISABLED or PURCHASE_REQUIRED
Product not found or not available
REVIEW_ALREADY_EXISTS