Sletat Ru Provider API — различия между версиями

Материал из wiki.Sletat.ru
Перейти к: навигация, поиск
(Поиск туров)
(Tour Search)
Строка 306: Строка 306:
 
|}
 
|}
  
'''Формат выдачи:'''
+
'''The output format:'''
  
 
  <getToursResult version="1.0">
 
  <getToursResult version="1.0">
Строка 343: Строка 343:
 
  </getToursResult>
 
  </getToursResult>
  
Корневой элемент '''getToursResult''' содержит произвольное количество элементов '''tour''' (от 0 элементов, но не более количества указанного в параметре '''count'''), каждый из которых описывает тур следующими атрибутами:
+
The root element '''getToursResult''' contains an arbitrary number of '''tour''' elements (cannot exceed the number specified in '''count''' parameter), where each one of them describes the tour with the following atributes:  
  
 
{| class="wikitable"
 
{| class="wikitable"
|Параметр; '''обязательный'''
+
|Parameter; '''required'''
|Описание
+
|Description
 
|-
 
|-
 
|'''offerId'''
 
|'''offerId'''
|Уникальный идентификатор предложения, по которому в дальнейшем можно провести актуализацию тура или бронирование.
+
|Unique identifier of the offer for further tour actualization or booking.
 
|-
 
|-
 
|'''tourName'''
 
|'''tourName'''
|Произвольное название тура.  
+
|Arbitrary name of the tour.
 
|-
 
|-
 
|'''hotelId'''
 
|'''hotelId'''
|Идентификатор отеля.
+
|Hotel identifier.  
 
|-
 
|-
 
|hotelUrl
 
|hotelUrl
|Ссылка на страницу с описанием отеля.  
+
|Link to the page with the tour description.  
 
|-
 
|-
 
|'''resortId'''
 
|'''resortId'''
|Идентификатор курорта, в котором расположен отель.
+
|Identifier of the resort in which the hotel is located.  
 
|-
 
|-
 
|'''hotelCategoryId'''
 
|'''hotelCategoryId'''
|Идентификатор категории отеля.
+
|Hotel category identifier.  
 
|-
 
|-
 
|'''mealId'''
 
|'''mealId'''
|Идентификатор вида питания.
+
|Meal option identifier.
 
|-
 
|-
 
|'''htPlaceName'''
 
|'''htPlaceName'''
|Произвольное название размещения в номере (примеры: DBL, TRP, 2 ADL + 1 CH (212), 2 ADL + INF). Название должно отображать допустимые возрасты детей (если поиск был с указанием количества детей более 0) или то, что размещение с учетом инфанта (+ INF), в соответствующем случае.
+
|Arbitrary name for hotel accommodation preferences, e.g. DBL, TRP, 2 ADL + 1 CH (2-12), 2 ADL + INF). The name should express age of children (if the number of children older than 0 y.o. was specified) or indicate the request for accommodation of an infant (+ INF) respectively.  
 
|-
 
|-
 
|roomTypeName
 
|roomTypeName
|Название типа номера (примеры: standard, deluxe, family, deluxe super ocean view).  
+
|Name of the room type, e.g. standard, deluxe, family, deluxe super, ocean view.  
 
|-
 
|-
 
|'''tourDate'''
 
|'''tourDate'''
|Дата начала тура в формате dd.MM.yyyy (пример: 31.12.2015).
+
|Beginning date of the tour in the format dd.MM.yyyy, e.g. 31.12.2015.  
 
|-
 
|-
 
|tourEndDate
 
|tourEndDate
Строка 383: Строка 383:
 
|-
 
|-
 
|'''nights'''
 
|'''nights'''
|Количество ночей в туре.
+
|The number of nights in the tour.
 
|-
 
|-
 
|'''price'''
 
|'''price'''
|Цена тура в валюте, которая была указана во входном параметре '''currencyId'''.  
+
|Price of the tour in currency, specified in the input parameter '''currencyId'''.  
 
|-
 
|-
 
|'''hotelIsInStop'''
 
|'''hotelIsInStop'''
|Наличие мест в отеле, допустимы значения: 0 – есть места, 1 – нет мест, 2 – запрос.  
+
|Hotel rooms availability. The following values are acceptable: 0 – rooms available, 1 – rooms unavailable, 2 – on request.  
 
|-
 
|-
 
|'''ticketsIncluded'''
 
|'''ticketsIncluded'''
|Включена ли стоимость билетов в стоимость тура, допустимы значения: 0 – не включена (тур только отель), 1 – включена (пакетный тур).
+
|Indicator if the ticket prices are included in the tour price. The following values are acceptable: 0 – not included (hotel only tour), 1 – included (package tour).  
 
|-
 
|-
 
|'''hasEconomTicketsDpt'''
 
|'''hasEconomTicketsDpt'''
|Наличие билетов эконом класса на место отдыха, допустимы значения: 0 – нет мест, 1 есть места, 2 – запрос. При значении атрибута ticketsIncluded = 0 значение данного параметра будет проигнорировано.  
+
|Availability of economy class tickets to the place of destination. The following values are acceptable: 0 – no tickets available, 1 – tickets available, 2 – on request. If the value of the attribute ticketsIncluded equals to 0, then the value of this parameter will be ignored.  
 
|-
 
|-
 
|'''hasEconomTicketsRtn'''
 
|'''hasEconomTicketsRtn'''
|Наличие обратных билетов эконом класса, допустимы значения: 0 – нет мест, 1 есть места, 2 – запрос. При значении атрибута ticketsIncluded = 0 значение данного параметра будет проигнорировано.
+
|Availability of economy class return tickets.  The following values are acceptable: 0 – no tickets available, 1 – tickets available, 2 – on request. If the value of the attribute ticketsIncluded equals to 0, then the value of this parameter will be ignored.  
 
|-
 
|-
 
|'''hasBusinessTicketsDpt'''
 
|'''hasBusinessTicketsDpt'''
|Наличие билетов бизнес класса на место отдыха, допустимы значения: 0 – нет мест, 1 есть места, 2 – запрос. При значении атрибута ticketsIncluded = 0 значение данного параметра будет проигнорировано.  
+
|Availability of business class tickets to the place of destination. The following values are acceptable: 0 – no tickets available, 1 - tickets available, 2 – on request. If the value of the attribute ticketsIncluded equals to 0, then the value of this parameter will be ignored.
 
|-
 
|-
 
|'''hasBusinessTicketsRtn'''
 
|'''hasBusinessTicketsRtn'''
|Наличие обратных билетов бизнес класса, допустимы значения: 0 – нет мест, 1 есть места, 2 – запрос. При значении атрибута ticketsIncluded = 0 значение данного параметра будет проигнорировано.
+
|Availability of the business class return tickets.  The following parameters are acceptable: 0 – no tickets available, 1 – tickets available, 2 – on request. If the value of the attribute ticketsIncluded equals to 0, then the value of this parameter will be ignored.  
 
|-
 
|-
 
|'''tourUrl'''
 
|'''tourUrl'''
|Ссылка, при переходе по которой можно забронировать тур (ссылка может вести на страницу авторизации, но после авторизации должны автоматически попасть на страницу бронирования тура).
+
|Link to the booking page (the link can first lead to the page of authorization, and when authorization is complete it should take the customer to the booking page automatically).  
 
|-
 
|-
 
|spoUrl
 
|spoUrl
|Ссылка на описание тура, его программы (если есть).
+
|Link to the tour description and the tour programs (if available).  
 
|-
 
|-
 
|fewPlacesInHotel
 
|fewPlacesInHotel
|Поле заполняется, если есть указание на то, что мест в отеле мало. Если нельзя указать точное количество оставшихся мест, то заполняется значением -1, иначе указывается точное количество оставшихся мест.  
+
|The field may be filled if there is an indication that there only few rooms available in the hotel. If the exact number of remaining rooms is not specified, the return value equals to -1, otherwise the value is the exact number of remaining rooms.
 
|-
 
|-
 
|fewTicketsDptY
 
|fewTicketsDptY
|Поле заполняется, если есть указание на то, что мест эконом класса туда мало. Если нельзя указать точное количество оставшихся мест, то заполняется значением -1, иначе указывается точное количество оставшихся мест.  
+
|The field may be filled if there is an indication that there are only few economy class seats available. If the exact number of remaining seats is not specified, the return value equals to -1, otherwise the value is the exact number of remaining seats.  
 
|-
 
|-
 
|fewTicketsRtnY
 
|fewTicketsRtnY
|Поле заполняется, если есть указание на то, что мест эконом класса обратно мало. Если нельзя указать точное количество оставшихся мест, то заполняется значением -1, иначе указывается точное количество оставшихся мест.
+
|The field may be filled if there is an indication that there are only few return flight economy class seats available. If the exact number of remaining return flight seats is not specified, the return value equals to -1, otherwise the value is the exact number of remaining seats.
 
|-
 
|-
 
|fewTicketsDptB
 
|fewTicketsDptB
|Поле заполняется, если есть указание на то, что мест бизнес класса туда мало. Если нельзя указать точное количество оставшихся мест, то заполняется значением -1, иначе указывается точное количество оставшихся мест.  
+
|The field may be filled if there is an indication that there are only few business class seats available. If the exact number of remaining seats is not specified, the return value equals to -1, otherwise the value is the exact number of remaining seats.  
 
|-
 
|-
 
|fewTicketsRtnB
 
|fewTicketsRtnB
|Поле заполняется, если есть указание на то, что мест бизнес класса обратно мало. Если нельзя указать точное количество оставшихся мест, то заполняется значением -1, иначе указывается точное количество оставшихся мест.  
+
|The field may be filled if there is an indication that there are only few return flight business class seats available. If the exact number of remaining return flight seats is not specified, the return value equals to -1, otherwise the value is the exact number of remaining seats.
 
|-
 
|-
 
|flags
 
|flags
|Набор битовых флагов тура. Тур может иметь несколько установленных флагов одновременно, данное значение является их суммой. Возможные флаги тура:
+
|The set of bit flags of the tour. Multiple flags can be attributed to the same tour simultaneously, and the sum of them makes the value of this parameter. Possible flags of the tour:
* 1 – туроператор рекомендует данный тур;
+
* 1 – recommended by the tour operator;  
* 2 – доступно мгновенное подтверждение;
+
* 2 – instant confirmation available;  
* 4 – туроператор считает данный тур лучшим предложением;
+
* 4 – best offer;  
* 8 – тур раннего бронирования;
+
* 8 – early booking available;
* 16 – тур позднего бронирования;
+
* 16 – late booking available;  
* 32 – туроператор предоставляет скидку на данный тур;
+
* 32 – discounted tour;  
* 64 – VIP предложение;
+
* 64 – VIP offer;  
* 128 – тур доступен в кредит;
+
* 128 – credit for this tour available;  
* 256 – тур является эксклюзивным предложением туроператора;
+
* 256 – exclusive offer;  
* 512 – при покупке тура туристу подарок;
+
* 512 – gift offered upon purchase;  
* 1024 – тур является комбинированным (турист посещает несколько курортов);
+
* 1024 – combined tour;  
* 2048 – тур с обязательством (шоп - тур);
+
* 2048 – tour with obligation (shopping tour);
 
* 4096 – зарезервировано для использования системой;
 
* 4096 – зарезервировано для использования системой;
 
* 8192 – экскурсионный тур;  
 
* 8192 – экскурсионный тур;  
 
|-
 
|-
 
|description
 
|description
|Дополнительная информация по туру, например, для комбинированных туров может содержать информацию о проживании в отелях.
+
|Additional information on the tour, e.g. hotel accommodation info for combined tours.  
 
|-
 
|-
 
|receivingParty
 
|receivingParty
|Принимающая сторона.  
+
|Receiving party.  
 
|-
 
|-
 
|earlyBookingValidTill
 
|earlyBookingValidTill
|Если тур является туром раннего бронирования и известна последняя дата ранней брони, то в данном поле должна быть указана эта дата.  
+
|If the tour is available for early booking and the last date of early booking is known, then the field should contain this date.  
 
|-
 
|-
 
|}
 
|}

Версия 16:04, 21 января 2016

Service Description

In order to integrate with SLETAT.RU you need to create a web service that will perform the following tasks:

  • Unload directories: cities of departure, countries, resorts, hotels, etc.
  • Implement parameterized price search
  • Actualize the selected tour by its ID

For simplicity, the service can be made as a web page that accepts GET or POST parameters and returns the answer in XML (not SOAP) format

The same address should be used for all methods of the web service. For example, if you implement the service at: http://mysite.com/services/sletatru.xml , then this address must remain the same for all requests.

For example: :

The results should be presented in XML. Described format should be applied for each method in the document.

Version attribute indicating the version of the protocol should be specified for the root element in the result. The attribute is needed to determine the version of the tour provider with SletatRu service.

Example:

<getCountriesResult version="1.0">
...
</getCountriesResult> 

This document describes 1.0 version of the protocol.

All methods should return XML in UTF-8.

Все параметры запросов, не помеченные как обязательные, являются необязательными только для стороны, формирующей запрос. Для серверной стороны обработка всех полученных параметров запроса обязательна.

Результат выполнения запросов (поискового в частности) должен строго соответствовать указанным параметрам. Если параметр не обязателен и не указан, запрос его не учитывает и возвращает все варианты.

Pool of IP addresses, from which the service SletatRu communicates the realized tour provider, is provided separately. Для его уточнения необходимо написать на support@sletat.ru

