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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.
24The 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.
"2022-09-06T14:07:17.000Z"
A unique request ID.
"263e731c-45c8-11ed-b878-0242ac120002"
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.
"12"
A sample cart evaluation request.
The details of items in the cart.
Customer details
Promotion codes to be applied
Promotion code
The language code, which is a combination of language in ISO 639 format and country in ISO 3166 format. The default value is en-US.
"en-US"
OK
The response of the evaluation request of the cart promotion.
The list of items in the cart.
The error details.
The list of errors.
["Parameter doesn't exist"]The details of the discounts applied to the cart.
[
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"couponCode": "SUPERCOUPON20",
"type": "COUPON",
"amount": 105.15,
"discountScope": "SKU",
"discountType": "AMOUNT_OFF",
"value": 10
}
]Suggested free products
[
{
"promotionId": "6197ec46e836ff000952c665",
"promotionName": "Buy shoes get socks for free",
"itemId": 234343,
"itemIds": [1120201, 1120202],
"sku": "SHOE1234",
"skus": ["SHOE-1", "SHOE-2"],
"eligiblePriceLists": [10000],
"quantity": 2,
"promotionQuantity": 10,
"isFree": true,
"discountType": "PERCENTAGE_OFF",
"amount": 105.15
}
]Rejected coupons
[
{
"couponCode": "SUPERCOUPON",
"promotionId": "624b5aa2a8fd12000965dfdc",
"message": "Invalid coupon"
}
]The promotion message that is displayed to the customer.