GET v1/Loyalty/AvailableRewards/{siteId}/{orderId}
This call retrieves available loyalty rewards for an order.
If you wish to process loyalty transactions for a customer's order in the cloud, use this functionality. When you make this api call, the order information (as identified by the siteId and the orderId in the url) is used to discern the loyalty rewards this customer might qualify for, based on the items in the order, the site in question, and the customer's loyalty account. The response for this call will contain the merited rewards from the loyalty processor that has been setup for you (in the admin website). You may offer these rewards to your customer, and have them choose which rewards they might like to redeem. Based on this selection, the RedeemRewards api call should then be made to inform us of this selection, and to get updated order totals based on the rewards that have been selected for redemption.
NOTE: This call can only be made after a PUT Orders call has been made, using the orderId and the siteId returned from that call.
If you wish to process loyalty transactions for a customer's order in the cloud, use this functionality. When you make this api call, the order information (as identified by the siteId and the orderId in the url) is used to discern the loyalty rewards this customer might qualify for, based on the items in the order, the site in question, and the customer's loyalty account. The response for this call will contain the merited rewards from the loyalty processor that has been setup for you (in the admin website). You may offer these rewards to your customer, and have them choose which rewards they might like to redeem. Based on this selection, the RedeemRewards api call should then be made to inform us of this selection, and to get updated order totals based on the rewards that have been selected for redemption.
NOTE: This call can only be made after a PUT Orders call has been made, using the orderId and the siteId returned from that call.
URI template
v1/Loyalty/AvailableRewards/{siteId}/{orderId}Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
siteId |
Identifies the site where the customer has placed their order |
integer |
Required |
orderId |
Identifies the order in question |
integer |
Required |
Body Parameters
None.
Response Information
Resource Description
Available rewards for the order, specified by order id
GetAvailableLoyaltyRewardsResultName | Description | Type | Additional information |
---|---|---|---|
Rewards |
The eligible rewards from Aloha Loyalty |
AlohaLoyaltyRewardsContent |
None. |
PromotionsServiceResponse |
Only use this field if using PES. This is the result from PES Loyalty Call |
PesGetPromotionsServiceResponse |
None. |
Response Formats
application/json, text/json
Sample:
{ "Rewards": { "$id": "2", "HeadCheckText": "<PRINTSTYLE><CPI>1</CPI><STYLE>0</STYLE></PRINTSTYLE><RED>0</RED>\n <PRINTLINE>Tony Stark</PRINTLINE>\n <PRINTLINE>Item Based - $ off Item</PRINTLINE>\n <PRINTLINE>63000*****0010</PRINTLINE>\n", "MaximumRewardsToAccept": 0, "MemberText": "Tony Stark", "PrintAsVoucher": false, "PrintRewardCheckText": false, "RejectedHeadCheckText": "<PRINTSTYLE><CPI>1</CPI><STYLE>0</STYLE></PRINTSTYLE><RED>0</RED>\n <PRINTLINE>Tony Stark</PRINTLINE>\n <PRINTLINE>Item Based - $ off Item</PRINTLINE>\n <PRINTLINE>63000*****0010</PRINTLINE>\n", "RejectedTailCheckText": "", "Rewards": [ { "$id": "3", "AutoRejectReward": false, "CheckItemDiscounts": [ { "$id": "4", "ItemLineNumber": 1, "PosSalesItemId": 291, "PosModifierId": 0, "Discount": 1.0, "DiscountedItemName": "Pepperoni Pizza" } ], "CheckText": null, "DiscountId": 20, "DiscountText": "<PRINTLINE>$1.00 off pizza -1.00</PRINTLINE>", "DiscountUpToDiscountAmount": true, "HstRewardProgramId": 303, "Iteration": 341, "PrintOnVoucher": false, "RewardProgramId": 6, "RewardType": 0, "TierId": 5, "TierName": "$1.00 off pizza", "VoucherText1": null } ], "TailCheckText": "", "VoucherText": "", "CardNumber": "63000000000010" }, "PromotionsServiceResponse": null }
application/xml, text/xml
Sample:
<GetAvailableLoyaltyRewardsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1.Response"> <PromotionsServiceResponse xmlns:d2p1="http://schemas.datacontract.org/2004/07/Radiant.Order.Shared.Contracts.ServiceEntities.Entities.PesLoyalty" i:nil="true" /> <Rewards xmlns:d2p1="http://schemas.datacontract.org/2004/07/Radiant.Order.Shared.Contracts.ServiceEntities"> <d2p1:CardNumber>63000000000010</d2p1:CardNumber> <d2p1:HeadCheckText><PRINTSTYLE><CPI>1</CPI><STYLE>0</STYLE></PRINTSTYLE><RED>0</RED> <PRINTLINE>Tony Stark</PRINTLINE> <PRINTLINE>Item Based - $ off Item</PRINTLINE> <PRINTLINE>63000*****0010</PRINTLINE> </d2p1:HeadCheckText> <d2p1:MaximumRewardsToAccept>0</d2p1:MaximumRewardsToAccept> <d2p1:MemberText>Tony Stark</d2p1:MemberText> <d2p1:PrintAsVoucher>false</d2p1:PrintAsVoucher> <d2p1:PrintRewardCheckText>false</d2p1:PrintRewardCheckText> <d2p1:RejectedHeadCheckText><PRINTSTYLE><CPI>1</CPI><STYLE>0</STYLE></PRINTSTYLE><RED>0</RED> <PRINTLINE>Tony Stark</PRINTLINE> <PRINTLINE>Item Based - $ off Item</PRINTLINE> <PRINTLINE>63000*****0010</PRINTLINE> </d2p1:RejectedHeadCheckText> <d2p1:RejectedTailCheckText></d2p1:RejectedTailCheckText> <d2p1:Rewards> <d2p1:RewardDetails> <d2p1:AutoRejectReward>false</d2p1:AutoRejectReward> <d2p1:CheckItemDiscounts> <d2p1:CheckItemDiscount> <d2p1:Discount>1</d2p1:Discount> <d2p1:DiscountedItemName>Pepperoni Pizza</d2p1:DiscountedItemName> <d2p1:ItemLineNumber>1</d2p1:ItemLineNumber> <d2p1:PosModifierId>0</d2p1:PosModifierId> <d2p1:PosSalesItemId>291</d2p1:PosSalesItemId> </d2p1:CheckItemDiscount> </d2p1:CheckItemDiscounts> <d2p1:CheckText i:nil="true" /> <d2p1:DiscountId>20</d2p1:DiscountId> <d2p1:DiscountText><PRINTLINE>$1.00 off pizza -1.00</PRINTLINE></d2p1:DiscountText> <d2p1:DiscountUpToDiscountAmount>true</d2p1:DiscountUpToDiscountAmount> <d2p1:HstRewardProgramId>303</d2p1:HstRewardProgramId> <d2p1:Iteration>341</d2p1:Iteration> <d2p1:PrintOnVoucher>false</d2p1:PrintOnVoucher> <d2p1:RewardProgramId>6</d2p1:RewardProgramId> <d2p1:RewardType>Comp</d2p1:RewardType> <d2p1:TierId>5</d2p1:TierId> <d2p1:TierName>$1.00 off pizza</d2p1:TierName> <d2p1:VoucherText1 i:nil="true" /> </d2p1:RewardDetails> </d2p1:Rewards> <d2p1:TailCheckText></d2p1:TailCheckText> <d2p1:VoucherText></d2p1:VoucherText> </Rewards> </GetAvailableLoyaltyRewardsResult>