Additional Requirements to the Service

Maximum time of work with any executed method of service should not exceed 30 seconds, the recommended response time (including the tour booking method) is up to 5 seconds. If any method takes longer than 30 seconds to return the results, SletatRu will not process the data.

Any method of the service can be called simultaneously by different threads. Therefore, in realization of the methods, there should not be locks which synchronize access to the methods. The tour booking method must support simultaneous execution of multiple search queries.

The number of queries per day can be determined separately and depends on the following parameters:

  • the number and popularity of the tour operator’s destinations
  • the number of departure cities
  • the number of search queries in SletatRu service.

Methods to Be Realized

The following elements have been specified in the document for each method: purpose of each method, the list of input parameters, the output format, description and the types of data used in the output of the methods.

The types of data listed below have been used in the methods:

  • Int32 – integer (32 bits signed) from 2, 147, 483, 648 to 2, 147, 483, 647
  • Int64 – integer (64 bits signed)
  • UInt64 – integer (64 bits unsigned)
  • String - text

Returning the List of Countries

This method returns all destinations of the tour operator.

Format of the query: ?action=GetCountries

Parameters:

  • id – destination country identifier (optional; if specified, only one entry is queried)

The output format:

<getCountriesResult version="1.0">
 <country id="{Int32}" name="{String}" />
 ...
