For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set Delivery Option

Sets the selected delivery option to the current pre-order.

Configuration:

  • CHECKOUT_DELIVERY_OPTION_SELECTION_PAGE: Determines which delivery option selection page is used. Can be set to DeliveryOptionSelectionPage or RemoteDeliveryOptionSelectionPage.

Next Pages (based on selected delivery option):

  • If scheduled delivery is active: SlotSelectionPage

  • If pickup location selected: PickupLocationSelectionPage

  • If retail store selected: RetailStoreSelectionPage

  • Otherwise: AddressSelectionPage

Cascading Invalidation:

  • Changing delivery option with clear=true resets shipping and billing addresses

post
Header parameters
x-requested-withstring · enumRequired

Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.

Default: XMLHttpRequestPossible values:
CookiestringOptional

Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)

Body
delivery_optionintegerRequired

Primary key of the selected delivery option

clearbooleanOptional

If true, clears shipping and billing addresses when changing delivery option

Default: false
Responses
200

Delivery option set successfully

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=DeliveryOptionSelectionPage
POST /orders/checkout/?page=DeliveryOptionSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 35

"delivery_option=1&clear=false"
200

Delivery option set successfully

{
  "context_list": [
    {
      "page_name": "AddressSelectionPage",
      "page_slug": "addressselectionpage",
      "page_context": {
        "addresses": [],
        "country": {
          "pk": 1,
          "code": "US",
          "name": "United States"
        }
      }
    }
  ],
  "pre_order": {
    "delivery_option": {
      "pk": 1,
      "name": "Home Delivery",
      "delivery_option_type": "customer"
    }
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?