Introduction
Retrieving data
Updating data

Retrieving roomtype list - http://xml.tobook.com/retrieveRoomtypeList.asp

Description

This function can be used for retrieving roomtypes belonging to a specific hotel.

Click here to see a demo of this function.

back to top

Prerequisites

A valid username with the corresponding password (case sensitive!) used for logging in to toBook.com.
A unique ID of the hotel in the system of toBook.com.

back to top

Request XML - Structure

When ChainID is submitted, username and password must belong to the hotelchain, otherwise to the specific hotel.

Node Data type Field type Description
Request      
Authentication      
Username string Mandatory Username used for login
Password string Mandatory Password used for login
ChainID integer Optional Unique ID of the hotelchain in the toBook.com system.
HotelID integer Mandatory Unique ID of the hotel 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>
    <HotelID>463</HotelID>
  </Authentication>
</Request>
    

back to top

Response XML - Structure

If the submitted Username / Password / ChainID are valid, the response contains some information (roomtypeID and roomtype) about the roomtypes belonging to the hotel.

Node Attribute Data type Field type Description
Response        
ChainID   integer Optional Unique ID of the hotelchain in the toBook.com system
HotelID   integer Mandatory Unique ID of the hotel in the toBook.com system
Status   string Mandatory Result of the request.
RoomType       List of roomtypes belonging to the hotel
  RoomTypeID integer Mandatory Unique ID of the roomtype and rate package in the toBook.com system
Note that like Expedia, availability/inventory is shared between rate packages at roomtype level
  RoomTypeName string Mandatory Unique identifying name of the roomtype
  SpecialRoomType integer Mandatory Type of the rate package to which the RoomTypeID refers:
0 - public rate with property's standard cancellation policy
1 - non-refundable rate

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

Node Data type Field type Description
Response      
ErrorDesc string Mandatory Short description of the error (eq. "Could't parse the received XML.", "Login failed, check Username, Password, HotelID or 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>
  <HotelID>463</HotelID>        
  <Status>Success</Status>
  <RoomType>
    <RoomTypeName>Basic single</RoomTypeName>
    <RoomTypeID>42614</RoomTypeID>
  </RoomType>
  <RoomType>
    <RoomTypeName>Basic twin</RoomTypeName>
    <RoomTypeID>17105</RoomTypeID>
    <SpecialRoomType>0</SpecialRoomType>
  </RoomType>
  <RoomType>
    <RoomTypeName>Quad</RoomTypeName>
    <RoomTypeID>8400</RoomTypeID>
    <SpecialRoomType>0</SpecialRoomType>
    
  </RoomType>
</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, HotelID or ChainID nodes.</ErrorDesc>
  <Status>Failure</Status>
</Response>
    

back to top