POST v1/Orders/{siteId}/{orderId}/ApplyRewards

Apply loyalty rewards to existing order

URI template

v1/Orders/{siteId}/{orderId}/ApplyRewards

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

Site id

integer

Required

orderId

Order id

integer

Required

Body Parameters

Reward information to be applied to order

InApplyRewards
NameDescriptionTypeAdditional information
Coupons

List of entered coupon codes whichs should be applied to the order

Collection of string

None.

Offers

List of selected offer IDs which should applied to the order

Collection of string

None.

BankedRewardsAmount

Amount of banked rewards to apply

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "Coupons": [
    "sample string 1",
    "sample string 2"
  ],
  "Offers": [
    "sample string 3",
    "sample string 4"
  ],
  "BankedRewardsAmount": 5.0
}

application/xml, text/xml

Sample:
<InApplyRewards xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Inbound">
  <BankedRewardsAmount>5</BankedRewardsAmount>
  <Coupons xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Coupons>
  <Offers xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 3</d2p1:string>
    <d2p1:string>sample string 4</d2p1:string>
  </Offers>
</InApplyRewards>

Response Information

Resource Description

The result object with updated order details that reflects applied rewards. Known internal errors are BadRequest

ApplyRewardsToOrderResult
NameDescriptionTypeAdditional information
AoCouponRejectionReason

The reason why adding this AO coupon was a failure

CouponRejectionReason

None.

ResultCode

Gets or sets the ResultCode

OrderResultCodes

None.

OrderId

ID of newly created order.

integer

None.

Order

Gets or sets the modified Order to be returned

ExternalOrder

None.

HasFailedItems

Indicates whether or not any of the items in the order failed

boolean

None.

FailedItems

List of all the Items that either failed or have modifiers that failed

Collection of ExternalLineItem

None.

FailedModifiers

List of all the Modifiers that either failed or have modifiers that failed

Collection of ExternalLineItemModifier

None.

ErrorMessage

The error message received from the AppDomain

string

None.

ErrorCode

The site communication error code

integer

None.

AmountDueAtSite

The payment amount due at the site upon pickup

decimal number

None.

LoyaltyResultCode

Result code of loyalty processing

LoyaltyResultCode

None.

LoyaltyMessage

Result code of loyalty processing

string

None.

FinancialSummary

This field will provide all the financial details related to the Order

FinancialSummary

None.

Response Formats

application/json, text/json

Sample:

Sample not available.

Error Description

Detailed description of errors.

APIErrors
NameDescriptionTypeAdditional information
Errors

Collection of APIError

None.