What is the Hotel-X Booking query and what should I expect to receive?

By performing the Booking query you will be able to retrieve either the details of a specific reservation or a list of the reservations made in a given time frame.

Booking List

In case you would like to obtain a list of all the reservations made in a specific type frame, then you should perform the Booking query by "Dates".

Some of the fields that can be requested are:

  • Holder
  • Hotel
  • Price
  • Remarks
  • Status

Below you will find an example of Booking by "Dates":

{"query":"query ($criteriaBookingRead: HotelCriteriaBookingInput!, $settings: HotelSettingsInput!) {\n hotelX {\n booking(criteria: $criteriaBookingRead, settings: $settings) {\n auditData {\n transactions {\n request\n response\n }\n }\n bookings {\n reference {\n client\n supplier\n }\n holder {\n name\n surname\n }\n hotel {\n creationDate\n checkIn\n checkOut\n hotelCode\n hotelName\n boardCode\n occupancies {\n id\n paxes {\n age\n }\n }\n rooms {\n occupancyRefId\n code\n description\n price {\n currency\n binding\n net\n gross\n exchange {\n currency\n rate\n }\n markups {\n channel\n currency\n binding\n net\n gross\n exchange {\n currency\n rate\n }\n }\n }\n }\n }\n price {\n currency\n binding\n net\n gross\n exchange {\n currency\n rate\n }\n markups {\n channel\n currency\n binding\n net\n gross\n exchange {\n currency\n rate\n }\n }\n }\n cancelPolicy {\n refundable\n cancelPenalties {\n hoursBefore\n penaltyType\n currency\n value\n }\n }\n remarks\n status\n payable\n }\n errors {\n code\n type\n description\n }\n warnings {\n code\n type\n description\n }\n }\n }\n}","variables":{"criteriaBookingRead":{"accessCode":"","language":"en","dates":{"dateType":"BOOKING","start":"2020-10-17","end":"2020-10-18"},"typeSearch":"DATES"},"settings":{"client":"","context":"","auditTransactions":true}}}

The information returned might vary between Sellers.

You will find more information on our Playground in the DOCS tab.

Booking Details 

In case you would like to obtain the details of a specific reservation, you can perform the Booking query introducing the "bookingID" (References) returned in the Book response.

Some of the fields that can be requested are:

  • Holder
  • Hotel
  • Price
  • Remarks
  • Status

Below you will find an example of Booking by "bookingID":

{"query":"query ($criteriaBookingRead: HotelCriteriaBookingInput!, $settings: HotelSettingsInput!) {\n hotelX {\n booking(criteria: $criteriaBookingRead, settings: $settings) {\n auditData{\n\t\t\t\ttransactions{\n\t\t\t\t\trequest\n\t\t\t\t\trequest\n\t\t\t\t}\n\t\t\t\ttimeStamp\n\t\t\t}\n bookings {\n reference {\n client\n supplier\n bookingID\n }\n holder {\n name\n surname\n }\n hotel {\n creationDate\n checkIn\n checkOut\n hotelCode\n hotelName\n boardCode\n occupancies {\n id\n paxes {\n age\n }\n }\n rooms {\n occupancyRefId\n code\n description\n price {\n currency\n binding\n net\n gross\n exchange {\n currency\n rate\n }\n markups {\n channel\n currency\n binding\n net\n gross\n exchange {\n currency\n rate\n }\n }\n }\n }\n }\n price {\n currency\n binding\n net\n gross\n exchange {\n currency\n rate\n }\n markups {\n channel\n currency\n binding\n net\n gross\n exchange {\n currency\n rate\n }\n }\n }\n cancelPolicy {\n refundable\n cancelPenalties {\n hoursBefore\n penaltyType\n currency\n value\n }\n }\n remarks\n status\n payable\n }\n errors {\n code\n type\n description\n }\n warnings {\n code\n type\n description\n }\n }\n }\n}","variables":{"criteriaBookingRead":{"accessCode":"","language":"en","typeSearch":"REFERENCES","bookingID":"","references":{"hotelCode":"","currency":"","references":[{"supplier":"","client":""}]}},"settings":{"client":"","auditTransactions":true,"context":"","testMode":false}}}

The information returned might vary between Sellers.

You will find more information on our Playground in the DOCS tab.