Skip to content

Approve or reject reviews in bulk

PUT
/stores/{storeRef}/reviews/bulk-moderate
curl --request PUT \
--url https://apibase.ecomweb.app/api/v1/stores/example/reviews/bulk-moderate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "review_ids": [ "example" ], "action": "APPROVE", "rejected_reason": "example", "moderation_notes": "example" }'

Approves or rejects up to 100 reviews at once. Each review is updated on its own, so one failure does not stop the others: the response counts the updates and lists a message for each failure, such as a review that does not exist. Approving records the key’s owner as the approver and clears any rejection reason. Product rating statistics are recalculated afterwards.

Required scopes: write:reviews

storeRef
required
string

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

Media typeapplication/json
object
review_ids
required

IDs of the reviews to moderate, from 1 to 100.

Array<string>
action
required

APPROVE or REJECT.

string
Allowed values: APPROVE REJECT
rejected_reason

Why the reviews are rejected. Used when action is REJECT.

string
moderation_notes

Internal notes to store on each review.

string
Media typeapplication/json
object
updated
required

Number of reviews updated.

number
failed
required

Number of reviews that could not be updated.

number
errors
required

One message for each review that failed, such as one that does not exist.

Array<string>

Example generated

{
"updated": 1,
"failed": 1,
"errors": [
"example"
]
}

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"
}