POST API/Promotion/ApplySuggestedPromotion?onlineOrderId={onlineOrderId}&orderId={orderId}&promotionId={promotionId}&quantityEarned={quantityEarned}&calcTaxes={calcTaxes}
This API will provide the ability to apply any suggested promotions the user/order qualifies for. By passing in the suggested items, and the identifies for the order and promotion (as well as the quantity earned), the qualifying suggested promotions can be applied to the order.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
onlineOrderId |
If this is for an onilne order, pass in the online order. You would never need both the online order and the order id. |
integer |
Default value is 0 |
orderId |
If this is for a regular order, pass in the order id. You would never need both the online order and the order id. |
integer |
Default value is 0 |
promotionId |
The promotion id for the suggested promotion. |
integer |
Default value is 0 |
quantityEarned |
The quantity earned for the suggested promotion. |
integer |
Default value is 0 |
calcTaxes | boolean |
Default value is True |
Body Parameters
This is the list of products and quantities the user selected for the qualifying suggested promotions
Collection of SuggestedPromotionViewModelName | Description | Type | Additional information |
---|---|---|---|
ProductId | string |
None. |
|
Quantity | integer |
None. |
Request Formats
application/xml, text/xml
<ListOfSuggestedPromotionViewModel> <SuggestedPromotionViewModel> <ProductId>sample string 1</ProductId> <Quantity>2</Quantity> </SuggestedPromotionViewModel> <SuggestedPromotionViewModel> <ProductId>sample string 1</ProductId> <Quantity>2</Quantity> </SuggestedPromotionViewModel> </ListOfSuggestedPromotionViewModel>
application/json, text/json
[ { "ProductId": "sample string 1", "Quantity": 2 }, { "ProductId": "sample string 1", "Quantity": 2 } ]
application/x-www-form-urlencoded
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/xml, text/xml, application/json, text/json
Sample not available.