Skip to main content

startStorefrontPageGeneration

Requires permission storefront:storefront:update.

Start an async job that plans a storefront page from the seller's sentence (and reference images): several built-in library sections filled with the store's own categories, brands and journey links. Returns a jobId immediately — poll storefrontPageGenerationJob(jobId) until COMPLETED/FAILED/CANCELLED. Writes nothing: the result is an import the theme editor proposes. Meters AI credits when it runs.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation StartStorefrontPageGeneration($input: StartStorefrontPageInput!) {
startStorefrontPageGeneration(input: $input) {
status
costDisplay
creditsUsedCents
error
jobId
page
}
}

Variables:

{
"input": {
"request": "string"
}
}

Response:

{
"data": {
"startStorefrontPageGeneration": {
"status": "CANCELLED",
"costDisplay": "string",
"creditsUsedCents": 0,
"error": "string",
"jobId": "id",
"page": {}
}
}
}
startStorefrontPageGeneration(
input: StartStorefrontPageInput!
): StorefrontPageJob!

Arguments​

startStorefrontPageGeneration.input ● StartStorefrontPageInput! non-null input​

The details of the storefront page to start.

Type​

StorefrontPageJob object​

A started storefront page generation.