Headers
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Body
A JSON object containing information to apply eligible promotions to cart items.
The item details. At least one item must be specified.
True
indicates a logged in user and False
indicates guest user.
false
The 24 character system-generated ID of the logged-in user. This is auto-generated based on the Authorization Token (JWT token from the Login API) specified in the Headers.
"5e2cfb9b45570b000864c4b5"
The coupon codes applied by the user.
["300DOFF"]
Response
Successful
True indicates the cart validation is successful and false indicates otherwise.
true
The item details.
The basic details (such as promoId, promoTitle, and type) of all the discounts applied to the cart.
The additional attributes of the discounts applied to the cart such as discount ID, unit, and value of discount, along with the basic details.