{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/woolworths-group/main/json-schema/woolworths-group-product-dto-schema.json",
  "title": "ProductDto",
  "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/ProductDto",
  "required": [
    "brand",
    "descriptions",
    "designs",
    "fulfillmentInfo",
    "lastModificationTime",
    "name",
    "price",
    "productId",
    "productStatus",
    "productType",
    "programId",
    "redemptionInfo",
    "sendAsGift",
    "termsAndConditions",
    "validityInYears"
  ],
  "type": "object",
  "properties": {
    "productId": {
      "type": "string",
      "description": "Unique Identifier of the product",
      "format": "uuid"
    },
    "brand": {
      "minLength": 1,
      "type": "string",
      "description": "Brand of the product"
    },
    "productType": {
      "$ref": "#/$defs/ProductType"
    },
    "productStatus": {
      "$ref": "#/$defs/ProductStatus"
    },
    "descriptions": {
      "type": "array",
      "description": "Range of descriptions available for the Product",
      "items": {
        "$ref": "#/$defs/DescriptionDto"
      }
    },
    "programId": {
      "type": "string",
      "description": "Program Identifier of the product",
      "format": "uuid"
    },
    "sendAsGift": {
      "type": "boolean",
      "description": "Flag that indicates if Product can be sent as a Gift to someone else"
    },
    "name": {
      "minLength": 1,
      "type": "string",
      "description": "Name of the product"
    },
    "isThirdParty": {
      "type": "boolean",
      "description": "Flag that indicates if Program is 1P or 3P"
    },
    "designs": {
      "type": "array",
      "description": "Range of designs available for the Product",
      "items": {
        "$ref": "#/$defs/ProductDesignDto"
      }
    },
    "validityInYears": {
      "type": "integer",
      "format": "int32"
    },
    "termsAndConditions": {
      "$ref": "#/$defs/TermsAndConditionsDto"
    },
    "swapInfo": {
      "$ref": "#/$defs/SwapInfoDto"
    },
    "redemptionInfo": {
      "$ref": "#/$defs/RedemptionInfoDto"
    },
    "activationInfo": {
      "$ref": "#/$defs/ActivationInfoDto"
    },
    "fulfillmentInfo": {
      "$ref": "#/$defs/FulfillmentInfoDto"
    },
    "denomination": {
      "$ref": "#/$defs/DenominationDto"
    },
    "lastModificationTime": {
      "type": "string",
      "description": "Last modified timestamp leveraged for caching",
      "format": "date-time"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ActivationInfoDto": {
      "required": [
        "activationUrl"
      ],
      "type": "object",
      "properties": {
        "activationUrl": {
          "minLength": 1,
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "AssetDto": {
      "required": [
        "images"
      ],
      "type": "object",
      "properties": {
        "images": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImageDto"
          }
        }
      },
      "additionalProperties": false
    },
    "BarcodeType": {
      "type": "string",
      "description": "Type of barcode used by the Product",
      "enum": [
        "CODE128",
        "CA128",
        "TWOD_QRCODE",
        "TWOD_PDF417",
        "ONED_CA128"
      ]
    },
    "DeliveryMode": {
      "type": "string",
      "description": "Mode of delivery",
      "enum": [
        "DIGITAL",
        "PHYSICAL"
      ]
    },
    "DenominationDto": {
      "required": [
        "denominationType",
        "maximum",
        "minimum",
        "values"
      ],
      "type": "object",
      "properties": {
        "denominationType": {
          "$ref": "#/$defs/DenominationType"
        },
        "minimum": {
          "maximum": 1000,
          "minimum": 0.01,
          "type": "number",
          "description": "Minimum Denomination value of the Product",
          "format": "double"
        },
        "maximum": {
          "minimum": 0.01,
          "type": "number",
          "description": "Maximum Denomination value of the Product",
          "format": "double"
        },
        "values": {
          "type": [
            "array",
            "null"
          ],
          "description": "Recommended Denominations value for the Product. For Fixed Denomination Products, this will only contain one value.",
          "items": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "additionalProperties": false
    },
    "DenominationType": {
      "type": "string",
      "enum": [
        "FIXED",
        "VARIABLE"
      ]
    },
    "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"
      ]
    },
    "DesignStatus": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ]
    },
    "DigitalDeliveryMode": {
      "type": "string",
      "description": "Type of digital delivery available for the Digital Product",
      "enum": [
        "SMS",
        "EMAIL",
        "SMS_AND_EMAIL"
      ]
    },
    "FulfillmentInfoDto": {
      "type": "object",
      "properties": {
        "deliveryInfo": {
          "$ref": "#/$defs/ProductDeliveryInfoDto"
        },
        "barcodeType": {
          "$ref": "#/$defs/BarcodeType"
        }
      },
      "additionalProperties": false
    },
    "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"
      ]
    },
    "InstructionDto": {
      "required": [
        "label",
        "value"
      ],
      "type": "object",
      "properties": {
        "label": {
          "minLength": 1,
          "type": "string",
          "description": "Label identifier of the instruction"
        },
        "value": {
          "minLength": 1,
          "type": "string",
          "description": "Text value of the instruction"
        }
      },
      "additionalProperties": false
    },
    "PhysicalDeliveryMode": {
      "type": "string",
      "enum": [
        "AUSPOST",
        "COURIER"
      ]
    },
    "ProductDeliveryInfoDto": {
      "required": [
        "deliveryMode"
      ],
      "type": "object",
      "properties": {
        "deliveryMode": {
          "$ref": "#/$defs/DeliveryMode"
        },
        "digitalDeliveryMode": {
          "$ref": "#/$defs/DigitalDeliveryMode"
        },
        "physicalDeliveryMode": {
          "$ref": "#/$defs/PhysicalDeliveryMode"
        }
      },
      "additionalProperties": false
    },
    "ProductDesignDto": {
      "required": [
        "assets",
        "designId",
        "name",
        "status"
      ],
      "type": "object",
      "properties": {
        "isHeroDesign": {
          "type": "boolean",
          "description": "Flag that indicates if this design is the hero design"
        },
        "designId": {
          "minLength": 1,
          "type": "string",
          "description": "Unique Identifier of the design"
        },
        "status": {
          "$ref": "#/$defs/DesignStatus"
        },
        "name": {
          "minLength": 1,
          "type": "string",
          "description": "Name of the Design"
        },
        "assets": {
          "$ref": "#/$defs/AssetDto"
        }
      },
      "additionalProperties": false
    },
    "ProductStatus": {
      "type": "string",
      "description": "Status of the Product",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ]
    },
    "ProductType": {
      "type": "string",
      "description": "Flag that indicates if the product is SWAP or GIFTCARD",
      "enum": [
        "GIFTCARD",
        "SWAP"
      ]
    },
    "RedemptionChannel": {
      "type": "string",
      "description": "Channels where the Program can be redeemed",
      "enum": [
        "ONLINE",
        "INSTORE",
        "ONLINE_AND_INSTORE"
      ]
    },
    "RedemptionExclusion": {
      "type": "string",
      "description": "Categories on which redemption is restricted",
      "enum": [
        "ALCOHOL",
        "TOBACCO",
        "LOTTERY_PRODUCTS",
        "PHARMACEUTICAL_PRODUCTS",
        "GIFTCARDS",
        "VOUCHERS",
        "DONATIONS"
      ]
    },
    "RedemptionInfoDto": {
      "required": [
        "allowedRedemptionMethods",
        "redemptionInstructions"
      ],
      "type": "object",
      "properties": {
        "redemptionStores": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/RedemptionStore"
          }
        },
        "redemptionInstructions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RedemptionInstructionDto"
          }
        },
        "redemptionExclusions": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/RedemptionExclusion"
          }
        },
        "allowedRedemptionMethods": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RedemptionMethod"
          }
        },
        "redemptionChannel": {
          "$ref": "#/$defs/RedemptionChannel"
        }
      },
      "additionalProperties": false
    },
    "RedemptionInstructionDto": {
      "type": "object",
      "properties": {
        "contentId": {
          "type": [
            "string",
            "null"
          ]
        },
        "instructionType": {
          "$ref": "#/$defs/RedemptionInstructionType"
        },
        "instructions": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/InstructionDto"
          }
        }
      },
      "additionalProperties": false
    },
    "RedemptionInstructionType": {
      "type": "string",
      "description": "Type of instruction",
      "enum": [
        "DEFAULT",
        "WEB",
        "MOBILE"
      ]
    },
    "RedemptionMethod": {
      "type": "string",
      "description": "Type of redemption methods available to this product",
      "enum": [
        "ACTIVATIONURL",
        "BARCODE",
        "PIN",
        "ACCESSCODEONLY"
      ]
    },
    "RedemptionStore": {
      "type": "string",
      "description": "Store(s) where the Product can be redeemed",
      "enum": [
        "NO_INTERNAL_BANNER",
        "EVERYDAY_REWARDS_SHOP",
        "WOOLWORTHS_SUPERMARKETS",
        "WOOLWORTHS_METRO",
        "BIGW",
        "BWS",
        "DAN_MURPHY",
        "EG_AMPOL"
      ]
    },
    "SwapInfoDto": {
      "type": "object",
      "properties": {
        "swapPrograms": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/SwapProgramDto"
          }
        },
        "swapProducts": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/SwapProductDto"
          }
        }
      },
      "additionalProperties": false,
      "description": "Swap information if this Product is a SWAP"
    },
    "SwapProductDto": {
      "required": [
        "assets",
        "name",
        "productId",
        "programId"
      ],
      "type": "object",
      "properties": {
        "name": {
          "minLength": 1,
          "type": "string",
          "description": "Name of the Product"
        },
        "description": {
          "$ref": "#/$defs/DescriptionDto"
        },
        "assets": {
          "$ref": "#/$defs/AssetDto"
        },
        "programId": {
          "type": "string",
          "format": "uuid"
        },
        "productId": {
          "type": "string",
          "format": "uuid"
        }
      },
      "additionalProperties": false,
      "description": "Details of the Product that can be pruchased via a Swap exchange"
    },
    "SwapProgramDto": {
      "required": [
        "assets",
        "name",
        "programId",
        "status"
      ],
      "type": "object",
      "properties": {
        "name": {
          "minLength": 1,
          "type": "string",
          "description": "Name of the Program"
        },
        "description": {
          "$ref": "#/$defs/DescriptionDto"
        },
        "assets": {
          "$ref": "#/$defs/AssetDto"
        },
        "programId": {
          "type": "string",
          "format": "uuid"
        },
        "status": {
          "$ref": "#/$defs/SwapProgramStatus"
        }
      },
      "additionalProperties": false,
      "description": "Details of the Program that can be pruchased via a Swap exchange"
    },
    "SwapProgramStatus": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ]
    },
    "TermsAndConditionsDto": {
      "required": [
        "instructions"
      ],
      "type": "object",
      "properties": {
        "instructions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DescriptionDto"
          }
        }
      },
      "additionalProperties": false,
      "description": "Terms and conditions associated with the Product"
    }
  }
}