</getCountriesResult>

The root element getCountriesResult contains an arbitrary number of elements country, where each one of them describes destination with attributes: id (destination country identifier) and name (name of the country, Ru/Eng language).

Returning the List of Departure Cities

The method returns all available cities of departure, and also contains data on what tour destinations are available from each city of departure. SletatRu service calls this method periodically in order to update the list of available destinations from each city of departure.

Format of the query: ?action=GetDepartCities

Parameters:

  • id – departure city identifier (optional; if specified, only one entry is queried)

The output format:

<getDepartCitiesResult version="1.0">
 <city id="{Int32}" name="{String}">
 <countryTo id="{Int32}" />
 ...
 </city>...
</getDepartCitiesResult>

The root element getDepartCitiesResult contains an arbitrary number of city elements, where each one of them describes the city of departure with attributes: id (city identifier) и name (name of the city, language Ru/Eng). Each city element also should contain a set of countryTo elements, where each one of them describes available destination from the city of departure; for countryTo element, id attribute (destination country identifier) should be specified.

Returning the List of Resorts

This method returns the list of all available resorts.

Format of the query: ?action=GetResorts

Parameters:

  • id – resort identifier (optional; if specified, only one entry is queried)

The output format:

<getResortsResult version="1.0">
 <resort id="{Int32}" name="{String}" countryId="{Int32}" />
 ...
</getResortsResult>

The root element getResortsResult contains an arbitrary number of resort elements, where each one of them describes the resort with attributes: id (resort identifier), name (name of the resort, language Ru/Eng) and countryId (identifier of the home country of the resort).

Returning the List of Hotel Categories

This method returns the list of hotel categories, e.g. 3*, 4*, Apts, etc.

Format of the query: ?action=GetHotelCategories

Parameters:

  • id – hotel category identifier (optional; if specified, only one entry is queried)

The output format:

<getHotelCategoriesResult version="1.0">
 <hotelCategory id="{Int32}" name="{String}" />
 ...
</getHotelCategoriesResult>

The root element getHotelCategoriesResult contains an arbitrary number of hotelCategory elements, where each one of them describes a hotel category with attributes: id (identifier) and name (name).

Returning the List of Hotels

This method returns the list of all available hotels, preferably only those, which actual prices are available through the tour operator.

Format of the query: ?action=GetHotels

Parameters:

  • id – hotel identifier (optional; if specified, only one entry is queried).

The output format:

<getHotelsResult version="1.0">
 <hotel id="{Int32}" name="{String}" hotelCategoryId="{Int32}" resortId="{Int32}" />
 ...
</getHotelsResult> 

The root element getHotelsResult contains an arbitrary number of hotel elements, where each one of them describes a hotel with attributes: id (identifier), name (name of the hotel), hotelCategoryId (hotel category identifier) and resortId (identifier of the resort in which this hotel is located).

