{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/woolworths-group/main/json-schema/woolworths-group-order-info-dto-schema.json",
  "title": "OrderInfoDto",
  "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/OrderInfoDto",
  "required": [
    "clientOrderNumber",
    "giftItemsInfo"
  ],
  "type": "object",
  "properties": {
    "clientOrderNumber": {
      "minLength": 1,
      "type": "string",
      "description": "Unique order reference identifier you generate and supply"
    },
    "originalClientOrderNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "Used to associate related orders. For example, linking a refund to the original order."
    },
    "clientTransactionId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Client Transaction Id"
    },
    "invoiceNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "Unique invoice number for the order"
    },
    "paymentInfo": {
      "$ref": "#/$defs/PaymentInfoDto"
    },
    "customerInfo": {
      "$ref": "#/$defs/CustomerInfoDto"
    },
    "clientConsumerReferenceId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Client consumer reference to distinguish client's customer types types"
    },
    "clientCartId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Cart identifier for the order"
    },
    "clientApplicationId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Client application identifier to distinguish between different channels within the same merchant"
    },
    "giftItemsInfo": {
      "type": "array",
      "description": "Gift items within the order",
      "items": {
        "$ref": "#/$defs/OrderItemInfoDto"
      }
    },
    "storeId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Store identifier where the order is initiated from"
    },
    "orderNote": {
      "$ref": "#/$defs/NoteInfoDto"
    },
    "billingInfo": {
      "$ref": "#/$defs/BillingInfoDto"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AddressDto": {
      "required": [
        "country",
        "line1",
        "postalCode",
        "state",
        "suburb"
      ],
      "type": "object",
      "properties": {
        "line1": {
          "minLength": 1,
          "type": "string",
          "description": "Address Line 1"
        },
        "line2": {
          "type": [
            "string",
            "null"
          ],
          "description": "Address Line 2"
        },
        "suburb": {
          "minLength": 1,
          "type": "string",
          "description": "Suburb"
        },
        "state": {
          "minLength": 1,
          "type": "string",
          "description": "State"
        },
        "city": {
          "type": [
            "string",
            "null"
          ],
          "description": "City"
        },
        "postalCode": {
          "minLength": 1,
          "type": "string",
          "description": "Postal code"
        },
        "country": {
          "minLength": 1,
          "type": "string",
          "description": "Country"
        },
        "phone": {
          "type": [
            "string",
            "null"
          ],
          "description": "E.164 format phone number"
        },
        "extension": {
          "type": [
            "string",
            "null"
          ],
          "description": "Phone extension code"
        },
        "mobile": {
          "pattern": "^\\+[1-9]\\d{1,14}$",
          "type": [
            "string",
            "null"
          ],
          "description": "E.164 format Mobile number"
        }
      },
      "additionalProperties": false
    },
    "BillingInfoDto": {
      "required": [
        "address"
      ],
      "type": "object",
      "properties": {
        "firstName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Customer's first name"
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Customer's last name"
        },
        "address": {
          "$ref": "#/$defs/AddressDto"
        }
      },
      "additionalProperties": false
    },
    "CampaignInfoDto": {
      "required": [
        "campaignCode",
        "campaignType"
      ],
      "type": "object",
      "properties": {
        "campaignCode": {
          "minLength": 1,
          "type": "string",
          "description": "Campaign code used to identify the campaign applied"
        },
        "campaignDetails": {
          "type": [
            "string",
            "null"
          ],
          "description": "Details of the campaign that was applied"
        },
        "campaignType": {
          "$ref": "#/$defs/CampaignType"
        },
        "campaignValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "Value associated with the campaign"
        }
      },
      "additionalProperties": false
    },
    "CampaignType": {
      "type": "string",
      "enum": [
        "PERCENTAGE_DISCOUNT",
        "EXTRA_VALUE",
        "POINTS_PROMOTION"
      ]
    },
    "CurrencyCode": {
      "type": "string",
      "enum": [
        "AUD",
        "NZD"
      ]
    },
    "CustomerInfoDto": {
      "required": [
        "email"
      ],
      "type": "object",
      "properties": {
        "edrNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "Everyday Rewards number for EDD customers"
        },
        "customerId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Client Customer Id"
        },
        "email": {
          "minLength": 1,
          "type": "string",
          "description": "Customer Email",
          "format": "email"
        },
        "firstName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Customer's first name"
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Customer's last name"
        },
        "customerType": {
          "$ref": "#/$defs/CustomerType"
        },
        "accountId": {
          "type": [
            "string",
            "null"
          ],
          "description": "AccountId"
        }
      },
      "additionalProperties": false
    },
    "CustomerType": {
      "type": "string",
      "enum": [
        "REGISTERED",
        "GUEST"
      ]
    },
    "DeliverMode": {
      "type": "string",
      "enum": [
        "EMAIL",
        "SMS",
        "POST",
        "COURIER"
      ]
    },
    "DeliveryInfoDto": {
      "required": [
        "deliveryMode",
        "firstName"
      ],
      "type": "object",
      "properties": {
        "deliveryMode": {
          "$ref": "#/$defs/DeliverMode"
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "Recipient's email address when the delivery is to be made via email",
          "format": "email"
        },
        "mobile": {
          "pattern": "^\\+[1-9]\\d{1,14}$",
          "type": [
            "string",
            "null"
          ],
          "description": "Recipient's mobile number (E.164 format) when the delivery is to be made using SMS"
        },
        "firstName": {
          "minLength": 1,
          "type": "string",
          "description": "First name of the receipient"
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Last name of the receipient"
        },
        "address": {
          "$ref": "#/$defs/AddressDto"
        },
        "deliveryNote": {
          "type": [
            "string",
            "null"
          ],
          "description": "Delivery note when physical cards are being delivered"
        }
      },
      "additionalProperties": false
    },
    "DeliveryScheduleDto": {
      "required": [
        "scheduleType"
      ],
      "type": "object",
      "properties": {
        "scheduleType": {
          "$ref": "#/$defs/ScheduleType"
        },
        "deliveryDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Date (yyyy-mm-dd) the delivery is to be made for scheduled delivery",
          "format": "date"
        }
      },
      "additionalProperties": false
    },
    "DonationInfoDto": {
      "required": [
        "amount",
        "currencyCode",
        "organisationCode"
      ],
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "description": "Donation amount included in the order payment",
          "format": "double"
        },
        "currencyCode": {
          "$ref": "#/$defs/CurrencyCode"
        },
        "organisationCode": {
          "minLength": 1,
          "type": "string",
          "description": "Organisation code that the donation has been made to"
        }
      },
      "additionalProperties": false
    },
    "NoteInfoDto": {
      "required": [
        "detail"
      ],
      "type": "object",
      "properties": {
        "detail": {
          "minLength": 1,
          "type": "string",
          "description": "Note added to the order"
        },
        "operatorId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Operator identifier of the operator who added the note"
        }
      },
      "additionalProperties": false
    },
    "OrderItemFulfillmentInfoDto": {
      "required": [
        "deliveryInfo",
        "deliverySchedule",
        "senderInfo"
      ],
      "type": "object",
      "properties": {
        "senderInfo": {
          "$ref": "#/$defs/SenderInfoDto"
        },
        "deliveryFee": {
          "type": [
            "number",
            "null"
          ],
          "description": "Delivery fee applicable to the delivery of the Gift",
          "format": "double"
        },
        "deliverySchedule": {
          "$ref": "#/$defs/DeliveryScheduleDto"
        },
        "deliveryInfo": {
          "type": "array",
          "description": "Delivery Information",
          "items": {
            "$ref": "#/$defs/DeliveryInfoDto"
          }
        }
      },
      "additionalProperties": false
    },
    "OrderItemInfoDto": {
      "required": [
        "activationValue",
        "amountPaid",
        "currencyCode",
        "designId",
        "productId",
        "quantity"
      ],
      "type": "object",
      "properties": {
        "sendAsGift": {
          "type": "boolean",
          "description": "Flag to indicate whether the item was purchased as a gift."
        },
        "productId": {
          "type": "string",
          "description": "Identifier for the product that was ordered. This value must match an identifier from our Gifting Catalogue.",
          "format": "uuid"
        },
        "designId": {
          "minLength": 1,
          "type": "string",
          "description": "Identifier for the design of a product that was ordered. This value must match an identifier from our Gifting Catalogue."
        },
        "currencyCode": {
          "$ref": "#/$defs/CurrencyCode"
        },
        "activationValue": {
          "type": "number",
          "description": "Dollar amount loaded onto the gift card",
          "format": "double"
        },
        "campaignInfo": {
          "type": [
            "array",
            "null"
          ],
          "description": "Campaign(s) associated with the Gift ",
          "items": {
            "$ref": "#/$defs/CampaignInfoDto"
          }
        },
        "amountPaid": {
          "type": "number",
          "description": "Amount paid for the gift card",
          "format": "double"
        },
        "fulfillmentInfo": {
          "$ref": "#/$defs/OrderItemFulfillmentInfoDto"
        },
        "personalisationInfo": {
          "$ref": "#/$defs/PersonalisationInfoDto"
        },
        "quantity": {
          "type": "integer",
          "description": "Quantity",
          "format": "int32"
        }
      },
      "additionalProperties": false
    },
    "PaymentInfoDto": {
      "required": [
        "paymentReferenceInfo"
      ],
      "type": "object",
      "properties": {
        "paymentReferenceInfo": {
          "type": "array",
          "description": "Payment reference identifier for the payment made by the customer to purchase the orderentifier for the payment made by the customer to purchase the order",
          "items": {
            "$ref": "#/$defs/PaymentReferenceInfoDto"
          }
        },
        "donationsInfo": {
          "type": [
            "array",
            "null"
          ],
          "description": "Donations included in the order",
          "items": {
            "$ref": "#/$defs/DonationInfoDto"
          }
        }
      },
      "additionalProperties": false
    },
    "PaymentReferenceInfoDto": {
      "required": [
        "amountPaid",
        "currencyCode",
        "paymentMethod",
        "paymentReferenceId"
      ],
      "type": "object",
      "properties": {
        "paymentReferenceId": {
          "minLength": 1,
          "type": "string",
          "description": "Payment reference identifier for the payment made by the customer to purchase the order"
        },
        "paymentMethod": {
          "minLength": 1,
          "type": "string",
          "description": "Payment method used by the customer to purchase the order"
        },
        "currencyCode": {
          "$ref": "#/$defs/CurrencyCode"
        },
        "amountPaid": {
          "type": "number",
          "description": "Amount paid for the payment type",
          "format": "double"
        }
      },
      "additionalProperties": false
    },
    "PersonalisationAssetsDto": {
      "required": [
        "images"
      ],
      "type": "object",
      "properties": {
        "images": {
          "type": "array",
          "description": "Images",
          "items": {
            "$ref": "#/$defs/PersonalisationImageDto"
          }
        }
      },
      "additionalProperties": false
    },
    "PersonalisationImageDto": {
      "required": [
        "imageType",
        "location"
      ],
      "type": "object",
      "properties": {
        "imageType": {
          "$ref": "#/$defs/PersonalisationImageType"
        },
        "location": {
          "minLength": 1,
          "type": "string",
          "description": "Image location"
        }
      },
      "additionalProperties": false
    },
    "PersonalisationImageType": {
      "type": "string",
      "enum": [
        "DIGITAL_TEMPLATE",
        "CARD_SKIN"
      ]
    },
    "PersonalisationInfoDto": {
      "required": [
        "personalisationType"
      ],
      "type": "object",
      "properties": {
        "personalisationType": {
          "$ref": "#/$defs/PersonalisationType"
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "Personalisation message added to the gift card by the customer"
        },
        "assets": {
          "$ref": "#/$defs/PersonalisationAssetsDto"
        }
      },
      "additionalProperties": false
    },
    "PersonalisationType": {
      "type": "string",
      "enum": [
        "TEXT",
        "IMAGE",
        "VIDEO",
        "TEXT_IMAGE",
        "TEXT_VIDEO",
        "TEXT_IMAGE_VIDEO"
      ]
    },
    "ScheduleType": {
      "type": "string",
      "enum": [
        "NOW",
        "DELAYED"
      ]
    },
    "SenderInfoDto": {
      "required": [
        "firstName"
      ],
      "type": "object",
      "properties": {
        "firstName": {
          "minLength": 1,
          "type": "string",
          "description": "First name of the sender"
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Last name of the sender"
        }
      },
      "additionalProperties": false
    }
  }
}