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

Get Order Selection Page context

If additional information needs to be collected from the user during checkout, a custom schema can be defined on the Order model via the admin interface. This page returns that schema so the frontend can render the appropriate form. The submitted value is stored in pre_order.data['extra_field'] and written to the order upon completion. This is an independent page — submitting it does not advance the checkout flow.

Preconditions:

  • None — this page is always reachable regardless of checkout state.

Skip Conditions:

  • Page is skipped if extra_field has already been set in pre_order.data.

Next Pages:

  • No further checkout page from this step (EmptyPage)

Note: This page is only used by projects that have a custom order schema configured in the admin interface.

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

Order Selection Page context retrieved

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

Order Selection Page context retrieved

{
  "context_list": [
    {
      "page_name": "OrderSelectionPage",
      "page_slug": "orderselectionpage",
      "page_context": {
        "schema": {
          "type": "object",
          "properties": {
            "preference": {
              "type": "string",
              "enum": [
                "gift",
                "standard"
              ]
            }
          }
        }
      }
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com"
  },
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?