Get Invoices
Request Profile Table
Element | @Attribute |
Description/Contents |
GetInvoices_RQ |
Root element of message. |
@WebResUsername |
The WebRes username of the requesting agent. |
@WebResPassword |
The WebRes password of the requesting agent. |
@FromDate |
The start of the date range to get invoices for. |
@ToDate |
The end of the date range to get invoices for. |
Scenario:
You want to retrieve all the invoices from midnight on January 1st 2008, to the last second of December 31st 2008, AEST.
Example message:
<?xml version="1.0" encoding="utf-8"?>
<GetInvoices_RQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" WebResUsername="myuser" WebResPassword="mypassword" FromDate="2008-01-01T00:00:00+10:00" ToDate="2008-12-31T23:59:59+10:00" />
Response Profile Table
Element | @Attribute |
Description/Contents |
GetInvoices_RS |
Root element of message. |
Invoices |
Element indicating a list of Invoices. |
Invoice |
Element indicating a package. |
@ID |
The invoice number/ID. |
@CreationDate |
The date/time the invoice was created. |
Items |
Element indicated a list of invoice items. |
InvoiceItem |
Element defining an invoice item. |
@VoucherRef |
The voucher reference code |
@VoucherType |
The voucher type code. Usually "A" for an accommodation voucher or "O" for an operator voucher. |
@Booking |
The booking number the voucher is for. |
@SupplierRef (optional) |
The suppliers reference code for the voucher. |
@Description |
The voucher description. |
@NetCost |
The net cost of the voucher. |
@Currency |
Currency code for the voucher. |
@Quantity |
The quantity of the voucher allocated. |
@TotalNetCost |
The total net cost of the specified quantity of vouchers. |
TotalQuantity |
The total number of vouchers on this invoice. |
TotalCost |
The total cost of the vouchers on this invoice. |
Currency |
Currency code for the invoice. |
TotalQuantity |
The total number of vouchers returned from the request. |
TotalCost |
The total cost of the vouchers returned from the request. |
Example message:
<?xml version="1.0" encoding="utf-16"?>
<GetInvoices_RS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<TimeStamp xmlns="ResLink">2009-01-19T13:57:12.2784963+10:00</TimeStamp>
<Errors xmlns="ResLink" />
<Warnings xmlns="ResLink" />
<TotalQuantity xmlns="ResLink">9</TotalQuantity>
<TotalCost xmlns="ResLink">135</TotalCost>
<Currency xmlns="ResLink">AUD</Currency>
<Invoices xmlns="ResLink">
<Invoice ID="1234" CreationDate="2008-01-30T15:37:01">
<TotalQuantity>2</TotalQuantity>
<TotalCost>30</TotalCost>
<Items>
<InvoiceItem VoucherRef="SDF43G" VoucherType="A" Booking="4321" Description="Accommodation Voucher" NetCost="15" Quantity="1" TotalNetCost="15" Currency="AUD" />
<InvoiceItem VoucherRef="54XI1A" VoucherType="A" Booking="4322" Description="Accommodation Voucher" NetCost="15" Quantity="1" TotalNetCost="15" Currency="AUD" />
</Items>
</Invoice>
<Invoice ID="7894" CreationDate="2008-02-18T11:30:02">
<TotalQuantity>7</TotalQuantity>
<TotalCost>105</TotalCost>
<Items>
<InvoiceItem VoucherRef="SAL504" VoucherType="A" Booking="45369" Description="Accommodation Voucher" NetCost="15" Quantity="4" TotalNetCost="60" Currency="AUD" />
<InvoiceItem VoucherRef="R4CYGM" VoucherType="A" Booking="45368" Description="Accommodation Voucher" NetCost="15" Quantity="2" TotalNetCost="30" Currency="AUD" />
<InvoiceItem VoucherRef="VUWU6I" VoucherType="A" Booking="45352" Description="Accommodation Voucher" NetCost="15" Quantity="1" TotalNetCost="15" Currency="AUD" />
</Items>
</Invoice>
</Invoices>
</GetInvoices_RS>