ResLink

Query Vouchers


Request Profile Table

Element | @Attribute Description/Contents
QueryVouchers_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 query the status and details of a selection of accommodation vouchers with the codes: FD45D5, 8S9F6F, SA0E8F


Example message:

<?xml version="1.0" encoding="utf-16"?>
<QueryVouchers_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>
</QueryVouchers_RQ>


Response Profile Table

Element | @Attribute Description/Contents
QueryVouchers_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. (Only returned when using the RedeemVouchers web-service method.)
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".

Example message:

<?xml version="1.0" encoding="utf-16"?>
<QueryVouchers_RS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <TimeStamp xmlns="ResLink">2008-12-23T14:01:43.2932876+10:00</TimeStamp>
  <Errors xmlns="ResLink" />
  <Warnings xmlns="ResLink" />
  <Vouchers xmlns="ResLink">
    <VoucherDetail VoucherRef="FD45D5" VoucherType="A" Quantity="5" NetCost="20" Redeemed="true" DateRedeemed="2009-02-01T14:07:29" Status="AlreadyRedeemed" Currency="AUD" Days="0" Nights="1" />
    <VoucherDetail VoucherRef="8S9F6F" VoucherType="A" Quantity="0" NetCost="0" Redeemed="false" Status="DoesNotExist " Currency="AUD" Days="0" Nights="0" />
    <VoucherDetail VoucherRef="SA0E8F" VoucherType="A" Quantity="0" NetCost="0" Redeemed="false" Status="DoesNotExist " Currency="AUD" Days="0" Nights="0" />
  </Vouchers>
</QueryVouchers_RS>