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 = "22334"></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>
Error types that will be included in the response in the event of an error
Error Type | Error Description | Comments |
---|---|---|
101 | System Exception. | Exception not controlled or not classified as general exception. |
102 | Provider Error. | Seller returns a particular code/description for an error, which is then transmitted to you in our response. |
103 | Too many requests to the supplier. | Your account has surpassed the agreed-upon request limit with the Seller. |
104 | Connection Timeout With Provider. | The Seller's response time has exceeded the timeout set in the Buyer's request. |
105 | Communication Error. | The connection to the Seller has been refused (we haven't been able to connect to their system). |
105 | Payload too high. | The size of the response by the Seller surpasses the size limitation established on our side for optimal performance (20000 options or 15MB). |
204 | No results found. | Seller does not return any results for the specific availability criteria set in the Buyer's request (e.g. hotel, dates, market, etc.). |
205 | Room Candidate Not Supported. | The number of room candidates in your request exceeds the maximum set by the Seller. |
206 | Dates Not Supported. | Your availability request does not align with the Seller's date specifications. |
207 | Request XML not accepted by Supplier. | Your availability request does not align with the Seller's specifications. |
301 | Option Not Found In Valuation. | Seller fails to return the option previously chosen by the Buyer in Search response (the option is no longer available). This error can be encountered in Quote response and Book response (whenever the integration requires an additional Quote to the Seller). |
302 | Hotel not found. | Our system is unable to locate the hotel you requested in your Hotels (DescriptiveInfo) method |
303 | Booking not confirmed. | Seller hasn't been able to confirm a booking for some reason (is not very common and might be returned in reservation response). |