1. Help Center
  2. Buying on TravelgateX
  3. Getting started with Hotel-X Buyers API

What headers should I add to my Hotel-X queries and mutations?

Below you will find a list of the headers that can be added to your queries and mutations and whether they are mandatory or optional.


Gzip Compression

In order to increase performance and save bandwidth, all the live traffic must enable GZIP compression in the HTTP header:


Keep Alive

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
  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