Skip to main content

startStorefrontSectionGeneration

Requires permission storefront:storefront:update.

Start an async job that writes one storefront section (Liquid + CSS + editable fields) from the seller's sentence, or revises one (revise). Returns a jobId immediately — poll storefrontSectionGenerationJob(jobId) until COMPLETED/FAILED/CANCELLED. Writes nothing. 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 StartStorefrontSectionGeneration($input: StartStorefrontSectionInput!) {
startStorefrontSectionGeneration(input: $input) {
status
costDisplay
creditsUsedCents
error
jobId
partial
writing {
name
codeTail
key
}
}
}

Variables:

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

Response:

{
"data": {
"startStorefrontSectionGeneration": {
"status": "CANCELLED",
"costDisplay": "string",
"creditsUsedCents": 0,
"error": "string",
"jobId": "id",
"partial": "string",
"writing": {
"name": "string",
"codeTail": "string",
"key": "string"
}
}
}
}
startStorefrontSectionGeneration(
input: StartStorefrontSectionInput!
): StorefrontSectionJob!

Arguments​

startStorefrontSectionGeneration.input ● StartStorefrontSectionInput! non-null input​

The details of the storefront section to start.

Type​

StorefrontSectionJob object​

A storefront section generation.