Skip to content

Create a review

POST
/stores/{storeRef}/reviews
curl --request POST \
--url https://apibase.ecomweb.app/api/v1/stores/example/reviews \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "product_id": 1, "product_name": "example", "variant_id": 1, "variant_name": "example", "order_id": 1, "order_number": 1, "user_id": "example", "reviewer_name": "example", "reviewer_email": "example", "reviewer_avatar": "example", "is_verified_buyer": false, "rating": 1, "title": "example", "content": "example", "pros": [ "example" ], "cons": [ "example" ], "media": [ {} ], "status": "PENDING", "moderation_notes": "example", "is_featured": false, "is_pinned": false, "display_order": 1, "external_review_id": "example", "review_date": "example" }'

Creates a review for a product. The review is PENDING unless you send another status. The body is not validated beyond what the database requires, so send the required fields with the right types.

Required scopes: write:reviews

storeRef
required
string

The store’s ref, as returned by GET /stores.

Media typeapplication/json
object
product_id
required

ID of the reviewed product.

number
product_name
required

Name of the reviewed product.

string
variant_id

ID of the reviewed variant.

number
nullable
variant_name

Name of the reviewed variant.

string
nullable
order_id

ID of the order the review is about.

number
nullable
order_number

Number of the order the review is about.

number
nullable
user_id

ID of the customer account that wrote the review.

string
nullable
reviewer_name
required

Reviewer’s name, up to 100 characters.

string
<= 100 characters
reviewer_email
required

Reviewer’s email, up to 255 characters.

string
<= 255 characters
reviewer_avatar

URL of the reviewer’s avatar.

string
nullable
is_verified_buyer

Whether the reviewer bought the product from the store. Defaults to false.

boolean
rating
required

Star rating, 1 to 5.

number
>= 1 <= 5
title

Review title, up to 200 characters.

string
nullable <= 200 characters
content
required

Review text.

string
pros

What the reviewer liked.

Array<string>
cons

What the reviewer disliked.

Array<string>
media

Photos or other media: a list of objects such as { "url": "https://...", "type": "image" }.

Array<object>
object
key
additional properties
any
status

Moderation status. Defaults to PENDING.

string
default: PENDING
Allowed values: PENDING APPROVED REJECTED HIDDEN
moderation_notes

Internal moderation notes.

string
nullable
is_featured

Whether the review is featured. Defaults to false.

boolean
is_pinned

Whether the review is pinned to the top of the list. Defaults to false.

boolean
display_order

Position used when sorting by display_order.

number
nullable
external_review_id

The review’s ID on the platform it came from.

string
nullable <= 255 characters
review_date

The date shown for the review, as an ISO 8601 timestamp.

string
nullable
Media typeapplication/json
object
variant_id

ID of the reviewed variant, or null.

number
nullable
variant_name

Name of the reviewed variant, or null.

string
nullable
order_id

ID of the order the review is about, or null.

number
nullable
order_number

Number of the order the review is about, or null.

number
nullable
user_id

ID of the customer account that wrote the review, or null.

string
nullable
reviewer_avatar

URL of the reviewer’s avatar, or null.

string
nullable
title

Review title, or null.

string
nullable
media
required

Photos or other media attached to the review: a list of objects such as { "url": "https://...", "type": "image" }.

Array<object>
object
key
additional properties
any
status
required

Moderation status: PENDING, APPROVED, REJECTED or HIDDEN. Only APPROVED reviews are shown to shoppers.

string
Allowed values: PENDING APPROVED REJECTED HIDDEN
moderation_notes

Internal moderation notes, or null.

string
nullable
approved_by

ID of the user who approved the review, or null.

string
nullable
approved_at

When the review was approved, as an ISO 8601 timestamp, or null.

string
nullable
rejected_reason

Why the review was rejected, or null.

string
nullable
display_order

Position used when sorting by display_order, or null.

number
nullable
external_review_id

The review’s ID on the platform it was imported from, or null.

string
nullable
review_date

The date shown for the review, as an ISO 8601 timestamp, or null. Imported reviews keep their original date here.

string
nullable
deleted_at

When the review was deleted. Always null on reviews you can read.

string
nullable
review_replies

The review’s replies. Present only when replies are requested with include_replies on the list route.

Array<object>
object
deleted_at

When the reply was deleted. Always null on replies you can read.

string
nullable
id
required

Reply ID.

string
review_id
required

ID of the review the reply answers.

string
content
required

Reply text.

string
author_id
required

ID of the user who wrote the reply.

string
author_name
required

Name shown as the reply’s author.

string
is_visible
required

Whether the reply is shown to shoppers.

boolean
created_at
required

When the reply was created, as an ISO 8601 timestamp.

string
updated_at
required

When the reply was last updated, as an ISO 8601 timestamp.

string
id
required

Review ID.

string
product_id
required

ID of the reviewed product.

number
product_name
required

Name of the reviewed product when the review was written.

string
reviewer_name
required

Reviewer’s name.

string
reviewer_email
required

Reviewer’s email.

string
is_verified_buyer
required

Whether the reviewer bought the product from the store.

boolean
rating
required

Star rating, 1 to 5.

number
content
required

Review text.

string
pros
required

What the reviewer liked.

Array<string>
cons
required

What the reviewer disliked.

Array<string>
is_featured
required

Whether the review is featured.

boolean
is_pinned
required

Whether the review is pinned to the top of the list.

boolean
created_at
required

When the review was created, as an ISO 8601 timestamp.

string
updated_at
required

When the review was last updated, as an ISO 8601 timestamp.

string

Example

{
"status": "PENDING"
}

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}