POST
/
v1
/
promo
/
evaluate-promotions

Authorizations

Authorization
string
headerrequired

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

traceId
string

Trace ID, used to trace logs

isLoggedIn
boolean

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

userId
string

User ID

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.

date
string

Date for which the promotions to be evaluated

userProfile
object[]

Segment the user belongs to

Response

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

Indicates if promotion is successfully evaluated