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 userBulk Coupon (
offer_type = bulk_coupon): A coupon from a bulk voucher batch, assigned to the user'sBulkVoucherCodewith anACTIVEstatus
Applied Coupons:
Offer applications are evaluated live via
OfferApplicatoron each GET requestCoupons 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)
Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.
XMLHttpRequestPossible values: Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)
Coupon selection page context retrieved
GET /orders/checkout/?page=CouponSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
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?

