storefrontEditGenerationJob
Requires permission storefront:storefront:update.
Poll an edit job. Jobs expire an hour after their last update. A job whose server stopped before it finished reads FAILED (CANCELLED if a cancel was asked for) about a minute after its last update.
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
query StorefrontEditGenerationJob($jobId: ID!) {
storefrontEditGenerationJob(jobId: $jobId) {
status
costDisplay
creditsUsedCents
error
jobId
partial
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query StorefrontEditGenerationJob($jobId: ID!) {\n storefrontEditGenerationJob(jobId: $jobId) {\n status\n costDisplay\n creditsUsedCents\n error\n jobId\n partial\n }\n}",
"variables": {
"jobId": "id"
}
}
EOF
Variables:
{
"jobId": "id"
}
Response:
{
"data": {
"storefrontEditGenerationJob": {
"status": "CANCELLED",
"costDisplay": "string",
"creditsUsedCents": 0,
"error": "string",
"jobId": "id",
"partial": "string"
}
}
}
storefrontEditGenerationJob(
jobId: ID!
): StorefrontEditJob!
Arguments
storefrontEditGenerationJob.jobId ● ID! non-null scalar
The edit job to read, as startStorefrontEditGeneration returned it.
Type
StorefrontEditJob object
A started storefront edit.