Exploring the headers used in Hotel-X API
What are the different types of headers that can be included in a Hotel-X request?💡
There are 2 different types of headers:
- Mandatory headers: they should be added to your Hotel-X request.
- Optional headers: they are not mandatory but might be added to your Hotel-X, for instance, to improve performance.
Which headers are mandatory for my Hotel-X request?🔎
API Key Authorization
Authentication is necessary for every request made to the TravelgateX GraphQL API. To authenticate the user agent with the server, an API Key must be included in the HTTP Authorization request header.
Which headers are optional for my Hotel-X request?🔎
To enhance performance and optimize response times in Search, you have the option to include the Connection: keep-alive header in all your transactions.
GraphQL To Rest
To ensure optimal performance when expecting more than 5,000 options per search response, we recommend utilizing our GraphQL to Rest feature. To implement this feature, please follow the steps below:
- Verify that your JSON parser is updated to the latest schema, as Array Fields that were previously defined as single Scalars may result in unexpected JSON marshalling.
- Include the following HTTP header in your request(s): TGX-Content-Type: graphqlx/json.
- Test a sample call for each request using the provided header.
- Sit back and enjoy the enhanced performance!