JSON STATIC DATA ENDPOINT
INTRODUCTION
We have separate service to get static data using specific URL’s. Request is a regular GET request. Response is returned in JSON format.
SERVICE REQUESTS
1. Credentials
Each request to service should contain headers username
and password
with clients credentials:
--header="username:clientUserName1" --header="password:pwd"
2. Get suppliers
Request to get list of supported suppliers for client.
Request structure:
URL part:
get_suppliers
Headers:
username
andpassword
Paremeters: no parameters
RQ example:
wget --header="username:clientUserName1" --header="password:pwd" "http://localhost:8660/get_suppliers" -O suppliers.json
Response structure:
suppliers - list of suppliers
RS example:
{
"suppliers": [
"supplierCode1",
"supplierCode2",
...
]
}
In further requests, if client requests information about supplier not from this list, the service returns “Not allowed error”
3. Get locations
Request to get locations for specific supplier and language.
Request structure:
URL part:
get_locations
Headers:
username
andpassword
Paremeters:
supplierCode
,languageCode
,countryCode (optional parameter to get cities in specific country)
,getOnlyCountries
(optional boolean parameter to get only countries list, if getOnlyCountries=true countryCode parameter will be ignored
)
RQ example:
Response structure:
countries - list of countries
id - country id
code - country code
name - country name
cities - list of cities in country (if
getOnlyCountries
not true )id - city id
code - city code
name - city name
latitude - latitude of city
longitude - longitude of city
RS example:
4. Get product locations
Request to get GP locations that client can use to make a search by the specific supplier by specific product.
Request structure:
URL part:
get_product_locations
Headers:
username
andpassword
Paremeters:
supplierCode
,languageCode
,product (possible values: accommodation, transfer, excursion, insurance, railway, car)
,countryCode(optional parameter to get cities in specific country)
RQ example:
Response structure(the same as in get locations response):
countries - list of countries
id - country id
code - country code
name - country name
cities - list of cities in country
id - city id
code - city code
name - city name
latitude - latitude of city
longitude - longitude of city
RS example:
5. Get hotel list
Request to get list of hotels for specific supplier and city.
Request structure:
URL part:
get_hotel_list
Headers:
username
andpassword
Paremeters:
supplierCode
,cityCode
- mandatory,isGpCityCode
- optional,getExtendedInfo
(optional boolean parameter to get more info about hotels, at the moment only hotel name is returning)
parameter isGpCityCode can be used to get a list of hotels GP location. In this case, GP location code must be specified in request. Next, service gets all the hotels for the supplier's mapped locations.
RQ example:
Response structure:
cities - list of cities
cityCode - city code
hotels - list of suppliers hotels inside city
hotelCode - hotel code
hotelName - hotel name in English(if
getExtendedInfo
= true )
RS example:
6. Get hotel information
Request to get full hotel information for specific supplier, hotelCode and language;
Request structure:
URL part:
get_hotel_info
Headers:
username
andpassword
Paremeters:
supplierCode, hotelCode
,languageCode
RQ example:
Response structure:
name - name of hotel
images - list of hotel image URLs
amenity_groups - hotel amenities
amenities - list of amenities
group_name - amenitites type (“Room”, “Hotel amenities”, “Sport & recreation”, “Spa services”, “Bars & restaurants”, “Business services”, “Child services”, “Credit cards”, “In hotel”, “Security Services”, “Pet Services”, “Transportation & Parking”, “Hotel”)
address - hotel adderess
id - hotel code
latitude - hotel latitude
longitude - hotel longitude
star rating - hotel rating
check_in_time - hotel check in
check_out_time - hotel check out
kind - hotel type depends on supplier
phone - hotel phone
email - hotel email
postal_code - hotel postal code
description_struct - list of hotel descriptions
paragraphs - text hotel description
title - type of description 15.4.9. TEXT CATEGORY CODE
region
country_code - country code
city_code - city code
gp_city_code - mapped GP city code(if exists)
name - location name
type - location type ("country", "city", "state", "district","destination", "MP", "continent", "island", "region", "zone")
room_groups
room_group_id - rooms code
amenity_groups - list of rooms amenities
name - rooms name
images - list of room image URLs
RS example: