Introduction
Retrieving data
Updating data

Retrieving hotel list - http://xml.tobook.com/retrieveHotelList.asp

Description

This function can be used for retrieving properties belonging to a specific hotelchain.

Click here to see a demo of this function.

back to top

Prerequisites

A valid username with the corresponding password used for logging in to the hotelchain section of toBook.com.
A unique ID of the hotelchain in the system of toBook.com.

back to top

Request XML - Structure

Node Data type Field type Description
Request      
Authentication      
Username string Mandatory Username used for login
Password string Mandatory Password used for login
ChainID integer Mandatory Unique ID of the hotelchain in the toBook.com system.

back to top

Request XML - Example

<?xml version="1.0" encoding="utf-8" ?>
<Request>
  <Authentication>
    <Username>gentest</Username>
    <Password>gen2008</Password>
    <ChainID>46</ChainID>
  </Authentication>
</Request>
    

back to top

Response XML - Structure

If the submitted Username / Password / ChainID are valid, the response contains some information (hotelID and hotelName) about the hotels belonging to the chain.

Node Data type Field type Description
Response      
ChainID integer Mandatory Unique ID of the hotelchain in the toBook.com system
Status string Mandatory Result of the request.
Hotel     List of hotels belonging to the hotelchain
HotelID integer Mandatory Unique ID of the hotel in the toBook.com system
HotelName string Mandatory Name of the hotel

If the validation prcoess fails, the response contains a short description about the error.

Node Data type Field type Description
Response      
ErrorDesc string Mandatory Short description of the error (eq. "Could't parse the received XML.", "Authentication failed, check Username, Password and ChainID nodes.")
Status string Mandatory Result of the request.

back to top

Response XML - Example

<?xml version="1.0" encoding="utf-8"?>
<Response>
  <ChainID>46</ChainID>
  <Status>Success</Status>
  <Hotel>
    <HotelID>463</HotelID>
    <HotelName>Test Whites Hotel</HotelName>
  </Hotel>
</Response>
    
<?xml version="1.0" encoding="utf-8"?>
<Response>
  <ErrorDesc>Could't parse the received XML.</ErrorDesc>
  <Status>Failure</Status>
</Response>
    
<?xml version="1.0" encoding="utf-8"?>
<Response>
  <ErrorDesc>Login failed, check Username, Password and ChainID nodes.</ErrorDesc>
  <Status>Failure</Status>
</Response>
    

back to top