How can I paginate the content methods?

The Hotel-X Buyers API supports the pagination of the following content methods:

  • Hotel List
  • Room List
  • Destination List

In case you are performing any of the aforementioned methods and you want to split the results into different pages with a maximum of items per page, you can do it following the next steps:

  1. Add the "maxSize" to your QueryVariables. This node will allow you to set how many items do you want to receive per page. (Please note that the maximum is 500)

  2. Add the "token" attribute to your Query (more info on our Playground DOCS tab).

  3. Perform the first query, take the token id and add it to your next query. Please note that each token has a durability of 7 minutes until it expires.

  4. Repeat the process until you get to the final page where you'll receive a "Hotels/Rooms/Destinations not found" warning. Please note that although you are receiving the same token in each response, the pagination is working and different results are being returned.