Returning Meal Options

This method returns the list of meal options available, e.g. HB, BB, no meals, etc.

Format of the query: ?action=GetMeals

Parameters:

  • id – identifier of the meal type (optional; if specified, only one entry is queried)

Формат выдачи:

<getMealsResult version="1.0">
 <meal id="{Int32}" name="{String}" />
 ...
</getMealsResult>  

The root element getMealsResult contains an arbitrary number of meal elements, where each of them describes a meal option with attributes: id (identifier) and name (name).

Returning the List of Currencies

This method returns the list of used currencies. At the very least it has to contain Russian Rubles, US Dollars and Euros.

Format of the query: ?action=GetCurrencies

Parameters:

  • id – currency identifier (optional; if specified, only one entry is queried)

The output format:

<getCurrenciesResult version="1.0">
 <currency id="{Int32}" name="{String}" />
 ...
</getCurrenciesResult>

The root element getCurrenciesResult contains an arbitrary number of currency elements, where each one of them describes the currency with attributes: id (identifier) and name (name).

Tour Search

The tour search method has multiple parameters of search and tour filtration. The method should return only the cheapest deals, filtered out by a specified parameter. The number of returned tours is regulated by the parameter count.

Format of the query: ?action=GetTours

Parameters:

Parameter; required Type of Data Description
offerId Int64 Unique identifier of the previously found offer. If specified, all other parameters are unnecessary and should be omitted, as well as the method should return only one entry.
count Int32 Maximum number of offers returned by the query.
countryId Int32 Country identifier.
departCityId Int32 Departure city identifier.
dateFrom String First date in the range of departure dates presented in the format dd.MM.yyyy, e.g. 31.12.2015.
dateTo String Last date in the range of departure dates presented in the format dd.MM.yyyy, e.g. 31.12.2015.
adults Int32 Number of adults.
kids Int32 Number of children.
kidsAges String Number of full years of age of each child, transmitted as a string, enumeration separated by comma, e.g. 3, 6. Values 0 or 1 have been used to indicate age of infants.
nightsMin Int32 Minimum number of nights in the tour.
nightsMax Int32 Maximum number of nights in the tour.
resorts String Identifiers of the resorts, enumeration separated by comma.
hotelCategories String Identifiers of hotel categories, enumeration separated by comma.
hotels String Hotel identifiers, enumeration separated by comma.
meals String Identifiers of meal options, enumeration separated by comma.
currencyId Int32 Currency, which also includes prices, as well as currency for input parameters priceMin and priceMax (if specified).
priceMin Int32 Minimum price of the tour.
priceMax Int32 Maximum price of the tour.
hotelIsNotInStop Int32 If input value equals to 1, the results should not contain any hotels with no places available (hotels with the status «on request» are acceptable).
ticketsIncluded Int32 If input value equals to 1, the results should contain only the tours, for which the flight fare is included into the total price (option only hotel is unacceptable).
hasTickets Int32 If input value equals to 1, the results should contain only the tours, for which the tickets are currently available, there should not be flights with no places available or flights with on request status.
excludeUsualTours Int32 При значении "1" из результатов должны быть исключены туры, являющиеся обычными турами (не являющиеся комбинированными, экскурсионными или шоп-турами). При значении "0" или отсутствии данного параметра, такие туры должны быть включены в результат.
excludeCombined Int32 При значении "1" из результатов должны быть исключены туры, являющиеся комбинированными (в рамках которых турист посещает несколько курортов). При значении "0" или отсутствии данного параметра, такие туры должны быть включены в результат.
excludeShopTours Int32 При значении "1" из результатов должны быть исключены шоп-туры и туры с обязательствами. При значении "0" или отсутствии данного параметра, такие туры должны быть включены в результат.
excludeExcursionTours Int32 При значении "1" из результатов должны быть исключены экскурсионные туры. При значении "0" или отсутствии данного параметра, такие туры должны быть включены в результат.

The output format:

