POST

Get Eligible Triggers


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves eligible custom discount triggers based on the provided items.

This method is automatically called by Wix eCommerce to retrieve the custom discount triggers provided by your extension. This happens when actions are performed on the cart and checkout entities/pages. For example, when an item is added to the cart.

Endpoint
POST
{DEPLOYMENT-URI}/v1/get-eligible-triggers
Body Params
lineItemsArray <LineItem>maxItems 1000

List of line items in the cart/checkout.


triggersArray <TriggerToFilterBy>minItems 1maxItems 100

List of triggers to be checked for discount eligibility.


purchaseFlowIdstringformat GUID

Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.

Response Object
eligibleTriggersArray <EligibleTrigger>minItems 0maxItems 100

List of eligible triggers. These are used by the Discount Rules API and Wix eCommerce to apply the relevant discount.

Get eligible custom triggers - decoded JWT

The data payload will include the following object as an encoded JWT. For the purposes of this example, we show the request and response objects decoded.

Request
cURL
Response
JSON
Did this help?