{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-product-images-schema.json",
  "title": "ProductImages",
  "description": "Document containing only the image groups for a product. Contains no price, availability, or other non-image data.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-shopper-products-api-openapi.yml#/components/schemas/ProductImages",
  "properties": {
    "id": {
      "$ref": "#/$defs/ProductId"
    },
    "imageGroups": {
      "description": "Array of image groups for this product. Each group corresponds to a view type and optionally to specific variation attribute values.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ImageGroup"
      }
    }
  },
  "required": [
    "id"
  ],
  "type": "object",
  "$defs": {
    "Image": {
      "description": "Product image",
      "properties": {
        "alt": {
          "description": "The localized alternative text of the image.",
          "type": "string"
        },
        "disBaseLink": {
          "description": "Base URL for the Dynamic Image Service (DIS) address. This is only shown if the image is stored on the server and DIS is enabled.",
          "type": "string"
        },
        "link": {
          "minLength": 1,
          "description": "The URL of the actual image.",
          "type": "string"
        },
        "title": {
          "description": "The localized title of the image.",
          "type": "string"
        }
      },
      "required": [
        "link"
      ],
      "type": "object"
    },
    "ImageGroup": {
      "description": "Document representing an image group containing a list of images for a particular view type and an optional variation value.",
      "properties": {
        "images": {
          "description": "The images of the image group.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Image"
          }
        },
        "variationAttributes": {
          "description": "Returns a list of variation attributes applying to this image group.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/VariationAttribute"
          }
        },
        "viewType": {
          "description": "The image view type.",
          "type": "string"
        }
      },
      "required": [
        "images",
        "viewType"
      ],
      "type": "object"
    },
    "ProductId": {
      "minLength": 1,
      "maxLength": 100,
      "type": "string",
      "description": "The id (SKU) of the product."
    },
    "VariationAttribute": {
      "description": "Document representing a variation attribute.",
      "properties": {
        "id": {
          "minLength": 1,
          "description": "The ID of the variation attribute.",
          "type": "string"
        },
        "name": {
          "description": "The localized display name of the variation attribute.",
          "type": "string"
        },
        "values": {
          "description": "The sorted array of variation values. This array can be empty.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/VariationAttributeValue"
          }
        }
      },
      "required": [
        "id"
      ],
      "type": "object"
    },
    "VariationAttributeValue": {
      "description": "Document representing a variation attribute value.",
      "properties": {
        "description": {
          "description": "The localized description of the variation value.",
          "type": "string"
        },
        "image": {
          "description": "The first product image for the configured viewtype and this variation value.",
          "allOf": [
            {
              "$ref": "#/$defs/Image"
            }
          ]
        },
        "imageSwatch": {
          "description": "The first product image for the configured viewtype and this variation value (typically the swatch image).",
          "allOf": [
            {
              "$ref": "#/$defs/Image"
            }
          ]
        },
        "name": {
          "description": "The localized display name of the variation value.",
          "type": "string"
        },
        "orderable": {
          "description": "A flag indicating whether at least one variant with this variation attribute value is available to sell.",
          "type": "boolean"
        },
        "value": {
          "minLength": 1,
          "description": "The actual variation value.",
          "type": "string"
        }
      },
      "required": [
        "value"
      ],
      "type": "object"
    }
  }
}