1. TGX HelpCentre
  2. Buying in TravelgateX
  3. 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

Sellers static information as Hotel List, Room List, Board List... are returned through our content calls.
We strongly recommend to implement them as sometimes, Seller 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 Hotel-X is the possibility of customize your requests by adding Apps.
Each App 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 App, raise a ticket on our Help Centre requesting your FTP credentials.
Apps 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 Seller integrations.

TravelgateX 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, Sellers might return a different one.
Sellers 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 Buyer’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 Seller error or a
    timeout, the reservation status is unknown. It is the Buyer’s responsibility
    to check if the booking is OK.

If the Buyer experience any of the common errors (or any status different to OK), mentioned in the previous point, during the Book process. It is the Buyer's 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 Buyer’s
    responsibility to check the final status of the cancellation.
  • CN: The cancellation was completed.
  • UN: The cancellation was completed but due to a Seller error or a
    timeout, the cancellation status is unknown. It is the Buyer’s responsibility
    to check if the cancellation is CN.

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