Open a store to the public
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/open';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"delete_sample_products":true}'};
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://apibase.ecomweb.app/api/v1/stores/example/open \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "delete_sample_products": true }'Takes the store off the coming soon page so visitors can see the storefront. It fails with 409 SETUP_INCOMPLETE until the setup guide’s can_open is true. Set delete_sample_products to remove untouched sample products first. The first time a store opens, the store-ready email is sent to the owner. Returns the updated setup guide.
Required scopes: write:settings
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Delete the sample products nobody has edited before opening
Example generated
{ "delete_sample_products": true}Responses
Section titled “Responses”object
When the store was first opened, as an ISO 8601 timestamp, or null.
When setup was ended without opening, as an ISO 8601 timestamp, or null.
The setup steps and which are done.
object
product, shipping, payment, theme or domain.
Whether the step must be done before the store can open.
Whether the step is done.
Summary of the shipping rates.
object
The nationwide rate as a decimal string, or null.
The order amount above which shipping is free, as a decimal string, or null.
Number of shipping rates.
The payment methods that are turned on.
The store’s custom domain, or null.
ID of the live theme, or null.
Name of the live theme, or null.
The starter theme the live theme was copied from, meridian or default, or null.
True while visitors see the coming soon page.
Whether the guide is hidden in the dashboard.
Number of required steps still to do.
Whether the store can be opened now.
Number of untouched sample products.
Number of active products the merchant added.
Example
{ "steps": [ { "id": "product" } ], "live_theme_source": "meridian"}The request is malformed or failed validation.
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 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"}The request conflicts with the resource’s current state.
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"}