ResLink

Redeem Vouchers


Request Profile Table

Element | @Attribute Description/Contents
RedeemVouchers_RQ Root element of message.
  @WebResUsername The WebRes username of the requesting agent.
  @WebResPassword The WebRes password of the requesting agent.
  Vouchers Start element for list of vouchers to be redeemed.
    Voucher The voucher element.
      @VoucherRef The voucher reference code.
      @VoucherType The voucher type code. Typically "A" for an accommodation voucher or "O" for an operator voucher.

Scenario:

You want to redeem a selection of accommodation vouchers with the codes: FD45D5, 8S9F6F, SA0E8F


Example message:

<?xml version="1.0" encoding="utf-16"?>
<RedeemVouchers_RQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" WebResUsername="myuser" WebResPassword="mypassword">
  <Vouchers xmlns="ResLink">
    <Voucher VoucherRef="FD45D5" VoucherType="A" />
    <Voucher VoucherRef="8S9F6F" VoucherType="A" />
    <Voucher VoucherRef="SA0E8F" VoucherType="A" />
  </Vouchers>
</RedeemVouchers_RQ>


Response Profile Table

Element | @Attribute Description/Contents
RedeemVouchers_RS Root element of message.
  Vouchers Start element for list of vouchers requested to be redeemed.
    VoucherDetail Element containing information about the request result vouchers.
      @VoucherRef The voucher reference code.
      @VoucherType The voucher type code. Typically "A" for an accommodation voucher or "O" for an operator voucher.
      @Description The voucher description.
      @Quantity The quantity of the voucher that was issued.
      @NetCost The cost of a single unit of the voucher.
      @Currency Currency code for the voucher.
      @Redeemed The redemption status of the voucher.
      @DateRedeemed (optional) The date the voucher was redeemed.
      @Days Number of days for the voucher.
      @Nights Number of nights for the voucher.
      @Status The status of the voucher query. The messages (and corresponding codes) returned are:
Code Message
Redeemable Voucher redeemable. The voucher can be redeemed by the requesting WebRes user.
Redeemed Voucher redeemed. The voucher has been successfully redeemed.
DoesNotExist Voucher does not exist. The voucher reference code and type combination does not exist.
SupplierCannotRedeem Supplier cannot redeem voucher. This WebRes user (supplier) cannot redeem this type of voucher.
Inactive Voucher is inactive This voucher is inactive and cannot be redeemed or invoiced.
Cancelled Voucher has been cancelled This voucher has been cancelled and cannot be redeemed or invoiced.
WrongSupplier Wrong supplier This WebRes user (supplier) is not the supplier of this voucher.
AlreadyRedeemed Voucher already redeemed This voucher has already been redeemed.
UnrecognizedType Unrecognized type This voucher is not of a valid type. Should be "A" or "O".
  Status Element indicating the return status of the transaction.
    @Code A numerical code for the status.
    @Message (optional) The message of the status. The messages (and corresponding codes) returned are:
Code Message
0 Redemption of requested vouchers successful.
1 Failed to connect to database. ResLink was unable to connect to the target database.
2 Some vouchers could not be redeemed. Some or all of the vouchers requested to be redeemed could not be for various reasons. Refer to errors list for more information.

Example message:

<?xml version="1.0" encoding="utf-16"?>
<RedeemVouchers_RS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <TimeStamp xmlns="ResLink">2009-01-21T11:58:14.9859813+10:00</TimeStamp>
  <Errors xmlns="ResLink" />
  <Warnings xmlns="ResLink" />
  <Vouchers xmlns="ResLink">
    <VoucherDetail VoucherRef="FD45D5" VoucherType="A" Description="Accommodation Voucher " Quantity="2" NetCost="15" Redeemed="true" Status="Redeemed" Currency="AUD" Days="0" Nights="1" />
    <VoucherDetail VoucherRef="8S9F6F" VoucherType="A" Description="Accommodation Voucher " Quantity="1" NetCost="15" Redeemed="true" Status="Redeemed" Currency="AUD" Days="0" Nights="1" />
    <VoucherDetail VoucherRef="SA0E8F" VoucherType="A" Description="Accommodation Voucher " Quantity="1" NetCost="15" Redeemed="false" Status="AlreadyRedeemed" Currency="AUD" Days="0" Nights="1" />
  </Vouchers>
  <Status Code="0" xmlns="ResLink" />
</RedeemVouchers_RS>