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

Send User's Billing and Shipping Addresses

Sets the billing and shipping addresses for the order.

Configuration:

  • REMOTE_PRICE_ATTRIBUTE_KEY: Product attribute key (default: "has_remote_price") that indicates a product requires remote price calculation. If any basket item has this attribute set to "true", the checkout flow routes to RemotePriceCalculationPage after address selection.

  • IDENTITY_NUMBER_REQUIRED_AMOUNT: Order amount threshold that requires identity number validation. If set and order total (with interest) exceeds this amount, shipping address must have identity_number field populated, otherwise validation fails.

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

Remote Price Detection:

  • Checks if any basket item has REMOTE_PRICE_ATTRIBUTE_KEY attribute set to "true"

  • If detected, routes to RemotePriceCalculationPage next

Next Pages:

  • If remote price calculation needed: RemotePriceCalculationPage

  • Otherwise: Shipping option selection page

Validation:

  • If IDENTITY_NUMBER_REQUIRED_AMOUNT is set and order total exceeds threshold, shipping address must have identity_number populated

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

shipping_addressintegerRequired

Primary key of the shipping address

Responses
200

Addresses set successfully

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

"billing_address=10&shipping_address=10"
200

Addresses set successfully

{
  "context_list": [
    {
      "page_name": "ShippingOptionSelectionPage",
      "page_slug": "shippingoptionselectionpage",
      "page_context": {
        "shipping_options": [
          {
            "pk": 1,
            "name": "Standard Shipping"
          }
        ]
      }
    }
  ],
  "pre_order": {
    "shipping_address": {
      "pk": 10,
      "first_name": "John",
      "last_name": "Doe"
    },
    "billing_address": {
      "pk": 10
    },
    "billing_and_shipping_same": true,
    "delivery_option": {
      "pk": 1,
      "name": "Home Delivery"
    }
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?