Skip to content

Get a review invitation

GET
/public/stores/{storeRef}/review-invitations/{token}
curl --request GET \
--url https://apibase.ecomweb.app/api/v1/public/stores/example/review-invitations/example \
--header 'x-store-preview: example' \
--header 'x-storefront-api-key: <x-storefront-api-key>'

Returns the product, order and customer name an invitation is for, so a review form can be shown. The invitation’s status is OPENED while it can be answered, SUBMITTED once a review was sent, and EXPIRED after its expiry date. Reading it marks the invitation as opened. An unknown token answers 404.

token
required
string

The invitation token, sent to the customer by email.

storeRef
required
string

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

x-store-preview
required
string
Media typeapplication/json
object
variant_name
required

Name of the variant to review, or null.

string
nullable
token
required

The invitation token.

string
product_name
required

Name of the product to review.

string
order_number
required

Number of the order the invitation belongs to.

string
customer_name
required

Name of the customer who is invited.

string
status
required

Invitation status: OPENED for one that can still be answered, SUBMITTED once a review was sent, or EXPIRED.

string
expires_at
required

When the invitation expires, as an ISO 8601 timestamp.

string

Example generated

{
"variant_name": "example",
"token": "example",
"product_name": "example",
"order_number": "example",
"customer_name": "example",
"status": "example",
"expires_at": "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"
}

The resource does not exist in this store.

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