1. I'm a Buyer
  2. I want to develop TravelgateX's API as a buyer

Best Practices

Find out some tips and best practices that will help you with the Hotel-X development.

We've come through this process hundreds of times and we know that it gets much easier when you have some tips and best practices available from the beginning.

Content calls

Supplier static information as Hotel List, Room List, Board List... are returned through our content calls.
We strongly recommend to implement them as sometimes, supplier codes might be different from the ones returned through our API. 

Gzip Compression

In order to increase performance and save bandwidth, all LIVE traffic must (it is mandatory) enable GZIP compression in the HTTP header.

TravelgateX FTP

One of the biggest features of HotelX is the possibility of customize your requests by adding plugins.
Each plugin require a different set of files to be uploaded on our FTP in order to configure it.
In case you want to configure any of our plugins, raise a ticket on our Jira Service Desk requesting your FTP credentials.
Plugins may involve additional costs. Contact info@xmltravelgate.com for more information.

Integrations Change Log

Check our Integrations Change Log section to keep track of the latest modifications applied to our supplier integrations.

Travelgate-X Status

Offering an event tracker and consistent metrics, our Status page allows you to stay informed of our services performance in real time.

Keep Alive Header

In order to increase performance and improve response times (in Search), you can add the Connection: keep-alive header to all our transactions.

GraphQL To Rest

In case you expect to be returned +5k options per search response, we suggest using our GraphQL to Rest feature to keep performance at the highest level.
To implement this feature, please follow below steps:
  1. Check that your JSON parser is updated to the last schema as the Array. Fields previously defined as single Scalars can produce unexpected JSON marshalling.
  2. Add the HTTP header to your request(s): TGX-Content-Type:graphqlx/json
  3. Test a sample call for every request using the header
  4. Enjoy the performance

Criteria Search

When performing a Search query, we recommend to add the following fields
in the criteria section:
  • Check-in
  • Check-out
  • Hotels
  • Occupancies
  • Language
  • Currency
  • Nationality
  • Market
Bear in mind that:
If currency is not introduced the default one will be applied. Note that even if introducing a specific currency, suppliers might return a different one.
Suppliers might return different rates depending on the market. 

Reservation Status

When making a reservation, there will be a field named “status” in the
response indicating the status of the reservation. It can have four values: OK,
RQ, CN and UN:

  • OK: The reservation was completed with no problems.
  • RQ: The reservation was completed but the product is still not available,
    so the reservation goes into a waiting list (Request). It is the client’s
    responsibility to check the final status of the booking.
  • CN: The reservation was completed but due to a supplier error or a
    timeout the system will immediately cancel the reservation to prevent
    further possible errors.
  • UN: The reservation was completed but due to a supplier error or a
    timeout, the reservation status is unknown. It is the client’s responsibility
    to check if the booking is OK.

If the client experience any of the common errors (or any status differentg to OK), mentioned in the previous point, during the Book process. It is the client responsibility to check the final Status of the Booking.

Improve GraphQL Performance

Visit our blog for some tips to improve GraphQL performance when
responses contain more than 10.000 nodes and/or weight more than 1Mb.

Cancellation Status

When making a reservation, there will be a field named “status” in the
response indicating the status of the reservation. It can have four values: OK,
RQ, CN and UN:
  • RQ: The cancellation was completed but the cancel is still not available,
    so the reservation goes into a waiting list (Request). It is the client’s
    responsibility to check the final status of the cancellation.
  • CN: The cancellation was completed.
  • UN: The cancellation was completed but due to a supplier error or a
    timeout, the cancellation status is unknown. It is the client’s responsibility
    to check if the cancellation is CN.

If the client experience any of the common errors (or any status
differentg to CN), mentioned in the previous point, during the Cancellation
process. It is the client responsibility to check the final Status of the
Cancellation.