Skip to main content

Destinations

The Destinations Query allows you to retrieve destination master data in two ways:

  • The FastX Destination List, which returns standardized destination values from Travelgate.
  • The Supplier Destination List, which returns the native destination values configured by each connected Seller.

Use this query to inspect the destination master available for a given access, either from the FastX scope or from one Supplier scope.

The returned fields include:

  • code
  • available
  • destinationLeaf
  • texts
  • closestDestinations
  • parent
  • type

Query Overview​

When creating your destinations query, you have 2 inputs to fill based on your specific needs:

  1. Criteria
  2. Token

1. Criteria​

This query offers versatility, with certain fields marked as mandatory (access) and others as optional (group, destinationCodes, and maxSize). This flexibility empowers you to create a personalized Destinations Query, tailoring the requested fields to your specific needs. Consequently, the response will only include information that is highly relevant to you, streamlining the retrieval process and ensuring the data you receive meets your exact requirements.

{
"criteria": {
"access": "2",
"maxSize": 15,
"destinationCodes": [
"101402"
]
},
"token": ""
}

Mandatory criteria

  • access

Optional criteria

  • destinationCodes (Search by destination code)
  • group
  • maxSize (Paginate response)

2. Token​

The HotelX API provides paginated responses to handle cases where the number of destinations from the selected provider exceeds 10000. The default response page contains a maximum of 500 destinations, but you can specify the number of objects returned per page using the maxSize field in the query criteria to retrieve between 1 and 10000 destinations.

To include the token in your request, all you need to do is:

  1. Add the token object to the fields and arguments. Moreover, you have the flexibility to specify the number of objects returned per page by utilizing the maxSize tag in your arguments.

  2. After receiving a response, you will only receive a portion of the full list. To access the next page, simply copy the token tag from the response and include it in your next request. This will allow you to obtain a new set of objects in the following response.

  3. Repeat these steps until the token is no longer included in the response, the query will return "Destinations not found".

Query variables

First, in your destinations query you won't indicate any token input:

{
"criteria" : {
"access" : "2",
"maxSize" : 5
},
"token" : ""
}

You will obtain a response with 5 destinations per page:

Response

{
"data": {
"hotelX": {
"destinations": {
"token": "FGluY2x1ZGVfY29udGV4dF91dWlkDnF1ZXJ5VGhlbkZldGNoAhZMN2w2SlZYaVNaaXhYeXQwdm1GWjlBAAAAAAV14HUWeXZ3cU02MkpSbTY3WkF6QzJraWJWZxY2NDJ0Uk1EUFFkZXZZTS1ENDVTd2tBAAAAAAZuWSgWdFZSMzRYUVBUWC1nZ1ltWVRCTjVMZw==",
"edges": [
{
"..."
}
]
}
}
}
}

This token should be used as input in your next destinations query, inside the token input:

{
"criteria" : {
"access" : "2",
"maxSize" : 5
},
"token" : "FGluY2x1ZGVfY29udGV4dF91dWlkDnF1ZXJ5VGhlbkZldGNoAhZMN2w2SlZYaVNaaXhYeXQwdm1GWjlBAAAAAAV14HUWeXZ3cU02MkpSbTY3WkF6QzJraWJWZxY2NDJ0Uk1EUFFkZXZZTS1ENDVTd2tBAAAAAAZuWSgWdFZSMzRYUVBUWC1nZ1ltWVRCTjVMZw=="
}

Response Considerations​

Destination List Logic​

Once you run a Destinations Query, the returned destination codes can be classified into 2 categories:

  1. Zone
  2. City

Sellers build their own destination tree based on these nodes. Consequently, when you request their destination list, you receive a structured response that can help you with the mapping process.

note

The amount of information and content returned might vary between Sellers.

HotelX supports all languages, but receiving destination descriptions in one or another depends entirely on the languages supported by the Seller.

The values returned depend on the selected scope (FastX or Supplier, depending on access).

Query Inputs​

HotelXDestinationListInput (INPUT_OBJECT)

access(ID)

Indicates the access

group(ID)

The supplier s group. Only available if all permissions allowed

destinationCodes(String)

Search by hotel codes

maxSize(Int)

Maxium number of items per page

token (String)
A unique authentication token required for API requests.

Returned Fields​

DestinationConnection (OBJECT)
DestinationList definition

edges(DestinationEdge)
node(Destination)

code  *  (ID)

Destination ID

destinationData(DestinationData)

Destination data

code  *  (ID)

Destination Code

available  *  (Boolean)

Indicates if you can search by destination

destinationLeaf(String)

Returns destination leafs of the destination.

texts  *  (Text)

Contains the destination name

text  *  (String)

language  *  (Language)

closestDestinations(String)

Closest destinations, indicates destinations in proximity

parent(String)

Parent destination code

type(DestinationType)

Indicates destination type, zone or city Possible values:

  • ZONE: Zone
  • CITY: City
adviseMessage(AdviseMessage)

List of messages

code  *  (ID)

AM code: The following codes can be returned:

description  *  (String)

Error description

level  *  (AdviseMessageLevel)

Indicates the level of importance of the message. Possible values: ERROR, WARN, INFO. Possible values:

  • WARN: Warning message.
  • ERROR: Error message.
  • INFO: Info message.
external(ExternalMessage)

Specify the external message.

code(String)

External code.

message  *  (String)

External message.

correlationID  *  (ID)

Identifier to investigate the cause of the error.

createdAt  *  (DateTime)

Date created

updatedAt  *  (DateTime)

Date updated

cursor  *  (String)

token  *  (String)

Use Cases​

FastX master destination list​

To retrieve the FastX Destination Master, make a destination list call using your FastX access, which you can find in the MyConnections section under the Seller "Travelgate".

Supplier destination list​

To retrieve one Supplier's native destination master, include that Supplier's access in the query (for example, access 2 for the Travelgate Test supplier).

Destination list for specific destination codes​

Use the Destinations Query to filter specific destination values. For example, to focus solely on the Spanish inventory of a Seller, include destinationCodes with "ES" in your criteria. This will ensure you receive destinations directly related to that selected node.