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

Select Retail Store

Sets the selected retail store for click-and-collect order.

Configuration:

  • CHECKOUT_LIST_RETAIL_STORES: Controls whether retail stores are listed (static setting, default: True). When False, no stores are fetched or displayed.

  • CHECKOUT_RETAIL_STORE_FILTERS: Filtering options for retail stores (default: {"by_stock": false}). When by_stock is true, only retail stores with available stock for basket items are shown. When false, all active retail stores with click_and_collect=True are displayed.

  • DEFAULT_COUNTRY_CODE: Default country code used to populate country field in address contexts.

Address Handling:

  • Creates a RetailStoreAddress object from the selected retail store

  • Uses billing address details (first name, last name) and user email

  • Sets billing_and_shipping_same to false

Next Pages:

  • Shipping option selection page

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
billing_addressintegerRequired

Primary key of the billing address

retail_storeintegerRequired

Primary key of the selected retail store

Responses
200

Retail store selected successfully

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

"billing_address=10&retail_store=5"
200

Retail store selected successfully

{
  "context_list": [
    {
      "page_name": "ShippingOptionSelectionPage",
      "page_slug": "shippingoptionselectionpage",
      "page_context": {
        "shipping_options": []
      }
    }
  ],
  "pre_order": {
    "retail_store": {
      "pk": 5,
      "name": "Downtown Store"
    },
    "billing_address": {
      "pk": 10
    },
    "shipping_address": {
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@akinon.com"
    },
    "billing_and_shipping_same": false
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?