Add or Remove a Coupon
Adds or removes a coupon from the current checkout session. This is an independent step and does not determine the next checkout page. The checkout flow proceeds based on the current checkout state.
Required Fields:
coupon: The primary key of theBasketOfferrecord as a stringaction: Either"add"to apply the coupon or"remove"to unapply it
State Changes:
The coupon PK is added to or removed from
pre_order.data["coupons"]Offer applications are recalculated on the next GET request
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>)
Primary key of the BasketOffer record to add or remove, as a string.
101Action to perform: "add" to apply the coupon or "remove" to unapply it.
addPossible values: Coupon action processed
POST /orders/checkout/?page=CouponSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 31
"coupon='101'&action='add'"Coupon action processed
{
"context_list": [],
"errors": {}
}Last updated
Was this helpful?

