POST
/
v1
/
promo
/
evaluate-promotions

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-site-context
string
required

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.

Body

application/json

Prices conditions

items
object[]
required

List of item information objects

date
string

Date for which the promotions to be evaluated

isLoggedIn
boolean

true: user logged in<br /> false: user is not logged in

promoCodes
string[]

A list of coupon codes that are applicable only for coupons. For coupons, the response includes promo codes associated with the coupon. For promotions, the response includes an empty array.

shipping
object[]

Shipping cost for the entire cart. You can use this shipping array if you want to add shipping cost for the entire cart.<br /> If you want to add shipping cost for individual items, you can provide details for each item using items.shippingMethodId and items.shippingPrice fields.

traceId
string

Trace ID, used to trace logs

userId
string

User ID

userProfile
object[]

Segment the user belongs to

Response

200 - application/json
appliedDiscounts
object[]
errors
string[]
items
object[]
notAppliedCoupons
object[]
shipping
object[]
success
boolean

Indicates if promotion is successfully evaluated

suggestedProducts
object[]