POST v1/Discounts/{siteId}/{orderId}
Apply discount to order. On a successful call, you will get the order object back and a null
CouponRejectionReason.
If there is a problem applying the discount, you'll get a CouponRejectionReason and a null order back, since the
order was unaffected.
URI template
v1/Discounts/{siteId}/{orderId}Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
siteId | integer |
Required |
|
orderId | integer |
Required |
Body Parameters
stringRequest Formats
application/json, text/json
Sample:
"sample string 1"
application/xml, text/xml
Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>
Response Information
Resource Description
Known internal error is BadRequest
AddCouponToOrderResultName | Description | Type | Additional information |
---|---|---|---|
Order |
The modified order with the coupon applied to it |
ExternalOrder |
None. |
CouponRejectionReason |
The reason why adding this coupon was a failure |
CouponRejectionReason |
None. |
FinancialSummary |
Financial Summary |
FinancialSummary |
None. |
Response Formats
application/json, text/json
Sample:
{ "Order": null, "CouponRejectionReason": 0, "FinancialSummary": null }
application/xml, text/xml
Sample:
<AddCouponToOrderResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1.Response"> <CouponRejectionReason>None</CouponRejectionReason> <FinancialSummary xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" /> <Order xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" /> </AddCouponToOrderResult>