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

Get Campaign Selection Page context

Returns the context for the Campaign Selection Page, which presents the list of campaigns fetched from the payment gateway in the preceding CampaignListPage step. The user selects one campaign from this list to apply to the order.

Preconditions:

  • Campaign data must have been fetched (i.e., campaigns must not be null in the current pre-order state; an empty list [] is accepted)

Skip Conditions:

  • Page is skipped if a campaign has already been selected (i.e., selected_campaign is not null in the current pre-order state)

available_for_post_order: true

Next Pages (determined dynamically):

  • Proceeds to the next applicable checkout step once a campaign is selected

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

Campaign Selection Page context retrieved

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

Campaign Selection Page context retrieved

{
  "context_list": [
    {
      "page_name": "CampaignSelectionPage",
      "page_slug": "campaignselectionpage",
      "page_context": {
        "campaigns": [
          {
            "code": "CAMP001",
            "name": "3 Installments Campaign"
          },
          {
            "code": "CAMP002",
            "name": "6 Installments Campaign"
          }
        ]
      }
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com",
    "payment_option": {
      "pk": 3,
      "name": "Credit Card",
      "slug": "credit-card",
      "payment_type": "credit_card",
      "payment_type_label": "Credit Card"
    },
    "campaigns": [
      {
        "code": "CAMP001",
        "name": "3 Installments Campaign"
      },
      {
        "code": "CAMP002",
        "name": "6 Installments Campaign"
      }
    ],
    "selected_campaign": null
  },
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?