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:
- GraphQL
- cURL
mutation StartStorefrontPageGeneration($input: StartStorefrontPageInput!) {
startStorefrontPageGeneration(input: $input) {
status
costDisplay
creditsUsedCents
error
jobId
page
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation StartStorefrontPageGeneration($input: StartStorefrontPageInput!) {\n startStorefrontPageGeneration(input: $input) {\n status\n costDisplay\n creditsUsedCents\n error\n jobId\n page\n }\n}",
"variables": {
"input": {
"request": "string"
}
}
}
EOF
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.