{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-create-variation-status-response-schema.json",
  "title": "CreateVariationStatusResponse",
  "description": "Status response for the create-variation API.\nReturned when polling the job status URL.\n\nSupports \"succeeded\", and \"failed\" statuses.\nper the Firefly Services API Style Guide async response conventions.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-express-openapi.yml#/components/schemas/CreateVariationStatusResponse",
  "type": "object",
  "properties": {
    "variationRequestId": {
      "description": "The client-provided identifier from the request, echoed back if one was supplied.\nFor single create-variation calls the jobId (inherited from JobStatusResponse)\nis the primary correlation key; this field is a convenience pass-through.",
      "type": "string"
    },
    "outputs": {
      "description": "The successfully generated outputs.\nPresent when status is \"succeeded\".",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ImageOutputResult"
      }
    },
    "errors": {
      "description": "Details of outputs that failed to generate.\nPresent when status is \"partially_succeeded\" or \"failed\".",
      "type": "array",
      "items": {
        "$ref": "#/$defs/OutputError"
      }
    },
    "jobId": {
      "description": "The identifier of the job.",
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/JobStatus",
      "description": "The status of the job."
    }
  },
  "required": [
    "jobId",
    "status"
  ],
  "$defs": {
    "ImageOutputResult": {
      "description": "Result of a successful image rendition output.",
      "type": "object",
      "properties": {
        "type": {
          "description": "Discriminator indicating this is an image output result.",
          "type": "string",
          "enum": [
            "image"
          ]
        },
        "mediaType": {
          "$ref": "#/$defs/ImageRenditionFormat",
          "description": "The media type of the generated image rendition."
        },
        "pageNumber": {
          "description": "The page number from which this rendition was generated.",
          "type": "number"
        },
        "destination": {
          "$ref": "#/$defs/UrlResource",
          "description": "The location where the image rendition can be downloaded from."
        }
      },
      "required": [
        "destination",
        "mediaType",
        "pageNumber",
        "type"
      ]
    },
    "ImageRenditionFormat": {
      "description": "The format of the bitmap rendition.",
      "enum": [
        "image/jpeg",
        "image/png"
      ],
      "type": "string"
    },
    "JobStatus": {
      "description": "Various statuses of a job.",
      "enum": [
        "cancel_requested",
        "cancelled",
        "failed",
        "partially_succeeded",
        "pending",
        "running",
        "succeeded"
      ],
      "type": "string"
    },
    "OutputError": {
      "description": "Error details for a specific output that failed during a create-variation operation.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The output type that failed.",
          "enum": [
            "document",
            "image"
          ],
          "type": "string"
        },
        "pageNumber": {
          "description": "The page number associated with the failure, if applicable.",
          "type": "number"
        },
        "error_code": {
          "description": "The error code.",
          "type": "string"
        },
        "message": {
          "description": "The error message.",
          "type": "string"
        },
        "validation_errors": {
          "description": "Validation error messages.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "error_code"
      ]
    },
    "UrlResource": {
      "description": "A Resource object referencing an asset via a pre-signed URL.\nUsed for customer-supplied storage or Adobe-owned temporary storage.",
      "type": "object",
      "properties": {
        "url": {
          "description": "An absolute pre-signed URL used to GET an input asset or PUT an output asset.\nAllowed domains include AWS S3, Azure Blob Storage, and Dropbox.",
          "type": "string"
        },
        "storageType": {
          "description": "Required only for output parameters when the URL targets\nAzure BlobStore or Dropbox storage.",
          "enum": [
            "Azure",
            "Dropbox"
          ],
          "type": "string"
        }
      },
      "required": [
        "url"
      ]
    }
  }
}