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

Get Coupon Selection Page context

Returns the available coupons for the current user. This page runs as an independent step, meaning it does not reset or block other checkout steps and can be submitted at any point once the precondition is satisfied.

Coupon Types:

  • Coupon (offer_type = coupon): Standard single-use coupon assigned to the user

  • Bulk Coupon (offer_type = bulk_coupon): A coupon from a bulk voucher batch, assigned to the user's BulkVoucherCode with an ACTIVE status

Applied Coupons:

  • Offer applications are evaluated live via OfferApplicator on each GET request

  • Coupons currently applied to the basket have is_applied: true

Preconditions:

  • No strict preconditions — available to both authenticated and anonymous users

  • Anonymous users see an empty coupon list (coupons are user-specific)

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

Coupon selection page context retrieved

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

Coupon selection page context retrieved

{
  "context_list": [
    {
      "page_name": "CouponSelectionPage",
      "page_slug": "couponselectionpage",
      "page_context": {
        "available_coupons": [
          {
            "pk": 101,
            "label": "SUMMER20",
            "is_applied": true,
            "start_datetime": "2024-06-01T00:00:00Z",
            "end_datetime": "2024-08-31T23:59:59Z"
          },
          {
            "pk": 102,
            "label": "NEWUSER10",
            "is_applied": false,
            "start_datetime": "2024-01-01T00:00:00Z",
            "end_datetime": "2024-12-31T23:59:59Z"
          }
        ]
      }
    }
  ],
  "errors": [],
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?