{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/woolworths-group/main/json-schema/woolworths-group-program-dto-schema.json",
  "title": "ProgramDto",
  "x-generated": "2026-10-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/woolworths-group-wpay-gifting-client-openapi.yml#/components/schemas/ProgramDto",
  "required": [
    "descriptions",
    "designs",
    "lastModificationTime",
    "name",
    "programId",
    "redemptionChannel"
  ],
  "type": "object",
  "properties": {
    "programId": {
      "type": "string",
      "description": "Unique Identifier of the program",
      "format": "uuid"
    },
    "name": {
      "minLength": 1,
      "type": "string",
      "description": "Name of the Program"
    },
    "descriptions": {
      "type": "array",
      "description": "Range of descriptions based on the redendring device",
      "items": {
        "$ref": "#/$defs/DescriptionDto"
      }
    },
    "isThirdParty": {
      "type": "boolean",
      "description": "Flag that indicates if Program is 1P or 3P"
    },
    "categoryIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "designs": {
      "type": "array",
      "description": "Range of designs available for the Program",
      "items": {
        "$ref": "#/$defs/ProgramDesignDto"
      }
    },
    "lastModificationTime": {
      "type": "string",
      "description": "Last modified timestamp leveraged for caching",
      "format": "date-time"
    },
    "redemptionChannel": {
      "$ref": "#/$defs/RedemptionChannel"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AssetDto": {
      "required": [
        "images"
      ],
      "type": "object",
      "properties": {
        "images": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImageDto"
          }
        }
      },
      "additionalProperties": false
    },
    "DescriptionDto": {
      "type": "object",
      "properties": {
        "descriptionType": {
          "$ref": "#/$defs/DescriptionType"
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "DescriptionType": {
      "type": "string",
      "description": "Type of description",
      "enum": [
        "DEFAULT",
        "WEB",
        "MOBILE",
        "SHORT",
        "LONG"
      ]
    },
    "ImageDto": {
      "required": [
        "imageType",
        "location"
      ],
      "type": "object",
      "properties": {
        "imageType": {
          "$ref": "#/$defs/ImageType"
        },
        "location": {
          "minLength": 1,
          "type": "string",
          "description": "Web URL of the Image source"
        }
      },
      "additionalProperties": false,
      "description": "Image details"
    },
    "ImageType": {
      "type": "string",
      "description": "Type of image",
      "enum": [
        "WEB",
        "MOBILE",
        "THUMBNAIL",
        "DEFAULT"
      ]
    },
    "ProgramDesignDto": {
      "required": [
        "assets",
        "designId",
        "name"
      ],
      "type": "object",
      "properties": {
        "isHeroDesign": {
          "type": "boolean",
          "description": "Indicates if this design is a hero design"
        },
        "designId": {
          "minLength": 1,
          "type": "string",
          "description": "Unique identifier associated to the design"
        },
        "status": {
          "type": "string",
          "enum": [
            "ACTIVE",
            "INACTIVE"
          ]
        },
        "name": {
          "minLength": 1,
          "type": "string",
          "description": "Name of the Design"
        },
        "assets": {
          "$ref": "#/$defs/AssetDto"
        }
      },
      "additionalProperties": false,
      "description": "Designs associated to a program"
    },
    "RedemptionChannel": {
      "type": "string",
      "description": "Channels where the Program can be redeemed",
      "enum": [
        "ONLINE",
        "INSTORE",
        "ONLINE_AND_INSTORE"
      ]
    }
  }
}