<getToursResult version="1.0">
 <tour
  offerId="{Int64}"
  tourName="{String}"
  hotelId="{Int32}"
  hotelUrl="{String}"
  resortId="{Int32}"
  hotelCategoryId="{Int32}"
  mealId="{Int32}"
  htPlaceName="{String}"
  roomTypeName="{String}"
  tourDate="{String}"
  nights="{Int32}"
  price="{Int32}"
  hotelIsInStop="{Int32}"
  ticketsIncluded="{Int32}"
  hasEconomTicketsDpt="{Int32}"
  hasEconomTicketsRtn="{Int32}"
  hasBusinessTicketsDpt="{Int32}"
  hasBusinessTicketsRtn="{Int32}"
  tourUrl="{String}"
  spoUrl="{String}"
  fewPlacesInHotel="{Int32}"
  fewTicketsDptY="{Int32}"
  fewTicketsRtnY="{Int32}"
  fewTicketsDptB="{Int32}"
  fewTicketsRtnB="{Int32}"
  flags="{UInt64}"
  description="{String}"
  receivingParty="{String}"
  earlyBookingValidTill="{String}"
  />
 ...
</getToursResult>

The root element getToursResult contains an arbitrary number of tour elements (cannot exceed the number specified in count parameter), where each one of them describes the tour with the following atributes:

Parameter; required Description
offerId Unique identifier of the offer for further tour actualization or booking.
tourName Arbitrary name of the tour.
hotelId Hotel identifier.
hotelUrl Link to the page with the tour description.
resortId Identifier of the resort in which the hotel is located.
hotelCategoryId Hotel category identifier.
mealId Meal option identifier.
htPlaceName Arbitrary name for hotel accommodation preferences, e.g. DBL, TRP, 2 ADL + 1 CH (2-12), 2 ADL + INF). The name should express age of children (if the number of children older than 0 y.o. was specified) or indicate the request for accommodation of an infant (+ INF) respectively.
roomTypeName Name of the room type, e.g. standard, deluxe, family, deluxe super, ocean view.
tourDate Beginning date of the tour in the format dd.MM.yyyy, e.g. 31.12.2015.
tourEndDate Дата окончания тура (дата прилета) в формате dd.MM.yyyy (пример: 31.12.2015).
nights The number of nights in the tour.
price Price of the tour in currency, specified in the input parameter currencyId.
hotelIsInStop Hotel rooms availability. The following values are acceptable: 0 – rooms available, 1 – rooms unavailable, 2 – on request.
ticketsIncluded Indicator if the ticket prices are included in the tour price. The following values are acceptable: 0 – not included (hotel only tour), 1 – included (package tour).
hasEconomTicketsDpt Availability of economy class tickets to the place of destination. The following values are acceptable: 0 – no tickets available, 1 – tickets available, 2 – on request. If the value of the attribute ticketsIncluded equals to 0, then the value of this parameter will be ignored.
hasEconomTicketsRtn Availability of economy class return tickets. The following values are acceptable: 0 – no tickets available, 1 – tickets available, 2 – on request. If the value of the attribute ticketsIncluded equals to 0, then the value of this parameter will be ignored.
hasBusinessTicketsDpt Availability of business class tickets to the place of destination. The following values are acceptable: 0 – no tickets available, 1 - tickets available, 2 – on request. If the value of the attribute ticketsIncluded equals to 0, then the value of this parameter will be ignored.
hasBusinessTicketsRtn Availability of the business class return tickets. The following parameters are acceptable: 0 – no tickets available, 1 – tickets available, 2 – on request. If the value of the attribute ticketsIncluded equals to 0, then the value of this parameter will be ignored.
tourUrl Link to the booking page (the link can first lead to the page of authorization, and when authorization is complete it should take the customer to the booking page automatically).
spoUrl Link to the tour description and the tour programs (if available).
fewPlacesInHotel The field may be filled if there is an indication that there only few rooms available in the hotel. If the exact number of remaining rooms is not specified, the return value equals to -1, otherwise the value is the exact number of remaining rooms.
fewTicketsDptY The field may be filled if there is an indication that there are only few economy class seats available. If the exact number of remaining seats is not specified, the return value equals to -1, otherwise the value is the exact number of remaining seats.
fewTicketsRtnY The field may be filled if there is an indication that there are only few return flight economy class seats available. If the exact number of remaining return flight seats is not specified, the return value equals to -1, otherwise the value is the exact number of remaining seats.
fewTicketsDptB The field may be filled if there is an indication that there are only few business class seats available. If the exact number of remaining seats is not specified, the return value equals to -1, otherwise the value is the exact number of remaining seats.
fewTicketsRtnB The field may be filled if there is an indication that there are only few return flight business class seats available. If the exact number of remaining return flight seats is not specified, the return value equals to -1, otherwise the value is the exact number of remaining seats.
flags The set of bit flags of the tour. Multiple flags can be attributed to the same tour simultaneously, and the sum of them makes the value of this parameter. Possible flags of the tour:
  • 1 – recommended by the tour operator;
  • 2 – instant confirmation available;
  • 4 – best offer;
  • 8 – early booking available;
  • 16 – late booking available;
  • 32 – discounted tour;
  • 64 – VIP offer;
  • 128 – credit for this tour available;
  • 256 – exclusive offer;
  • 512 – gift offered upon purchase;
  • 1024 – combined tour;
  • 2048 – tour with obligation (shopping tour);
  • 4096 – зарезервировано для использования системой;
  • 8192 – экскурсионный тур;
description Additional information on the tour, e.g. hotel accommodation info for combined tours.
receivingParty Receiving party.
earlyBookingValidTill If the tour is available for early booking and the last date of early booking is known, then the field should contain this date.

Актуализация тура

Метод служит для получения окончательной цены тура (со всеми обязательными доплатами и сборами), списка включенных в стоимость тура услуг, а также вариантов перелета, возможных дополнительных услуг и доплат по ним. Метод должен возвращать цену самой дешевой конфигурации запрашиваемого предложения. Для корректной работы метода необходимо, чтобы offerId был уникален для предложений с разным составом группы туристов, даже в случае если все прочие параметры предложений совпадают.

Формат запроса: ?action=ActualizeTour

Параметры:

Параметр; обязательный Тип данных Описание
offerId Int64 Уникальный идентификатор ранее найденного предложения.
currencyId Int32 Валюта, в которой должна быть рассчитана цена и доплаты.

Формат выдачи:

<actualizeTourResult version="1.0">
 <actualizedTour
  price="{Int32}"
  ticketsIsIncluded="{Int32}"
  hotelIsInStop="{Int32}"
  hasEconomTicketsDpt="{Int32}"
  hasEconomTicketsRtn="{Int32}"
  hasBusinessTicketsDpt="{Int32}"
  hasBusinessTicketsRtn="{Int32}"
  fewPlacesInHotel="{Int32}"
  fewEconomTicketsDpt="{Int32}"
  fewEconomTicketsRtn="{Int32}"
  fewBusinessTicketsDpt="{Int32}"
  fewBusinessTicketsRtn="{Int32}"
  tourUrl="{String}"
 >
  <services>
   <service
    id="{Int32}"
    type="{String}"
    name="{String}"
    isIncluded="{Int32}"
    description="{String}"
    surcharge="{Int32}"
    flightCompatibleIds="{String}"
    flightClass="{String}"
    flightAvailability="{Int32}"
    flightPlacesCount="{Int32}"
    flightAirportFrom="{String}"
    flightAirportTo="{String}"
    flightNum="{String}"
    flightAirline="{String}"
    flightStartDateTime="{String}"
    flightEndDateTime="{String}"
    flightAircraft="{String}"
   />
   ...
  </services>
 </actualizedTour>
</actualizeTourResult>

Корневой элемент actualizeTourResult должен содержать единственный элемент actualizedTour, который описывается следующими атрибутами:

Параметр; обязательный Описание
price Актуализированная цена тура в валюте, которая была указана во входном параметре currencyId
ticketsIsIncluded Включена ли стоимость билетов в стоимость тура, допустимы значения: 0 – не включена (тур только отель), 1 – включена (пакетный тур)
hasEconomTicketsDpt Наличие билетов эконом класса на место отдыха, допустимы значения: 0 – нет мест, 1 есть места, 2 – запрос. При значении атрибута ticketsIncluded = 0 значение данного параметра будет проигнорировано.
hasEconomTicketsRtn Наличие обратных билетов эконом класса, допустимы значения: 0 – нет мест, 1 есть места, 2 – запрос. При значении атрибута ticketsIncluded = 0 значение данного параметра будет проигнорировано.
hasBusinessTicketsDpt Наличие билетов бизнес класса на место отдыха, допустимы значения: 0 – нет мест, 1 есть места, 2 – запрос. При значении атрибута ticketsIncluded = 0 значение данного параметра будет проигнорировано.
hasBusinessTicketsRtn Наличие обратных билетов бизнес класса, допустимы значения: 0 – нет мест, 1 есть места, 2 – запрос. При значении атрибута ticketsIncluded = 0 значение данного параметра будет проигнорировано.
fewPlacesInHotel Поле заполняется, если есть указание на то, что мест в отеле мало. Если нельзя указать точное кол-во оставшихся мест, то заполняется значением -1, иначе указывается точное кол-во оставшихся мест.
fewEconomTicketsDpt Поле заполняется, если есть указание на то, что мест эконом класса туда мало. Если нельзя указать точное кол-во оставшихся мест, то заполняется значением -1, иначе указывается точное кол-во оставшихся мест.
fewEconomTicketsRtn Поле заполняется, если есть указание на то, что мест эконом класса обратно мало. Если нельзя указать точное кол-во оставшихся мест, то заполняется значением -1, иначе указывается точное кол-во оставшихся мест.
fewBusinessTicketsDpt Поле заполняется, если есть указание на то, что мест бизнес класса туда мало. Если нельзя указать точное кол-во оставшихся мест, то заполняется значением -1, иначе указывается точное кол-во оставшихся мест.
fewBusinessTicketsRtn Поле заполняется, если есть указание на то, что мест бизнес класса обратно мало. Если нельзя указать точное кол-во оставшихся мест, то заполняется значением -1, иначе указывается точное кол-во оставшихся мест.
tourUrl Ссылка, при переходе по которой можно забронировать тур (ссылка может вести на страницу авторизации, но после авторизации должны автоматически попасть на страницу бронирования тура).

