Getting Started
Authentication
All requests must include an API key in the X-Api-Key
header:
X-Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
This key is required to access the API and should be kept secure.
How GraphQL works
GraphQL allows clients to request only the data they need using a single query. Instead of multiple REST API calls, a GraphQL query can fetch related data in a structured manner.
Example:
GraphQL Request:
query {
liteapi {
search(
criteria: {
checkIn: "2025-07-01"
checkOut: "2025-07-02"
occupancies: [{ paxes: [{ age: 30 }, { age: 26 }] }]
hotels: ["278067"]
currency: "USD"
nationality: "US"
}
settings: { client: "MyCompanyName", context: "1", timeout: 10000 }
) {
errors {
description
}
warnings {
description
}
options {
id
hotelCode
price {
currency
net
}
cancelPolicy {
refundable
}
}
}
}
}
GraphQL Response:
{
"data": {
"liteapi": {
"search": {
"errors": [],
"warnings": [],
"options": [
{
"id": "123",
"hotelCode": "123456",
"price": {
"currency": "USD",
"net": 55.97
},
"cancelPolicy": {
"refundable": true
}
}
]
}
}
}
}
Recommended Libraries for Integrating GraphQL
To integrate with GraphQL, we recommend using the following client libraries:
JavaScript / TypeScript
Python
Go
Java
.NET
Making your first request
To make your first request, send a POST
request to the GraphQL endpoint with a query.
Example Request Using cURL:
curl -X POST https://api.yourgraphqlserver.com/ \
-H "Content-Type: application/json" \
-H "X-Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
-d '{"query": "query { hotelX { search(criteria: { checkIn: \"2025-04-01\", checkOut: \"2025-04-02\", hotels: [\"1\"] }) { options { id hotelCode hotelName } } } }"}'
Updated 4 days ago