1. Help Center
  2. Buying on TravelgateX
  3. Hotel-X Development: Static Content

Hotel-X Development - Rooms Query

What is Hotel-X Rooms Query and what information can I expect?

Rooms Query returns a simple rooms map for a given set of credentials (access) that may include translations to other languages. You should bear in mind that the response object roomData is shared with Hotels Query but will not necessarily share the same data.

 

1. How can I retrieve the Seller's Room List?

You just need to follow the specifications in our Documentation and API Playground and build your own Rooms Query, as easy as that! Also, remember you are able to personalize the fields requested, so only the information that matters to you is returned in the response.

Rooms Query example:

{"query":"query($criteria: HotelXRoomQueryInput!, $relay: RelayInput!){\n hotelX{\n rooms (criteria: $criteria, relay: $relay) {\n edges{\n node{\n code\n roomData{\n code\n roomCode\n texts{\n text\n text\n }\n source\n occupancies{\n total{\n min\n max\n }\n infants{\n min\n max\n }\n children{\n min\n max\n }\n adults{\n min\n min\n }\n }\n amenities{\n type\n code\n texts{\n text\n language\n }\n }\n views{\n texts{\n text\n language\n }\n viewCode\n }\n medias{\n code\n order\n type\n updatedAt\n url\n texts{\n text\n language\n }\n }\n beds{\n type\n count\n shared\n }\n area\n allAmenities{\n edges{\n node{\n code\n amenityData{\n code\n amenityCode\n type\n }\n }\n }\n }\n }\n adviseMessage{\n code\n description\n external{\n code\n code\n }\n }\n \n }\n }\n }\n }\n}\n\n","variables":{"criteria":{"access":""},"relay":{}}}

 

2. What can I expect to receive in Rooms Query response?

Some of the fields returned are: 

  • Room Code
  • Source
  • Occupancies
  • Amenities
  • Medias
  • Views
  • Beds

The amount of information and content returned might vary between Sellers.

 

3. How many rooms per page should I request? Can I filter by roomcode?

You will be able to define the number of properties to be received in Rooms response by adding the "maxSize" field to your Query criteria.

Note that the maximum value for "maxSize" is 1000, though we recommend you request 500 rooms per page in order to reduce response times. 

Additionally, you can filter your results by adding the "roomCodes" field to your criteria and specifying the room/s you want to receive.

Can I paginate content methods? Sure! Make sure you check the following article for further information.

 

4. How should I map Hotel-X Rooms? Does TravelgateX map for us?

Our objective is to ensure our Partners always receive the native information as sent by the Seller without any modification, so mapping should be done either internally or externally on your side.

Note room mapping depends entirely on your interests: through Rooms Query you will receive the Seller native roomcodes so that you can map them along with the Seller if needed.

More information on our Documentation and API Playground