Элемент actualizedTour может содержать секцию services, которая в свою очередь содержит произвольное число элементов service. Каждый элемент service описывает услугу включенную в стоимость тура, либо услугу, добавление которой возможно в текущей конфигурации тура. Атрибуты элемента service:

Параметр; обязательный Описание
id Идентификатор услуги, уникальный в рамках данного предложения.
type Тип услуги. Может принимать одно из следующих значений:
  • “Insurance” – страховка;
  • “DptTransport” – перелет туда;
  • “RtnTransport” – перелет обратно;
  • “AdditionalService ” – дополнительная услуга;
  • “AdditionalMeal” – дополнительное питание;
  • “Transfer” – трансфер;
  • “Excursion” – экскурсия;
  • “Charge” – доплата;
  • “Visa” – виза;
  • “NoGoGuarantee” – страховка от невыезда;
name Наименование услуги.
isIncluded Включена ли данная услуга в стоимость текущей конфигурации тура, допустимы значения: 0 – не включена, 1 – включена.
description Описание услуги в произвольной форме.
surcharge Доплата за включение услуги в стоимость тура. Применяется только для услуг, не включенных в стоимость текущей конфигурации тура.
flightCompatibleIds Совместимые перелеты. Идентификаторы услуг перелетов, представленных в секции services, которые могут применяться совместно с текущей услугой перелета. Для перелета туда заполняется id перелетов обратно и наоборот. Применяется и является обязательным только для услуг типа DptTransport и RtnTransport.
flightClass Класс перелета. Может принимать одно из следующих значений:
  • “ECONOM” – эконом;
  • “BUSINESS” – бизнес;

Применяется и является обязательным только для услуг типа DptTransport и RtnTransport.

flightAvailability Наличие билетов, допустимы значения: 0 – нет мест, 1 есть места, 2 – запрос. Применяется и является обязательным только для услуг типа DptTransport и RtnTransport.
flightPlacesCount Количество оставшихся билетов. Заполняется, если количество билетов мало. Если кол-во билетов известно – заполняется этим числом, иначе значением -1. Применяется только для услуг типа DptTransport и RtnTransport.
flightAirportFrom Аэропорт отправления. Значение должно начинаться с кода IATA, за которым может следовать дополнительная информация, например о терминале (пример: SVO C). Применяется и является обязательным только для услуг типа DptTransport и RtnTransport.
flightAirportTo Аэропорт прибытия. Значение должно начинаться с кода IATA, за которым может следовать дополнительная информация, например о терминале (пример: AYT 1). Применяется и является обязательным только для услуг типа DptTransport и RtnTransport.
flightNum Рейс (например UN 7422). Применяется и является обязательным только для услуг типа DptTransport и RtnTransport.
flightAirline Авиакомпания. Применяется только для услуг типа DptTransport и RtnTransport.
flightStartDateTime Дата и время вылета в формате dd.MM.yyyy HH:mm (пример: 31.12.2015 14:30). Применяется только для услуг типа DptTransport и RtnTransport.
flightEndDateTime Дата и время прибытия в формате dd.MM.yyyy HH:mm (пример: 31.12.2015 14:30). Применяется только для услуг типа DptTransport и RtnTransport.
flightAircraft Информация о воздушном судне. Применяется только для услуг типа DptTransport и RtnTransport.