Get a review invitation
const url = 'https://apibase.ecomweb.app/api/v1/public/stores/example/review-invitations/example';const options = { method: 'GET', headers: {'x-store-preview': 'example', 'x-storefront-api-key': '<x-storefront-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The invitation token, sent to the customer by email.
The store’s ref, as returned by GET /stores.
Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”object
Name of the variant to review, or null.
The invitation token.
Name of the product to review.
Number of the order the invitation belongs to.
Name of the customer who is invited.
Invitation status: OPENED for one that can still be answered, SUBMITTED once a review was sent, or EXPIRED.
When the invitation expires, as an ISO 8601 timestamp.
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.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
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.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The resource does not exist in this store.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}