AddVoucher

Overview

Endpoint URL https://www.yournetosite.com.au/do/WS/NetoAPI
Method POST
XML Headers
NETOAPI_ACTION AddVoucher
NETOAPI_USERNAME Your Neto Username (generate this in your Neto control panel)
NETOAPI_KEY Your Neto API Secure Key (generate this in your Neto control panel)
JSON Headers
NETOAPI_ACTION AddVoucher
NETOAPI_USERNAME Your Neto Username (generate this in your Neto control panel)
NETOAPI_KEY Your Neto API Secure Key (generate this in your Neto control panel)
Accept application/json
Description
XSD Schema AddVoucher XSD   |   AddVoucher Response XSD

AddVoucher Post

You must specify at least one filter and one OutputSelector in your AddVoucher request. These will determine the results returned.

XML POST

<?xml version="1.0" encoding="utf-8"?>
<AddVoucher>
   <Voucher> 
    <OrderID>(String)</OrderID>    
    <SKU>(String)</SKU>    
    <SenderEmail>(String)</SenderEmail>    
    <SenderName>(String)</SenderName>    
    <RecipientName>(String)</RecipientName>    
    <RecipientEmail>(String)</RecipientEmail>    
    <GiftMessage>(String)</GiftMessage>    
    <DateSendVoucher>(DateTime)</DateSendVoucher>    
   </Voucher>  

</AddVoucher>

JSON POST

{
  "Voucher": [ {
    "OrderID":"String",
    "SKU":"String",
    "SenderEmail":"String",
    "SenderName":"String",
    "RecipientName":"String",
    "RecipientEmail":"String",
    "GiftMessage":"String",
    "DateSendVoucher":"DateTime" 
} ] 
}

<Voucher>

Element Name Required Field Type / Options
OrderID Required String(15)
SKU Required String(25)
SenderEmail Optional String(50)
SenderName Optional String(100)
RecipientName Optional String(100)
RecipientEmail Optional String(50)
GiftMessage Optional String(1000)
DateSendVoucher Optional DateTime

AddVoucher Responses

XML Response

<?xml version="1.0" encoding="utf-8"?>
<AddVoucher>
   <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>
</AddVoucher>

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
Email 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

If you are a vendor creating an integration with neto, we would like to hear from you!

Contact Us

Was this article useful?

Be notified when this page is updated. Optional.