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

Get Data Source Shipping Option Selection Page context

Returns available shipping options grouped by data source (supplier/vendor). Used when products in the basket come from different data sources and each data source requires separate shipping option selection.

This page is used when CHECKOUT_SHIPPING_OPTION_SELECTION_PAGE dynamic setting is set to DataSourceShippingOptionSelectionPage.

Preconditions:

  • Shipping address must be selected (check_address_selected)

  • Basket must not be empty

Data Source Grouping:

  • Products are grouped by their data source (supplier/vendor)

  • Each data source has its own set of available shipping options

  • User must select a shipping option for each data source

Configuration:

  • CHECKOUT_SHIPPING_OPTION_SELECTION_PAGE: Must be set to DataSourceShippingOptionSelectionPage to enable this page.

Error Handling:

  • Raises NoDataSourceShippingOptionAvailable exception if no shipping options are available for the basket and shipping address combination

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

Data source shipping option selection page context retrieved

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

Data source shipping option selection page context retrieved

{
  "context_list": [
    {
      "page_name": "DataSourceShippingOptionSelectionPage",
      "page_slug": "datasourceshippingoptionselectionpage",
      "page_context": {
        "data_sources": [
          {
            "pk": 1,
            "name": "Supplier A",
            "data_source_shipping_options": [
              {
                "pk": 10,
                "shipping_amount": "5.99",
                "shipping_option_name": "Standard Delivery",
                "shipping_option_logo": "https://cdn.akinon.com/logos/standard.png",
                "data_source": {
                  "pk": 1,
                  "title": "Supplier A"
                },
                "description": "3-5 business days"
              },
              {
                "pk": 11,
                "shipping_amount": "12.99",
                "shipping_option_name": "Express Delivery",
                "shipping_option_logo": "https://cdn.akinon.com/logos/express.png",
                "data_source": {
                  "pk": 1,
                  "title": "Supplier A"
                },
                "description": "Next day delivery"
              }
            ]
          },
          {
            "pk": 2,
            "name": "Supplier B",
            "data_source_shipping_options": [
              {
                "pk": 20,
                "shipping_amount": "7.99",
                "shipping_option_name": "Standard Delivery",
                "shipping_option_logo": "https://cdn.akinon.com/logos/standard.png",
                "data_source": {
                  "pk": 2,
                  "title": "Supplier B"
                },
                "description": "3-5 business days"
              }
            ]
          }
        ]
      }
    }
  ],
  "pre_order": {
    "basket": {
      "pk": 123,
      "total_amount": "150.00"
    },
    "shipping_address": {
      "pk": 10,
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@akinon.com",
      "phone_number": "+15551234567",
      "line": "123 Main St",
      "country": {
        "pk": 1,
        "code": "US",
        "name": "United States"
      },
      "city": {
        "pk": 1,
        "name": "New York"
      },
      "township": {
        "pk": 1,
        "name": "Manhattan"
      }
    },
    "billing_address": {
      "pk": 10,
      "first_name": "John",
      "last_name": "Doe"
    },
    "billing_and_shipping_same": true,
    "delivery_option": {
      "pk": 1,
      "name": "Home Delivery",
      "slug": "home-delivery",
      "delivery_option_type": "customer",
      "sort_order": 1
    },
    "shipping_option": null,
    "shipping_amount": null,
    "payment_option": null,
    "notifications": [],
    "total_amount": "150.00",
    "unpaid_amount": "150.00",
    "loyalty_money": null,
    "currency_type_label": "USD",
    "installment": null,
    "redirect_to_three_d": null,
    "retail_store": null,
    "payment_choice": null,
    "user_email": "john@akinon.com",
    "phone_number": "+15551234567",
    "user_phone_number": "+15551234567",
    "gift_box": null,
    "delivery_range": null,
    "total_amount_with_interest": "150.00",
    "is_guest": false,
    "is_post_order": false,
    "data_source_shipping_options": null,
    "attribute_based_shipping_options": null
  },
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?