This article will provide steps on how use vouchers in APIv3 BookReservation.
Step #1: Create a Voucher
If a voucher has not already been created; the steps on how to create vouchers are explained in this article.
Note
The name on the voucher does not need to be an existing passenger name, it can be anything. This name will be what is used for the voucher redemption in the booking request
Step #2: Getting the Voucher
In APIv3 use the GetVoucher request to get the details of the voucher you have created in ameliaRES.
Below is a sample of the request.
<tem:request> <int:Password>1234</int:Password> <int:Pin>1234</int:Pin> <int:RequestedCurrencyCode>EUR</int:RequestedCurrencyCode> <int:SerialNumber>FO8XO14J18</int:SerialNumber> </tem:request>
Here is a sample of the response:
<a:Voucher xmlns:b="http://schemas.datacontract.org/2004/07/InteliSys.Amelia"> <b:Airports/> <b:Available>1</b:Available> <b:Companies/> <b:Count>0</b:Count> <b:Currency> <b:Abbreviation>EUR</b:Abbreviation> <b:Description>Euro</b:Description> <b:ExchangeRate>1</b:ExchangeRate> <b:Format>#,##0.00</b:Format> </b:Currency> <b:CurrencyValue>2</b:CurrencyValue> <b:DefinedCurrencyValue>2</b:DefinedCurrencyValue> <b:DefinedValue>2</b:DefinedValue> <b:Expires>2017-08-27T00:00:00</b:Expires> <b:Fares/> <b:IncludeCharges>false</b:IncludeCharges> <b:Name>APITEST</b:Name> <b:PaxName>PERT, GREG</b:PaxName> <b:PinPasswordRequired>false</b:PinPasswordRequired> <b:Purchased>false</b:Purchased> <b:Status>NotAssigned</b:Status> <b:Transferrable>false</b:Transferrable> <b:UseOneTime>false</b:UseOneTime> <b:UsePayment>false</b:UsePayment> <b:ValidFrom>2017-02-28T00:00:00</b:ValidFrom> <b:ValidTo>2017-03-07T23:59:00</b:ValidTo> <b:Value>2</b:Value> </a:Voucher>
Step #3: Booking With a Voucher
Vouchers cannot be individually used in the booking request. They have to be associated with another payment form ( Credit Card or Third Party ). The value of the voucher will be deducted from the payment.
Voucher Payment with Credit Card
Here is the payment portion of a BookReservationRequest.
<int1:Payment> <int1:Amount>95.25</int1:Amount> <int1:CreditCardPayment> <int1:Address> <int1:Addr1>123 anywhere st</int1:Addr1> <int1:Addr2>apt 12</int1:Addr2> <int1:City>saint john</int1:City> <int1:CountryCode>CDN</int1:CountryCode> <int1:CountryDescription>Canada</int1:CountryDescription> <int1:PostalCode>e2e2e2</int1:PostalCode> <int1:ProvinceAbbreviation>nb</int1:ProvinceAbbreviation> <int1:ProvinceName>new brunswick</int1:ProvinceName> </int1:Address> <int1:CVV>377</int1:CVV> <int1:Email>email@email.com</int1:Email> <int1:ExpireYear>2017</int1:ExpireYear> <int1:ExpiryMonth>12</int1:ExpiryMonth> <int1:Firstname>Greg</int1:Firstname> <int1:Lastname>Pert</int1:Lastname> <int1:Number>4111111111111111</int1:Number> <int1:TypeCode>VI</int1:TypeCode> </int1:CreditCardPayment> <int1:CurrencyCode>EUR</int1:CurrencyCode> <int1:PaymentType>CreditCard</int1:PaymentType> <int1:ProcessingFee>0</int1:ProcessingFee> <int1:ProcessingFeeTax>0</int1:ProcessingFeeTax> <int1:RedeemVoucher> <int1:CurrencyCode>EUR</int1:CurrencyCode> <int1:Firstname>Pert</int1:Firstname> <---------------┐ <int1:Lastname>Bob</int1:Lastname> <-------------------- PaxName from the GetVoucher Response. <int1:PIN>1234</int1:PIN> <int1:Password>1234</int1:Password> <int1:RedeemAmount>2.00</int1:RedeemAmount> <int1:SerialNumber>FB6AGL5EOJ</int1:SerialNumber> </int1:RedeemVoucher> </int1:Payment>
Voucher with Third Party Payment
Here is the payment portion of a BookReservationRequest.
<int1:Payment> <int1:Amount>92.09</int1:Amount> <int1:CurrencyCode>EUR</int1:CurrencyCode> <int1:PaymentType>ThirdParty</int1:PaymentType> <int1:ProcessingFee>0</int1:ProcessingFee> <int1:ProcessingFeeTax>0</int1:ProcessingFeeTax> <int1:RedeemVoucher> <int1:CurrencyCode>EUR</int1:CurrencyCode> <int1:Firstname>Pert</int1:Firstname> <---------------┐ <int1:Lastname>Bob</int1:Lastname> <-------------------- PaxName from the GetVoucher Response. <int1:PIN>1234</int1:PIN> <int1:Password>1234</int1:Password> <int1:RedeemAmount>2.00</int1:RedeemAmount> <int1:SerialNumber>ADVUQ9UFNP</int1:SerialNumber> </int1:RedeemVoucher> <int1:ThirdPartyPayment> <int1:Amount>92.09</int1:Amount> <int1:CurrencyCode>EUR</int1:CurrencyCode> <int1:LanguageCode>EN</int1:LanguageCode> <int1:ReservationNumber>0</int1:ReservationNumber> <int1:TypeCode>AP</int1:TypeCode> </int1:ThirdPartyPayment> </int1:Payment>