POST v1/StoredValueCards/AddValue/Loyalty
Purchase value to add to Aloha Loyalty StoredValue Card.
The site must have UseTakeoutPrice set to true.
The site must have EnableATODeposits set to true.
The company setting StoredValueApiSettings must be configured with JSON that contains positive non-zero values for: MenuId, MenuItemId, SalesItemId, SiteId, DesignId, and AEStoreId.
This call is dependent on the Company being configured and setup with an Aloha Loyalty StoredValue account.
This includes the company settings: AECompanyID, AEUserName, AEPassword.
In addition the appSettings.config must also contain AEWebServiceUserName and AEWebServicePassword.
URI template
v1/StoredValueCards/AddValue/LoyaltyRequest Information
URI Parameters
None.
Body Parameters
Contains value to add to the card as well as the Customer and payment information.
InLoyaltyStoredValueOrderInformationName | Description | Type | Additional information |
---|---|---|---|
CardNumber |
The card number to add value to |
string |
Required |
Value |
The value to add to the card |
decimal number |
Required |
Customer |
The customer that is placing the order If the customer already exists send up the customer's First and Last name also |
OrderCustomer |
Required |
PaymentMethod |
Information describing the Payment Method |
SecureCreditCardPayment | ClearCreditCardPayment | PayAtSitePayment | PrePaidPayment | StoredValueCardPayment | PreAuthorizedPayment |
Required |
Request Formats
application/json, text/json
Sample:
{ "CardNumber": null, "Value": 0.0, "Customer": null, "PaymentMethod": null }
application/xml, text/xml
Sample:
<InLoyaltyStoredValueOrderInformation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Inbound"> <CardNumber i:nil="true" /> <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" /> <PaymentMethod xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1" i:nil="true" /> <Payments xmlns:d2p1="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1.Payments" i:nil="true" /> <Value>0</Value> </InLoyaltyStoredValueOrderInformation>
Response Information
Resource Description
AddLoyaltyStoredValueResult object. Known internal errors are BadRequest, NotAcceptable, InvalidParameters, CompanySettingMissing, ValueNotFound, SiteNotInAcceptableOrderingState
AddLoyaltyStoredValueResultName | Description | Type | Additional information |
---|---|---|---|
AmountAdded |
The amount added to the card |
decimal number |
None. |
NewBalance |
The current blance on the card |
decimal number |
None. |
CardNumber |
The card number |
string |
None. |
Response Formats
application/json, text/json
Sample:
{ "AmountAdded": 1.0, "NewBalance": 2.0, "CardNumber": "sample string 3" }
application/xml, text/xml
Sample:
<AddLoyaltyStoredValueResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Models.v1.Response"> <AmountAdded>1</AmountAdded> <CardNumber>sample string 3</CardNumber> <NewBalance>2</NewBalance> </AddLoyaltyStoredValueResult>