1. Help Center
  2. Buying on TravelgateX
  3. Hotel-X Development/Booking Flow: Search

Hotel-X Search - All you need to know about rooms in Search

All about rooms in Hotel-X Search Query

What is the occupancyrefID in SearchRS?

The OccupancyRefID it's the identifier of the room. If you request only one room, the OccupancyRefID will be always "1". If you request two rooms, for each option you will be informed to which room does an option belongs to (to Room "1" or Room "2").

 

Can I split the rooms returned within the Option node and book them separately?

The option node was created in order to guarantee that all rooms included in that specific option were bookable. Should you need to book separate rooms you should send 2 individual Search requests, one per room.

 

What is the maximum number of rooms and paxes/room allowed per reservation?

This information depends on each Seller. Our Metadata Query returns both the max. number of rooms and max. number of paxes/room allowed per reservation under the "maxNumberRoomCandidates" and "maxPaxInRoomCandidates" nodes, respectively. 

 

What is the "units" field returned under the "rooms" node in SearchRS?

It makes reference to the number of "same type" rooms available in the hotel (whether the information is returned or not will depend on the Seller).

 

How to structure a multi-room in HotelX

In order to avoid errors in your Query Search of more than 1 room, please, find below a sample structure of a multi-room:

{
    "criteriaSearch" : {
        "checkIn" : "2021-06-13",
        "checkOut" : "2021-06-16",
        "hotels" : [
            "XX"
        ],
        "language" : "EN",
        "currency" : "EUR",
        "market" : "XX",
        "nationality" : "XX",
        "occupancies" : [
            {
                "paxes" : [
                    {
                        "age" : 30
                    },
                    {
                        "age" : 30
                    }
                ]
            },
            {
                "paxes" : [
                    {
                        "age" : 30
                    },
                    {
                        "age" : 30
                    }
                ]
            },
            {
                "paxes" : [
                    {
                        "age" : 30
                    },
                    {
                        "age" : 30
                    }
                ]
            }
        ]
    },
    "filter" : {
        "access" : {
            "includes" : [
                "XXXX"
            ]
        }
    },
    "settings" : {
        "timeout" : 18000,
        "auditTransactions" : false,
        "client" : "XXXXXXXX",
        "context" : "XXX",
        "testMode" : false
    }
}

 

Why are there so many fields returned as "null" in Hotel-X SearchRS?

The amount of null values returned through our API calls will depend on the amount of information we receive from the Seller. For instance, imagine that you request the following fields in your Search Query:

{ rooms { occupancyRefId code description refundable units roomPrice { price { currency binding net gross exchange { currency rate } } } beds { type description count shared } rateP }

And received the following information in SearchRS:

"rooms": [ { "occupancyRefId": 1, "code": "1", "description": "Standard", "refundable": false, "units": 999, "roomPrice": { "price": { "currency": "EUR", "binding": false, "net": 150, "gross": 150, "exchange": { "currency": "EUR", "rate": 1 } } }, "beds": [ { "type": "double", "description": **null**, "count": 2, "shared": false } ]

Than means the Seller has been able to return all the information requested but bed descriptions.

 

You will find more information on Search in our Documentation and Hotel-X Schema.