{
  "openapi": "3.0.4",
  "info": {
    "title": "Checkout.Api PreOrder_v3",
    "description": "The Checkout API, also known as the Preorder API, sends the cart information as well as the shopper and retailer configuration details to eShopWorld system.",
    "version": "1.0.0.0"
  },
  "servers": [
    {
      "url": "https://api.sandbox.esw.com/checkout/"
    }
  ],
  "paths": {
    "/api/v3/{tenantCode}/PreOrder": {
      "post": {
        "tags": [
          "PreOrder"
        ],
        "summary": "Creates an order.",
        "description": "Validates the pre-order request and creates an order in eShopWorld system.",
        "operationId": "ApiV3ByTenantCodePreOrderPost",
        "parameters": [
          {
            "name": "tenantCode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "A pre-order request.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PreOrderRequestDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreOrderRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PreOrderRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PreOrderRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A 201 Success response code is returned if the order is created successfully. The response includes a checkout url to redirect the shopper.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreOrderDetailsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "A 400 Bad Request response code is returned if the request body is not valid. The response includes a list of errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "A 401 Unauthorized response code is returned if request lacks of valid authentication credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "A 403 Forbidden response code is returned if the authentication credentials are insufficient to grant access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "A 429 Too Many Requests response code is returned if the user has sent too many requests in a given amount of time. A Retry-After header is included in the response, indicating how long to wait before making a new request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "A 500 InternalServerError response code is returned if the server encountered an unexpected condition that prevented it from fulfilling the request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Error"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message",
            "nullable": true,
            "example": "Error message"
          },
          "code": {
            "type": "integer",
            "description": "Error code",
            "format": "int32",
            "example": 2
          }
        },
        "description": "Error"
      },
      "PreOrderCadenceDto": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/PreOrderCadenceType"
          }
        },
        "description": "Cart or order level Subscriptions Cadence."
      },
      "PreOrderCadenceType": {
        "enum": [
          "None",
          "Daily",
          "Weekly",
          "Monthly",
          "Quarterly",
          "Yearly"
        ],
        "type": "string",
        "description": "PreOrderCadenceType"
      },
      "PreOrderCartDiscountPriceInfoRequestDto": {
        "required": [
          "price"
        ],
        "type": "object",
        "properties": {
          "price": {
            "$ref": "#/components/schemas/PreOrderMoneyRequestDto"
          },
          "discounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderDiscountInfoRequestDto"
            },
            "description": "(Optional) Discounts to be applied. If multiple discounts are passed, they are applied first-to-last.",
            "nullable": true
          }
        },
        "description": "Cart discount price information for pre-order."
      },
      "PreOrderContactDetailRequestDto": {
        "required": [
          "contactDetailsType"
        ],
        "type": "object",
        "properties": {
          "contactDetailsType": {
            "$ref": "#/components/schemas/PreOrderContactDetailsType"
          },
          "contactDetailsNickName": {
            "type": "string",
            "description": "(Optional) Nickname or identifier for the contact information.",
            "nullable": true,
            "example": "NickName"
          },
          "addressId": {
            "type": "string",
            "description": "(Optional) AddressId for the contact information.",
            "nullable": true,
            "example": "123"
          },
          "address1": {
            "maxLength": 150,
            "type": "string",
            "description": "(Optional, Max 150 chars) Address line 1 of the address.",
            "nullable": true,
            "example": "1071 5th Ave"
          },
          "address2": {
            "maxLength": 150,
            "type": "string",
            "description": "(Optional, Max 150 chars) Address line 2 of the address.",
            "nullable": true,
            "example": "Apt B1"
          },
          "address3": {
            "maxLength": 150,
            "type": "string",
            "description": "(Optional, Max 150 chars) Address line 3 of the address.",
            "nullable": true,
            "example": "New York"
          },
          "city": {
            "maxLength": 50,
            "type": "string",
            "description": "(Optional, Max 50 chars) City of the address.",
            "nullable": true,
            "example": "New York"
          },
          "postalCode": {
            "maxLength": 50,
            "type": "string",
            "description": "(Optional, Max 50 chars) Postal code or zip code of the address.",
            "nullable": true,
            "example": "10128"
          },
          "region": {
            "maxLength": 150,
            "type": "string",
            "description": "(Optional, Max 150 chars) Region, province, state, or county of the address. ISO can be provided, if available.",
            "nullable": true,
            "example": "NY"
          },
          "country": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "description": "(Optional, 2 chars) ISO 3166 two-letter country code of the address.",
            "nullable": true,
            "example": "US"
          },
          "email": {
            "maxLength": 128,
            "type": "string",
            "description": "(Optional, Max 128 chars) Email address.",
            "nullable": true,
            "example": "test@email.com"
          },
          "firstName": {
            "maxLength": 70,
            "type": "string",
            "description": "(Optional, Max 70 chars) First name of the address.",
            "nullable": true,
            "example": "First Name"
          },
          "lastName": {
            "maxLength": 70,
            "type": "string",
            "description": "(Optional, Max 70 chars) Last name of the address.",
            "nullable": true,
            "example": "Last name"
          },
          "telephone": {
            "maxLength": 150,
            "type": "string",
            "description": "(Optional, Max 150 chars) Phone number.",
            "nullable": true,
            "example": "+14211112222"
          },
          "gender": {
            "$ref": "#/components/schemas/PreOrderGender"
          },
          "poBox": {
            "maxLength": 50,
            "type": "string",
            "description": "(Optional, Max 50 chars) Postal order box of the address.",
            "nullable": true,
            "example": ""
          },
          "metadataItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderMetadataItemRequestDto"
            },
            "description": "(Optional) Key-value pairs used for passing additional details. Use of metadataItems must be agreed with ESW. This applies to all metadataItems within this API.",
            "nullable": true
          },
          "isSelected": {
            "type": "boolean",
            "description": "(Optional) IsSelected shows whether this item is selected",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "description": "(Optional) IsDefault identify it is as a preferred address",
            "nullable": true
          }
        },
        "description": "Contact details."
      },
      "PreOrderContactDetailsType": {
        "enum": [
          "IsDelivery",
          "IsPayment",
          "IsDeliveryAndPayment"
        ],
        "type": "string",
        "description": "PreOrderContactDetailsType"
      },
      "PreOrderDeliveryOptionRequestDto": {
        "required": [
          "deliveryOption"
        ],
        "type": "object",
        "properties": {
          "deliveryOption": {
            "maxLength": 15,
            "type": "string",
            "description": "(Required, Max 15 chars) Preferred delivery option for the shopper, for example, Post or Express. These codes are as agreed with ESW.",
            "nullable": true,
            "example": "Post|Exp2"
          },
          "deliveryOptionOverridePriceInfo": {
            "$ref": "#/components/schemas/PreOrderPriceInfoRequestDto"
          },
          "estimatedDeliveryDateOverride": {
            "type": "string",
            "description": "(Optional) Estimated delivery date of the cart items to the shopper. The estimated delivery date is in the ISO 8601 format.",
            "format": "date-time",
            "nullable": true,
            "example": "2020-08-31T11:54:24.631Z"
          },
          "metadataItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderMetadataItemRequestDto"
            },
            "description": "(Optional) Key-value pairs used for passing additional details. Use of metadataItems must be agreed with ESW. This applies to all metadataItems within this API.",
            "nullable": true
          }
        },
        "description": "Delivery options."
      },
      "PreOrderDetailsResponseDto": {
        "type": "object",
        "properties": {
          "preOrderCode": {
            "type": "string",
            "description": "PreOrder code generated by ESW system.",
            "nullable": true,
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "orderNumber": {
            "type": "string",
            "description": "Provisional order number generated by ESW system.",
            "nullable": true,
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "redirectUrl": {
            "type": "string",
            "description": "Full checkout redirect URL where the shopper can be redirected to on successful PreOrder.",
            "nullable": true,
            "example": "https://checkout_url/00000000-0000-0000-0000-000000000000"
          },
          "shopperAccessToken": {
            "type": "string",
            "description": "Access token generated by ESW system for establishing a secure communication for customers.",
            "nullable": true,
            "example": "A bearer token"
          }
        },
        "description": "PreOrder response object to return to the retailer."
      },
      "PreOrderDiscountFixedInfoRequestDto": {
        "type": "object",
        "properties": {
          "title": {
            "maxLength": 100,
            "type": "string",
            "description": "(Optional, Max 100 chars) Title of the discount.",
            "nullable": true,
            "example": "Season discount"
          },
          "description": {
            "type": "string",
            "description": "(Optional) Description of the discount.",
            "nullable": true,
            "example": "Winter season discount"
          },
          "discount": {
            "$ref": "#/components/schemas/PreOrderMoneyRequestDto"
          },
          "beforeDiscount": {
            "$ref": "#/components/schemas/PreOrderMoneyRequestDto"
          }
        },
        "description": "Discounts information for fixed amount discounts (without percentage)."
      },
      "PreOrderDiscountInfoRequestDto": {
        "type": "object",
        "properties": {
          "title": {
            "maxLength": 100,
            "type": "string",
            "description": "(Optional, Max 100 chars) Title of the discount.",
            "nullable": true,
            "example": "Season discount"
          },
          "description": {
            "type": "string",
            "description": "(Optional) Description of the discount.",
            "nullable": true,
            "example": "Winter season discount"
          },
          "discount": {
            "$ref": "#/components/schemas/PreOrderMoneyRequestDto"
          },
          "beforeDiscount": {
            "$ref": "#/components/schemas/PreOrderMoneyRequestDto"
          },
          "percentage": {
            "type": "string",
            "description": "(Optional) Percentage of the discount to be applied on the Price. The value must be greater than 0 and less than 100. When Percentage is populated, DiscountAmount and BeforeDiscount are not required.",
            "nullable": true
          }
        },
        "description": "Discounts information."
      },
      "PreOrderEstimatedDeliveryDateRangeDto": {
        "required": [
          "dateTo"
        ],
        "type": "object",
        "properties": {
          "dateFrom": {
            "type": "string",
            "description": "(Earliest) Estimated delivery date of the cart items to the shopper. The dateFrom is in the ISO 8601 format. Optional, if a value is provided a date range will be displayed to the shopper, otherwise only dateTo will be displayed.",
            "format": "date-time",
            "nullable": true,
            "example": "2023-08-31T11:54:24.631Z"
          },
          "dateTo": {
            "type": "string",
            "description": "(Latest) Estimated delivery date of the cart items to the shopper. The dateTo is in the ISO 8601 format.",
            "format": "date-time",
            "nullable": true,
            "example": "2023-09-02T11:54:24.631Z"
          }
        },
        "description": "Estimated Delivery Date Range"
      },
      "PreOrderGender": {
        "enum": [
          "None",
          "Male",
          "Female",
          "Unisex"
        ],
        "type": "string",
        "description": "PreOrderGender"
      },
      "PreOrderMarketingOptInDto": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/PreOrderMarketingOptInTypes"
          },
          "legalHintText": {
            "type": "string",
            "description": "(Optional) The legal hint text for the opt in. This is the text that will be displayed. \nHTML content is allowed. \nAllowed Tags: \"a\", \"br\"\nAllowed Attributes: \"href\", \"target\"",
            "nullable": true,
            "example": "By siging up, you agree to our privacy policy"
          },
          "isSelected": {
            "type": "boolean",
            "description": "(Optional) The selected state of the opt in"
          }
        },
        "description": "Marketing Opt In"
      },
      "PreOrderMarketingOptInTypes": {
        "enum": [
          "Email",
          "Sms",
          "Phone",
          "Post"
        ],
        "type": "string",
        "description": "Marketing Opt In Types"
      },
      "PreOrderMetadataItemRequestDto": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 64,
            "type": "string",
            "description": "(Required, Max 64 chars) Name or key of the metadata item.",
            "nullable": true,
            "example": "Key name"
          },
          "value": {
            "maxLength": 1000,
            "type": "string",
            "description": "(Optional, Max 1000 chars) Value of the metadata item or key.",
            "nullable": true,
            "example": "Key value"
          }
        },
        "description": "Key-value pairs used for passing additional details. Use of metadataItems must be agreed with ESW."
      },
      "PreOrderMoneyRequestDto": {
        "required": [
          "amount",
          "currency"
        ],
        "type": "object",
        "properties": {
          "currency": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "description": "(Required, 3 chars) ISO 4217 currency code.",
            "nullable": true,
            "example": "USD"
          },
          "amount": {
            "type": "string",
            "description": "(Required) The amount of the currency.",
            "nullable": true,
            "example": "100.00"
          }
        },
        "description": "Price currency and amount."
      },
      "PreOrderOrderItemRequestDto": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "integer",
            "description": "(Optional) Number of product pieces.",
            "format": "int32",
            "nullable": true,
            "example": 1
          },
          "estimatedDeliveryDateFromRetailer": {
            "type": "string",
            "description": "(Optional) Estimated delivery date of the cart items in the ISO 8601 format. This date is for the first leg of the journey.",
            "format": "date-time",
            "nullable": true,
            "example": "2020-08-31T11:54:24.631Z"
          },
          "lineItemId": {
            "type": "string",
            "description": "(Optional) Item sequence or line item identifier.",
            "nullable": true,
            "example": "1"
          },
          "subscriptionItemId": {
            "type": "string",
            "description": "(Optional) Subscription Item Id",
            "nullable": true
          },
          "product": {
            "$ref": "#/components/schemas/PreOrderProductRequestDto"
          },
          "cartGrouping": {
            "type": "string",
            "description": "(Optional) A label that can be attached to an item so that the items can be grouped on the checkout.",
            "nullable": true,
            "example": "Group1"
          },
          "fulfilmentCountryIso": {
            "type": "string",
            "description": "(Optional) ISO 3166 format two-letter country identifier for the fulfilment country.",
            "nullable": true,
            "example": "IT"
          },
          "metadataItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderMetadataItemRequestDto"
            },
            "description": "(Optional) Key-value pairs used for passing additional details. Use of metadataItems must be agreed with ESW. This applies to all metadataItems within this API.",
            "nullable": true
          }
        },
        "description": "Cart items."
      },
      "PreOrderPackagingOptionDto": {
        "type": "object",
        "properties": {
          "packagingType": {
            "$ref": "#/components/schemas/PreOrderPackagingOptionType"
          },
          "imageUrl": {
            "type": "string",
            "description": "Thumbnail image URL of the packaging. The image size must be less than or equal to 20 KB and the image must be retina-ready.",
            "nullable": true
          }
        },
        "description": "Packaging option to be used in the Checkout page."
      },
      "PreOrderPackagingOptionType": {
        "enum": [
          "Gift"
        ],
        "type": "string",
        "description": "Packaging option type."
      },
      "PreOrderPriceInfoRequestDto": {
        "required": [
          "price"
        ],
        "type": "object",
        "properties": {
          "price": {
            "$ref": "#/components/schemas/PreOrderMoneyRequestDto"
          },
          "discounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderDiscountFixedInfoRequestDto"
            },
            "description": "(Optional) Fixed amount discounts to be applied. If multiple discounts are passed, they are applied first-to-last.",
            "nullable": true
          }
        },
        "description": "Price information for pre-order."
      },
      "PreOrderProductRequestDto": {
        "required": [
          "description",
          "productCode",
          "productUnitPriceInfo",
          "title"
        ],
        "type": "object",
        "properties": {
          "productCode": {
            "maxLength": 100,
            "type": "string",
            "description": "(Required, Max 100 chars) Unique identification code or SKU for the product.",
            "nullable": true,
            "example": "123456"
          },
          "title": {
            "maxLength": 250,
            "type": "string",
            "description": "(Required, Max 250 chars) Localized title of the product. If no title is provided, ESW may use the description from the Product Catalog.",
            "nullable": true,
            "example": "Black dress"
          },
          "description": {
            "type": "string",
            "description": "(Required) Localized description of the product. If no description is provided, ESW may use the description from the Product Catalog.",
            "nullable": true,
            "example": "Long black dress"
          },
          "imageUrl": {
            "type": "string",
            "description": "(Optional) Thumbnail image URL of the product. The image size must be less than or equal to 20 KB and the image must be retina-ready.",
            "nullable": true,
            "example": "https://url.com/test.png"
          },
          "productUrl": {
            "type": "string",
            "description": "(Optional) URL to the product details.",
            "nullable": true,
            "example": "https://url.com/category/product/1456"
          },
          "color": {
            "maxLength": 100,
            "type": "string",
            "description": "(Optional, Max 100 chars) Color of the item.",
            "nullable": true,
            "example": "black"
          },
          "size": {
            "maxLength": 100,
            "type": "string",
            "description": "(Optional, Max 100 chars) Size of the item.",
            "nullable": true,
            "example": "38"
          },
          "productUnitPriceInfo": {
            "$ref": "#/components/schemas/PreOrderPriceInfoRequestDto"
          },
          "metadataItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderMetadataItemRequestDto"
            },
            "description": "(Optional) Key-value pairs used for passing additional details.  Use of metadataItems must be agreed with ESW. This applies to all metadataItems within this API.",
            "nullable": true
          },
          "isReturnProhibited": {
            "type": "boolean",
            "description": "(Optional) Indicates whether the item is returnable or not under the regular return policy. The values are True or False.",
            "nullable": true,
            "example": false
          },
          "inStock": {
            "type": "boolean",
            "description": "(Optional) Gets or sets a value indicating whether the product is available on the retailer side or not.",
            "nullable": true
          }
        },
        "description": "Product."
      },
      "PreOrderRequestDto": {
        "required": [
          "deliveryCountryIso",
          "lineItems",
          "retailerCartId"
        ],
        "type": "object",
        "properties": {
          "retailerCartId": {
            "maxLength": 100,
            "type": "string",
            "description": "(Required, Max 100 chars) Retailer's reference number for the order or cart identifier.",
            "nullable": true,
            "example": "XX123456"
          },
          "contactDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderContactDetailRequestDto"
            },
            "description": "(Optional) Shopper’s delivery or payment contact details. If multiple contactDetails are passed, they will be applied first-to-last.",
            "nullable": true
          },
          "retailerPromoCodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderRetailerPromoCodeRequestDto"
            },
            "description": "(Optional) Promo or voucher codes entered on the cart by the shopper. If multiple retailer promo codes are passed, they will be applied first-to-last.",
            "nullable": true
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderOrderItemRequestDto"
            },
            "description": "(Required) Attributes that describe the items in the cart. There can be multiple cart items. A minimum of one cart item is required.",
            "nullable": true
          },
          "cartDiscountPriceInfo": {
            "$ref": "#/components/schemas/PreOrderCartDiscountPriceInfoRequestDto"
          },
          "subscriptionOptInDetails": {
            "$ref": "#/components/schemas/PreOrderSubscriptionOptInDetailsDto"
          },
          "retailerCheckoutExperience": {
            "$ref": "#/components/schemas/PreOrderRetailerCheckoutExperienceRequestDto"
          },
          "shopperCurrencyIso": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "description": "(Optional, 3 chars) ISO 4217 format three-letter identifier for the shopper currency. Although optional, we strongly recommend that this is populated. If no value is provided, the default value agreed with ESW will be used.",
            "nullable": true,
            "example": "USD"
          },
          "retailerCurrencyIso": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "description": "(Optional, 3 chars) ISO 4217 format three-letter identifier for the retailer currency. Although optional, we strongly recommend that this is populated. If no value is provided, the default value agreed with ESW is used.",
            "nullable": true,
            "example": "EUR"
          },
          "pricingSynchronizationId": {
            "type": "string",
            "description": "(Optional) Value of the pricing advisor synchronization id to be used at checkout. Retailers can extract the value from the Pricing Advisor API. If no value is provided, the default pricing strategy defined at Brand/Country level is used.",
            "nullable": true,
            "example": "abcdefg123456789"
          },
          "deliveryCountryIso": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "description": "(Required, 2 chars) ISO 3166 format two-letter country identifier for the delivery country.",
            "nullable": true,
            "example": "US"
          },
          "shopperCheckoutExperience": {
            "$ref": "#/components/schemas/PreOrderShopperCheckoutExperienceRequestDto"
          },
          "deliveryOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderDeliveryOptionRequestDto"
            },
            "description": "(Optional) Delivery options and discount information. If multiple delivery options are passed, the delivery option that will be defaulted on the Checkout will be the first in the list.",
            "nullable": true
          },
          "retailerDeliveryOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderRetailerDeliveryOptionRequestDto"
            },
            "description": "(Optional) Delivery options for retailers who do not consume ESW delivery services.  If multiple retailer delivery options are passed, the delivery option that will be defaulted on the Checkout will be the first in the list.",
            "nullable": true
          }
        },
        "description": "PreOrder request."
      },
      "PreOrderRetailerCheckoutExperienceRequestDto": {
        "type": "object",
        "properties": {
          "backToCartUrl": {
            "type": "string",
            "description": "(Optional) Specifies the URL to be used when the shopper clicks Back to cart on the Checkout page.",
            "nullable": true,
            "example": "https://url.com/cart"
          },
          "continueShoppingUrl": {
            "type": "string",
            "description": "(Optional) Specifies the URL to be used when the shopper clicks Continue Shopping on the Order Confirmation page.",
            "nullable": true,
            "example": "https://url.com"
          },
          "inventoryCheckFailurePageUrl": {
            "type": "string",
            "description": "(Optional) Specifies the URL to be used when the Inventory Check request failed.",
            "nullable": true,
            "example": "https://url.com"
          },
          "logoUrl": {
            "type": "string",
            "description": "(Optional) Specifies the URL to be used when the shopper clicks in the logo at the top of the Checkout page.",
            "nullable": true,
            "example": "https://url.com"
          },
          "metadataItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderMetadataItemRequestDto"
            },
            "description": "(Optional) Key-value pairs used for passing additional details. Use of metadataItems must be agreed with ESW. This applies to all metadataItems within this API.\n\n\n\nTo override the OrderConfirmationUrl in a test environment only such as Sandbox, pass the following case-sensitive MetaDataItems:\n- OrderConfirmationUri_TestOnly: An override to be used for the Order Confirmation endpoint.\n- OrderConfirmationBase64EncodedAuth_TestOnly: A basic authentication username and password string that is base-64 encoded for the endpoint override.",
            "nullable": true
          }
        },
        "description": "Retailer's Preferred Checkout Experience.\nThis model allows you to override the OrderConfirmationUrl on the CI, Test, and Sandbox test environments. Special MetaDataItems must be passed if you want to override the OrderConfirmationUrl."
      },
      "PreOrderRetailerDeliveryOptionRequestDto": {
        "required": [
          "deliveryOption",
          "estimatedDeliveryDateToShopper",
          "retailerDeliveryOptionPriceInfo",
          "title"
        ],
        "type": "object",
        "properties": {
          "deliveryOption": {
            "type": "string",
            "description": "(Required) Delivery option for the shopper. This is used internally by ESW to identify the selected delivery option.",
            "nullable": true,
            "example": "Post|Exp2"
          },
          "title": {
            "maxLength": 30,
            "type": "string",
            "description": "(Required, Max 30 chars) Title of the non-ESW delivery option.",
            "nullable": true,
            "example": "Non-ESW delivery option"
          },
          "estimatedDeliveryDateToShopper": {
            "$ref": "#/components/schemas/PreOrderEstimatedDeliveryDateRangeDto"
          },
          "retailerDeliveryOptionPriceInfo": {
            "$ref": "#/components/schemas/PreOrderPriceInfoRequestDto"
          },
          "metadataItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderMetadataItemRequestDto"
            },
            "description": "(Optional) Key-value pairs used for passing additional details. Use of metadataItems must be agreed with ESW.",
            "nullable": true
          }
        },
        "description": "Retailer Delivery Options"
      },
      "PreOrderRetailerPromoCodeRequestDto": {
        "type": "object",
        "properties": {
          "promoCode": {
            "maxLength": 50,
            "type": "string",
            "description": "(Optional, Max 50 chars) Promotion or voucher code.",
            "nullable": true,
            "example": "XX123456"
          },
          "title": {
            "maxLength": 100,
            "type": "string",
            "description": "(Optional, Max 100 chars) Title of the promotion or voucher code.",
            "nullable": true,
            "example": "Season discount"
          },
          "description": {
            "maxLength": 150,
            "type": "string",
            "description": "(Optional, Max 150 chars) Description of the promotion or voucher code.",
            "nullable": true,
            "example": "Discounts for all goods due to winter season"
          }
        },
        "description": "Retailer promo codes."
      },
      "PreOrderShopperCheckoutExperienceRequestDto": {
        "type": "object",
        "properties": {
          "useDeliveryContactDetailsForPaymentContactDetails": {
            "type": "boolean",
            "description": "(Optional) Indicates that the payment address is the same as the delivery address.",
            "nullable": true,
            "example": true
          },
          "emailMarketingOptIn": {
            "type": "boolean",
            "description": "(Optional) Indicates if the shopper wants to subscribe to email marketing. If no value is provided, the default value, as agreed with the retailer, is used.",
            "nullable": true,
            "example": true
          },
          "registeredProfileId": {
            "maxLength": 100,
            "type": "string",
            "description": "(Optional, Max 100 chars) Profile ID of the shopper, where the shopper is a registered member with the retailer.",
            "nullable": true,
            "example": "123456"
          },
          "registration": {
            "$ref": "#/components/schemas/PreOrderShopperRegistrationRequestDto"
          },
          "shopperCultureLanguageIso": {
            "type": "string",
            "description": "(Optional) Preferred language and culture experience for the shopper in the ISO 639-1 and ISO 3166 format.",
            "nullable": true,
            "example": "en-IE"
          },
          "expressPaymentMethod": {
            "type": "string",
            "description": "(Optional) Express payment method selected by the shopper in the retailer's cart.",
            "nullable": true,
            "example": "Paypal|ApplePay|AndroidPay"
          },
          "viewType": {
            "type": "string",
            "description": "(Optional) Indicates the checkout display type.",
            "nullable": true,
            "example": "Web|NativeApp"
          },
          "sessionTimeout": {
            "type": "integer",
            "description": "(Optional) Time in Minutes for the Checkout User session. The user's session on the Checkout will elapse after this period of time.",
            "format": "int32",
            "nullable": true,
            "example": 20
          },
          "packagingOption": {
            "$ref": "#/components/schemas/PreOrderPackagingOptionDto"
          },
          "metadataItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderMetadataItemRequestDto"
            },
            "description": "(Optional) Key-value pairs used for passing additional details. Use of metadataItems must be agreed with ESW. This applies to all metadataItems within this API.",
            "nullable": true
          },
          "smsMarketingOptIn": {
            "type": "boolean",
            "description": "(Optional) Indicates if the shopper wants to subscribe to sms marketing. If no value is provided, the default value, as agreed with the retailer, is used.",
            "nullable": true,
            "example": true
          },
          "marketingOptIns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderMarketingOptInDto"
            },
            "description": "(Optional) Pre Order Marketing Opt Ins. The Opt Ins indicate the type of Marketing Opt In options that will be available to select. Opt In types: Email, SMS, Phone, Post",
            "nullable": true
          }
        },
        "description": "Shopper checkout experience."
      },
      "PreOrderShopperRegistrationRequestDto": {
        "type": "object",
        "properties": {
          "registrationUrl": {
            "type": "string",
            "description": "(Optional) The registration URL that can override any existing registration url from configurations.",
            "nullable": true
          },
          "showRegistration": {
            "type": "boolean",
            "description": "(Optional) The flag that indicates whether the registration section should be displayed on the Order Confirmation page.",
            "nullable": true
          },
          "registrationButtonText": {
            "maxLength": 20,
            "type": "string",
            "description": "(Optional, Max 20 chars) The text that should be displayed on the Registration button.",
            "nullable": true
          },
          "registrationContent": {
            "maxLength": 200,
            "type": "string",
            "description": "(Optional, Max 200 chars) The content of the Registration section.",
            "nullable": true
          }
        },
        "description": "Shopper registration details."
      },
      "PreOrderSubscriptionDto": {
        "type": "object",
        "properties": {
          "retailerSubscriptionPlanId": {
            "type": "string",
            "description": "RetailerSubscriptionPlanId",
            "nullable": true
          },
          "subscriptionItemDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderSubscriptionItemDetailsDto"
            },
            "description": "SubscriptionItemDetails",
            "nullable": true
          },
          "cadence": {
            "$ref": "#/components/schemas/PreOrderCadenceDto"
          },
          "trialPeriod": {
            "$ref": "#/components/schemas/PreOrderTrialPeriodDto"
          },
          "metadataItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderMetadataItemRequestDto"
            },
            "description": "Subscription MetadataItems",
            "nullable": true
          }
        },
        "description": "Cart or order level Subscription to be applied."
      },
      "PreOrderSubscriptionItemDetailsDto": {
        "type": "object",
        "properties": {
          "subscriptionItemId": {
            "type": "string",
            "description": "SubscriptionItemId",
            "nullable": true
          }
        },
        "description": "Cart or order level Subscriptions Item Id."
      },
      "PreOrderSubscriptionOptInDetailsDto": {
        "type": "object",
        "properties": {
          "subscriptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PreOrderSubscriptionDto"
            },
            "description": "Subscriptions",
            "nullable": true
          }
        },
        "description": "Cart or order level Subscription to be applied."
      },
      "PreOrderTrialPeriodDto": {
        "type": "object",
        "properties": {
          "durationDays": {
            "type": "integer",
            "description": "Trial Period Duration in Days",
            "format": "int32"
          }
        },
        "description": "Cart or order level Subscriptions Trial Period in days."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Please insert JWT with Bearer into field",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ]
}