The Legacy Pull Buyers API, our initial Buyers API launched in 2012, is now deprecated and should not be further developed. Instead, we introduced the Hotel-X Buyers API in 2017, which serves as the sole API for new Buyers looking to integrate and participate in our Marketplace.
Cancel
The Cancel operation allows you to cancel a booking made via Travelgate. The returned fields include: ProviderLocator
, CancelId
, TransactionStatus
, Price
etc.
The amount of information returned might vary between Sellers.
Cancel Request
<soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns = "http://schemas.xmltravelgate.com/hub/2012/06" xmlns:wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<soapenv:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ns:Cancel>
<ns:cancelRQ>
<ns:timeoutMilliseconds>20000</ns:timeoutMilliseconds>
<ns:version>1</ns:version>
<ns:providerRQ>
<ns:code>suppliercode</ns:code>
<ns:id>1</ns:id>
<ns:rqXML>
<CancelRQ xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd = "http://www.w3.org/2001/XMLSchema" hotelCode = "">
<timeoutMilliseconds>19700</timeoutMilliseconds>
<source>
<languageCode>en</languageCode>
</source>
<filterAuditData>
<registerTransactions>true</registerTransactions>
</filterAuditData>
<Configuration>
<User>user</User>
<Password>password</Password>
<UrlAvail>www.supplier.com/avail</UrlAvail>
<UrlReservation>www.supplier.com/reservation</UrlReservation>
<UrlValuation>www.supplier.com/valuation</UrlValuation>
<UrlGeneric>www.supplier.com/generic</UrlGeneric>
<Parameters>
<Parameter key = "UrlListHotels" value = "http://www.supplier.com/ListHotels"></Parameter>
<Parameter key = "Access" value = "2"></Parameter>
</Parameters>
</Configuration>
<Locators>
<Client>XXXXXXX</Client>
<Provider>XXXXXXX</Provider>
<Property>XXXXXXX</Property>
</Locators>
<StartDate>28/11/2014</StartDate>
<EndDate>28/11/2014</EndDate>
<Holder title = "Miss" name = "Test11" surname = "TestAp11"/>
</CancelRQ>
</ns:rqXML>
</ns:providerRQ>
</ns:cancelRQ>
</ns:Cancel>
</soapenv:Body>
</soapenv:Envelope>
Request Data Breakdown
Check the values you need to add in the header and common elements.
Element | Number | Type | Description |
---|---|---|---|
CancelRQ | 1 | Root node. | |
@hotelCode | 1 | String | Hotel code. |
CancelRQ/Locators | 1 | Locator Information (it's mandatory to indicate either the client or supplier's). | |
Locators/Client | 0..1 | String | Client locator. |
Locators/Provider | 0..1 | String | Supplier locator. |
Locators/Property | 0..1 | String | Property locator (see MetaData method in order to verify if the supplier implements it). |
CancelRQ/StartDate | 1 | String | Start date of booking. |
CancelRQ/EndDate | 1 | String | End date of booking. |
CancelRQ/Holder | 0..1 | Holder of the booking. | |
@title | 1 | String | Holder’s title. Possible values: Mr, Mrs, Miss, Ms |
@name | 1 | String | Holder's name. |
@surname | 1 | String | Holder's surname. |
Cancel Response
After each request, the Seller will process the data and provide you with a response. Upon receiving a Cancel
request, the Seller will send you a corresponding Cancel
response.
The response options include either success or an error. In the event of success, you will receive the transaction status.
Success
<CancelRS>
<ProviderLocator>YYYYYYYY</ProviderLocator>
<CancelId>0000000</CancelId>
<TransactionStatus>
<ComunicationStatus>OK</ComunicationStatus>
<RSStatus>EXISTE</RSStatus>
<ResStatus>CN</ResStatus>
</TransactionStatus>
<Price currency="EUR" amount="120.5" binding="false" commission="-1" minimumSellingPrice="-1"/>
</CancelRS>
Success Response Data Breakdown
Element | Rel | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CancelRS | 1 | Root node. | |||||||||||
CancelRS/ProviderLocator | 1 | String | Supplier locator. | ||||||||||
CancelRS/CancelId | 0..1 | String | Cancellation id. | ||||||||||
CancelRS/TransactionStatus | 1 | Transaction Status. | |||||||||||
TransactionStatus/ComunicationStatus | 1 | String | Status communication (OFFLINE, OK and KO). | ||||||||||
TransactionStatus/RSStatus | 1 | String | Response Status
| ||||||||||
TransactionStatus/ResStatus | 1 | String | Reservation Status
| ||||||||||
CancelRS/Price | 0..1 | Decimal | Fee for the cancellation. (see MetaData in order to verify if supplier informs of it). | ||||||||||
@currency | 1 | String | Currency code (Our system uses a standard ISO - 3 for all suppliers). | ||||||||||
@amount | 1 | Decimal | Amount. | ||||||||||
@binding | 1 | Boolean | If binding is set as true, then the client can’t sell the product for a lower price that the one set by the supplier. If it set as as false, the client can sell the product for a lower price. | ||||||||||
@commission | 1 | Decimal | Commission Scenarios
| ||||||||||
@minimumSellingPrice | 1 | Decimal | Indicates the minimum selling price it can be sold (determined by the Seller). If is specified (different than "-1"), that field takes preference to amount. Minimum Selling Price Scenarios
|
Error
<CancelRS>
<operationImplemented>true</operationImplemented>
<applicationError>
<code/>
<type>105</type>
<description>Communication Error.</description>
<httpStatusCode>0</httpStatusCode>
</applicationError>
</CancelRS>