TravelgateX Platform

This page provides an overview of the TravelgateX platform.

GraphQL Gateway

TravelgateX is the travel API completely based in GraphQL. Unlike many legacy XML Soap APIs, GraphQL enables each client to ask for and receive exactly the data that is needed. Learn more by reading our Learning GraphQL guides.

Our Gateway is the only endpoint to access all of our APIs. It is written in NodeJS. This makes it fast, stable, secure, fault tolerant and load balanced between many datacenters from four different cloud providers: Microsoft Azure, Google Cloud Platform, Hetzner and TotalUptime.

Using the API

There are two types of allowed operations in the TravelgateX GraphQL APIs:

  • Queries: Queries are “read only” and are used to get data from our system. For example, getting a list of available hotel vacancies for a particular date and location is a Query
  • Mutations: Mutations change, add or delete the data in our system. For example, making a booking for a vacant hotel room is a Mutation.

GraphQL Endpoint

One of the benefits of using GraphQL is that there is only a single endpoint. You can use this endpoint for all the operations you want to perform.

Communicating with the Server

To communicate with our GraphQL server, you’ll need an access token with the right scopes. You are able to create a token by following the steps mentioned in the Security Overview.

Making Requests

The best place to test how to make GraphQL queries in TravelgateX is to start with our interactive API Playground. You can also use curl or any other HTTP-speaking library.

Accept-Encoding: gzip

To query GraphQL using curl, make a POST request with a JSON payload. The payload must contain a string called query:

curl -X\
   POST\
   -H "Content-Type: application/json" \
   -H "Authorization: Apikey q8ggxpoVDW76Kw918hwnnRvxlZmAP2QZ"  \
   --data '{"query":"{hotelX{searchStatusService{code description}}}"}' \
   --compressed \
   https://api.travelgatex.com

GraphQL Reference

There are several ways you can learn more about the full capabilities of our TravelgateX GraphQL data model

  • Reference Documentation provides complete reference documentation for all resources, fields and objects in our GraphQL data model (called a Schema).

  • API Playground provides an interactive, multi-column schema definition based on the GraphiQL tool, but with many additional features.

  • GraphQL-voyager displays our GraphQL API as an interactive relational database-like graph to help you understand the different parent and child tables within our schema.

  • Learning GraphQL is a set of resources to get to know GraphQL and to understand our schema.

Examples

Check out our GraphQL Playground to get started with making your first query and to work thropugh other query examples.

You can easily share your Queries with others by generating a link using the share button available in the API Playground. This share function works as a Pastebin for your GraphQL query and includes the context (endpoint, HTTP headers, open tabs, etc) so you can share exactly what your Playground query setup looks like.

Conventions

TravelgateX follows some conventions about schema definition:


Comments