GetVoucher
Endpoint URL | https://www.yournetosite.com.au/do/WS/NetoAPI | ||||||||
Method | POST | ||||||||
XML Headers |
|
||||||||
JSON Headers |
|
||||||||
Description | |||||||||
XSD Schema | GetVoucher XSD | GetVoucher Response XSD |
GetVoucher Post
You must specify at least one filter and one OutputSelector in your GetVoucher request. These will determine the results returned.
XML POST
<?xml version="1.0" encoding="utf-8"?>
<GetVoucher>
<Filter>
<VoucherID>(Integer)</VoucherID>
<VoucherProgramID>(Integer)</VoucherProgramID>
<VoucherTitle>(String)</VoucherTitle>
<VoucherCode>(String)</VoucherCode>
<VoucherProgram>(String)</VoucherProgram>
<ProgramType>Reward</ProgramType>
<ProgramType>Gift</ProgramType>
<ProgramType>Third Party</ProgramType>
<IsRedeemed>(Boolean)</IsRedeemed>
<DateAddedFrom>(DateTime)</DateAddedFrom>
<DateAddedTo>(DateTime)</DateAddedTo>
<DateUpdatedFrom>(DateTime)</DateUpdatedFrom>
<DateUpdatedTo>(DateTime)</DateUpdatedTo>
<Owner>(String)</Owner>
<SenderEmail>(String)</SenderEmail>
<RecipientEmail>(String)</RecipientEmail>
<CreatedFromOrderID>(String)</CreatedFromOrderID>
<OutputSelector>VoucherID</OutputSelector>
<OutputSelector>VoucherProgramID</OutputSelector>
<OutputSelector>VoucherTitle</OutputSelector>
<OutputSelector>VoucherCode</OutputSelector>
<OutputSelector>SecretKey</OutputSelector>
<OutputSelector>IsRedeemed</OutputSelector>
<OutputSelector>ProgramType</OutputSelector>
<OutputSelector>Owner</OutputSelector>
<OutputSelector>Email</OutputSelector>
<OutputSelector>CreatedFromOrderID</OutputSelector>
<OutputSelector>DateAdded</OutputSelector>
<OutputSelector>DateUpdated</OutputSelector>
<OutputSelector>Balance</OutputSelector>
<OutputSelector>VoucherUsage</OutputSelector>
<OutputSelector>CreditHistory</OutputSelector>
<OutputSelector>UsageHistory</OutputSelector>
</Filter>
</GetVoucher>
JSON POST
{
"Filter": {
"VoucherID":["Integer"/*, ...*/],
"VoucherProgramID":["Integer"/*, ...*/],
"VoucherTitle":["String"/*, ...*/],
"VoucherCode":["String"/*, ...*/],
"VoucherProgram":["String"/*, ...*/],
"ProgramType":["Enumeration"/*, ...*/],
"IsRedeemed":"Boolean",
"DateAddedFrom":"DateTime",
"DateAddedTo":"DateTime",
"DateUpdatedFrom":"DateTime",
"DateUpdatedTo":"DateTime",
"Owner":["String"/*, ...*/],
"SenderEmail":["String"/*, ...*/],
"RecipientEmail":["String"/*, ...*/],
"CreatedFromOrderID":["String"/*, ...*/],
"OutputSelector":["Enumeration"/*, ...*/]
}
}
<Filter>
Element Name | Required | Field Type / Options |
---|---|---|
VoucherID | Optional Supports Multiple Elements |
Integer(10) |
VoucherProgramID | Optional Supports Multiple Elements |
Integer(10) |
VoucherTitle | Optional Supports Multiple Elements |
String(50) |
VoucherCode | Optional Supports Multiple Elements |
String(25) |
VoucherProgram | Optional Supports Multiple Elements |
String(50) |
ProgramType | Optional Supports Multiple Elements |
Enumeration(Reward, Gift, Third Party) |
IsRedeemed | Optional | Boolean(True, False) |
DateAddedFrom | Optional | DateTime |
DateAddedTo | Optional | DateTime |
DateUpdatedFrom | Optional | DateTime |
DateUpdatedTo | Optional | DateTime |
Owner | Optional Supports Multiple Elements |
String(25) |
SenderEmail | Optional Supports Multiple Elements |
String(50) |
RecipientEmail | Optional Supports Multiple Elements |
String(50) |
CreatedFromOrderID | Optional Supports Multiple Elements |
String(15) |
<OutputSelector>
Determines what is returned by the POST. Refer to the example response below this table or the related XSD schema for details and restrictions of each output element.
Note: Each OutputSelector should be a separate element in your post.
OutputSelector | Enumeration (VoucherID, VoucherProgramID, VoucherTitle, VoucherCode, SecretKey, IsRedeemed, ProgramType, Owner, Email, CreatedFromOrderID, DateAdded, DateUpdated, Balance, VoucherUsage, CreditHistory, UsageHistory) |
GetVoucher Responses
XML Response
<?xml version="1.0" encoding="utf-8"?>
<GetVoucher>
<Voucher>
<VoucherID>(Integer)</VoucherID>
<VoucherProgramID>(Integer)</VoucherProgramID>
<VoucherTitle>(String)</VoucherTitle>
<VoucherCode>(String)</VoucherCode>
<SecretKey>(String)</SecretKey>
<IsRedeemed>(String)</IsRedeemed>
<Owner>(String)</Owner>
<Email>(String)</Email>
<CreatedFromOrderID>(String)</CreatedFromOrderID>
<DateAdded>(DateTime)</DateAdded>
<DateUpdated>(DateTime)</DateUpdated>
<Balance>(Decimal)</Balance>
<IsSingleUse>(String)</IsSingleUse>
<VoucherProgram>(String)</VoucherProgram>
<ProgramType>(String)</ProgramType>
<ListOfCreditHistory>
<CreditHistory>
<OrderID>(String)</OrderID>
<Status>(String)</Status>
<AmountCredited>(Decimal)</AmountCredited>
<TotalAmountUsed>(Decimal)</TotalAmountUsed>
<Balance>(Decimal)</Balance>
<DateAdded>(DateTime)</DateAdded>
<ExpiryDate>(DateTime)</ExpiryDate>
</CreditHistory>
</ListOfCreditHistory> <ListOfUsageHistory>
<UsageHistory>
<OrderID>(String)</OrderID>
<PaymentID>(Integer)</PaymentID>
<Amount>(Decimal)</Amount>
<DateUsed>(DateTime)</DateUsed>
</UsageHistory>
</ListOfUsageHistory> </Voucher>
<Messages>
<Error>
<Message>(String)</Message>
<SeverityCode>(String)</SeverityCode>
<Description>(String)</Description>
</Error>
<Warning>
<Message>(String)</Message>
<SeverityCode>(String)</SeverityCode>
</Warning>
</Messages>
</GetVoucher>
JSON Response
{
"Voucher": [ {
"VoucherID":"Integer",
"VoucherProgramID":"Integer",
"VoucherTitle":"String",
"VoucherCode":"String",
"SecretKey":"String",
"IsRedeemed":"String",
"Owner":"String",
"Email":"String",
"CreatedFromOrderID":"String",
"DateAdded":"DateTime",
"DateUpdated":"DateTime",
"Balance":"Decimal",
"IsSingleUse":"String",
"VoucherProgram":"String",
"ProgramType":"String",
"ListOfCreditHistory": {
"CreditHistory": [ {
"OrderID":"String",
"Status":"String",
"AmountCredited":"Decimal",
"TotalAmountUsed":"Decimal",
"Balance":"Decimal",
"DateAdded":"DateTime",
"ExpiryDate":"DateTime"
} ]
} , "ListOfUsageHistory": {
"UsageHistory": [ {
"OrderID":"String",
"PaymentID":"Integer",
"Amount":"Decimal",
"DateUsed":"DateTime"
} ]
}
} ] , "Messages": {
"Error": [ {
"Message":"String",
"SeverityCode":"String",
"Description":"String"
} ] , "Warning": [ {
"Message":"String",
"SeverityCode":"String"
} ]
}
}
<Voucher>
Element Name | Field Type |
---|---|
VoucherID | Integer |
VoucherProgramID | Integer |
VoucherTitle | String |
VoucherCode | String |
SecretKey | String |
IsRedeemed | String |
Owner | String |
String | |
CreatedFromOrderID | String |
DateAdded | DateTime |
DateUpdated | DateTime |
Balance | Decimal |
IsSingleUse | String |
VoucherProgram | String |
ProgramType | String |
ListOfCreditHistory | ListOfCreditHistoryType |
ListOfUsageHistory | ListOfUsageHistoryType |
<ListOfCreditHistory>
Element Name | Field Type |
---|---|
CreditHistory | CreditHistoryType |
<CreditHistory>
Element Name | Field Type |
---|---|
OrderID | String |
Status | String |
AmountCredited | Decimal |
TotalAmountUsed | Decimal |
Balance | Decimal |
DateAdded | DateTime |
ExpiryDate | DateTime |
<ListOfUsageHistory>
Element Name | Field Type |
---|---|
UsageHistory | UsageHistoryType |
<UsageHistory>
Element Name | Field Type |
---|---|
OrderID | String |
PaymentID | Integer |
Amount | Decimal |
DateUsed | DateTime |
<Messages>
Element Name | Field Type |
---|---|
Error | ErrorType |
Warning | WarningType |
<Error>
Element Name | Field Type |
---|---|
Message | String |
SeverityCode | String |
Description | String |
<Warning>
Element Name | Field Type |
---|---|
Message | String |
SeverityCode | String |