...
Response that does not contain a cart or product level discountsdiscount
Code Block |
---|
{ "balances": [ { "amount": 14464, "currency": "points" } ], "loyaltyUser": { "created": "2021-08-10T12:18:39.180Z", "id": "4711fc2a-3a8f-414f-a9e7-44dd5231dca7", "name": "Farhan" }, "order": [ { "productId": "Reward PLU", "incentiveId": "Sanity ID of Reward" "quantity": 1, "price": 0, "productType": "reward", "referenceId": "00", // unique line id }, { "productId": "Offer PLU", "incentiveId": "Sanity ID of Offer" "quantity": 1, "productType": "offer", "referenceId": "00", // unique line id }, ], "transactionId": "f4190848-169d-4c69-9f53-f916318c432b" // uuid of the loyalty order/transaction } |
...
Response that contain a cart or product level discount: Cart and Product Level Discounts
Code Block |
---|
{ "balances": [ { "amount": 14464, "currency": "points" } ], "eligibleDiscounts": [ { "details": { "displayName": "20% off order", "discountValue": 20, "subtype": "PERCENTAGE_DISCOUNT or AMOUNT_DISCOUNT", "type": "offer" or "reward" }, "incentiveId": "$sanityIncentiveId", "productId": "$incentivePlu", "referenceId": "$incentiveLoyaltyId" } ], "loyaltyUser": { "created": "2021-08-10T12:18:39.180Z", "id": "$loyaltyUserId", "name": "$loyaltyUserName" }, "order": [], "transactionId": "$loyaltyTransactionId" } |
...