Evaluate cart promotions
Evaluate cart’s total cost instantly, after applying all applicable promotions and discount coupons. Using this endpoint, submit a range of data that will be referenced against the conditions that are set earlier using the promotions, coupons or prices APIs. The response includes the details of the promotions and discounts applied. These promotions and discounts can be displayed on your website to help shoppers know that they’re getting their expected discounts.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.
24
The Date and time, in ISO 8601 format, for which the evaluation should be done. The prices and promotions that are active on this date will be considered for evaluation.
A unique request ID.
x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.
Body
A sample cart evaluation request.
The details of items in the cart.
Customer details
Promotion codes to be applied
The language code, which is a combination of language (ISO 639 format) and country (ISO 3166 format). <br>Default value is en-US.
Response
The response of the evaluation request of the cart promotion.
The list of items in the cart.
The error details.
The details of the discounts applied to the cart.
Suggested free products
Rejected coupons
Message description for the promotion
Was this page helpful?