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

Get Index Page context

Returns the context for the Index Page, which collects user email and optional phone number. This page is skipped for authenticated users.

Preconditions:

  • Basket must not be empty

  • If CAN_GUEST_PURCHASE is false, user must be authenticated

Skip Conditions:

  • Page is skipped if user is already logged in

get
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>)

Responses
200

Index page context retrieved

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
get/orders/checkout/?page=IndexPage
GET /orders/checkout/?page=IndexPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
200

Index page context retrieved

{
  "context_list": [
    {
      "page_name": "IndexPage",
      "page_slug": "indexpage",
      "page_context": {
        "is_user_logged_in": false,
        "can_guest_purchase": true,
        "has_gift_box": false
      }
    }
  ],
  "pre_order": {
    "basket": {
      "pk": 123,
      "total_amount": "150.00"
    },
    "user_email": null,
    "phone_number": null
  },
  "errors": [],
  "template_name": "orders/index.html"
}

Last updated

Was this helpful?