Natalie Tours webservices


Version history


Date Version Changes
21.05.10 1.1 1st release
28.01.11 1.8 Several request's elements renamed/added/modified


Introduction

Natalie Tours webservices provide software developers to create an integration with Natalie Tours Information System to search and book Natalie Tours travel packages. Developers seeking to use these services should have a background in web services development.


Authorization

To connect to Natalie Tours Information System using webservices, consumers will need valid user credentials (login and password).


Webreferences for Natalie Tours Webservices

1. Webservices for Tour Products Search requests, Travel guide items (Countries, Regions, Cities, Aircompanies etc) lists requests:

http://www.natalie-tours.ru/webservice/SearchTourWS

Description of these webservices can be found at http://www.natalie-tours.ru/webservice/SearchTourWS?WSDL.

2. Webservices for Booking/Cancellation/Update requests and getting some additional information:

http://www.natalie-tours.ru/webservice/BookingWS

Description of these webservices can be found at http://www.natalie-tours.ru/webservice/BookingWS?WSDL.

More detailed information is available in English and Russian.

3. Some more webservices for Travel guide items (Countries, Regions, Cities, Hotels, Boards Types, and Accommodation types lists requests by parent ID):

http://www.natalie-tours.ru/webservice/GeoService

Description of these webservices: http://www.natalie-tours.ru/webservice/GeoService?WSDL.

 

XML messages overview

To use our webservices you have to prepare right request and handle response. All requests and responses have general structure. Every request consists of WsLoginPassword object (right login/password and sometimes pear (AgencyUnit ID, idContract id) ) and specific request. For example: OrderInfoRequest element has only one attribute “orderId”.

Response consists of two parts “ResponseLog” and “XXXSpecificResponseData”. “ResponseLog” attribute “comment” contains error message text or “comment” is empty if request/response is successful. First of all you have to handle “ResponseLog”.

Sample Code for Java

To generate client java code you can use “axis”, framework for constructing SOAP (http://ws.apache.org/axis/ ). By means of ant task you can generate source code directly from WSDL URLs:

http://www.natalie-tours.ru/webservice/BookingWS?WSDL

After code generation you can request webservice operations by methods of org.tempuri.BookingWSPort object. For example after WsLoginPassword object and OederInfoRequest object creation you can get OrderInfoResponse object (object contains Order information):

 
  BookingWSLocator bookingWSLocator = new BookingWSLocator();
  try{
    OrderInfoResponse resp =
      bookingWSLocator.getBookingWSPort().getOrderInfo(
        wsLoginPassword, OrderInfoRequest);
  catch(RemoteException e) { …... }
  catch(ServiceException e) {…....}
 

Apache Ant task example:



<project default="build">
<path id="lib.jars">
<fileset dir="lib">
<include name="**/*.jar"/>
fileset>
path>
<property name="result" location="_result"/>
<property name="tmp" location="tmp"/>
<property name="javasrc" location="${result}/javasrc"/>
<property name="classes" location="${tmp}/classes"/>
<target name="clean">
<delete dir="${result}"/>
<mkdir dir="${result}"/>
<delete dir="${tmp}"/>
<mkdir dir="${tmp}"/>
<delete dir="${javasrc}"/>
<mkdir dir="${javasrc}"/>
<delete dir="${classes}"/>
<mkdir dir="${classes}"/>
target>
<taskdef classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask" name="wsdl2java" classpathref="lib.jars"/>
<target name="build_genarated_src" depends="clean">
<wsdl2java all="true" debug="false" deployscope="Request" helpergen="true" noimports="false" output="${javasrc}" serverside="false" skeletondeploy="false" testcase="true" timeout="0" typemappingversion="1.1" url="http://localhost:7001/webservice/BookingWS?WSDL" verbose="false" wrapArrays="false">
<classpath>
<fileset dir="lib">
<include name="**/*.jar"/>
fileset>
classpath>
wsdl2java>
target>
<target name="copy_test_src" depends="build_genarated_src">
<copydir src="srctest" dest="${javasrc}" includes="**/*.java"/>
target>
<target name="build" depends="copy_test_src">
<javac srcdir="${javasrc}" destdir="${classes}" classpathref="lib.jars"/>
<jar destfile="${result}/testapp.jar" basedir="${classes}"/>
target>
project>




Operations description


Terms

  • Order – an entity in the Natalie Tours Information system which joins one or more products requested by one customer (agency).
  • Tour Product (Product) – an entity in the Natalie Tours Information system based of a fixed Set of Services. Each Service in the Product can be related to its own passenger(s). Passengers of an Order are the join of all products’ passengers.
  • Service – a basic entity in the Natalie Tours Information system which describes a service provided to end customers. The types of services are: accommodation, cruise, roundtrip, flight, transfers (2 types - regular and individual), insurance, excursion, visa, and services called "miscellaneous". Services cannot be added to Orders directly (only as a part of a Tour Product!).
  • Passenger – consumer of a service.

Booking workflow description

  • To create a boooking, you have to do first a Tour product availability request (that is, you are searching a package which has Flight, Accommodation, Roundtrip, or Cruise as a Main Service): e.g. searchStandardTour;
  • Get a response with price and availability;
  • Create an Order adding Tour Product ID (only one) and Passengers information using bookOrder request;
  • Retrieve the response with Order ID, Tour Product and its Passengers Info.

Important note: using Natalie Tours Webservices, you can only book services like accommodation, flights, roundtrips etc. as a part of a package consisting of one or more items. One of package`s items is defined as Main Service, to allow you to search by its attributes.


Booking modifications

The following kind of modifications are supported:

  • Add a Package to the existing Order with addTourproduct request;
  • Update Passenger personal data using updatePassenger request;
  • Update Passenger links to Services (Products) and its items (e.g. in one Order, you have 2 products with 2 passengers in each product, and need to change passengers between products) using updatePassengerBindings request.

Booking cancellation

You can cancel either one Product (Service) from the Order with cancelOneTourproduct request, or the Order itself with cancelOrder request.


Table: Available operations

¹ Operation WS Operation name Operation Type Operation description
1 Flights Availability searchFlight Availability Request Makes a search of Products containing Flights as Main Service.
2 Roundtrips Availability searchRoundtrip Availability Request Makes a search of Products containing Roundtrip as Main Service.
3 Cruises Availability Request searchCruise Availability Request Makes a search of Products containing Cruises as Main Service.
4 Packages Availability Request searchStandardTour Availability Request Makes a search of Products containing Accommodation as Main Service.
5 Agency Contract List Request getAgencyContracts Get a List Gets a list of Contracts of the Agency logged in: information about a contract is mandatory for Order creation
6 Agency Offices List Request getAgencyUnits Get a List Gets a list of Offices of the Agency logged in: information about a contract is mandatory for Order creation
7 Air Companies list Request getAirCompanes Get a List Allows to get a list of Air Companies available
8 Airports list Request getAirportByID Get a List Allows to get a list of Airports available
9 Accommodation Types list Request getAllAccomdTypes Get a List This operation is used to get a list of Accommodation Types available. An Accommodation Type contents an information about types (Adult, Child) and numbers of customers allowed for this particular accommodation, e.g. "DBL + CHD (2-4) + CHD (5-12)"
10 Age Types list Request getAllAgeTypes Get a List Allows to get a list of Age Types available. An Age Type contents an information about a type (Adult, Child) and age range allowed for this type, to be used in an Accommodation Type, e.g. "CHD(2-12)"
11 Meal Board Types list Request getAllBoardTypes Get a List This operation allows to get a list of Meal Board Types
12 Cities list Request getAllCities Get a List This operation allows to get a list of Cities (Fixed tree structure is used: City -> Region -> Country)
13 Countries list Request getAllCountries Get a List Allows to get a list of Countries available
14 Cruise Companies list Request getAllCruiseCompanies Get a List Allows to get a list of Cruise Companies names
15 Cruise Names list Request getAllCruiseNames Get a List Allows to get a list of Cruise (that is, Couise Routs) names, like "European Grand Voyage" etc. A Cruise is combining an Itinerary, and a Cruise ship info.
16 Currencies list Request getAllCurrencies Get a List Allows to get a list of Currencies in which prices can be represented
17 Regions list Request getAllRegions Get a List This operation allows to get a list of Regions (Fixed tree structure is used: City -> Region -> Country)
18 Room Types list Request getAllRoomTypes Get a List Allows to get a full list of Room Types common for all hotels (e.g. Standard, Suite, Family etc)
19 Ships list Request getAllShips Get a List Allows to get a list of Cruise Ships used to describe a Cruise
20 Tariff Type list Request getTariffTypes Get a List Allows to receive a list of Tariff Types. A Tariff Type can be related to one of Tariff Kinds (Basic, Pronto, Last Minute, and Special) and is describing Booking and Payment conditions (Available booking dates, paymet due dates) and Cancellation fees in persentage to the Service price
21 Read an Order Info getOrderInfo Read Request Allows to get information about the Services (Tour Products) included in the Order and their passengers
22 Add Tourproduct to an existing Order addTourproduct Reservation This operation allows to add a new Tourproduct to the existing Order
23 Order reservation Request bookOrder Reservation First operation for Order creation. Agency unit and contract are needed for Order creation. List of unit and contracts you can get by operations getAgencyContracts and getAgencyUnits. 
24 Cancel an Order cancelOrder Cancellation Cancel existing Order (created by means of bookOrder). 
25 Cancel one package from an Order cancelOneTourProduct Cancellation Cancel a Service of the Order (created by means of bookOrder). You can get information about services of the Order by means of “getOrderInfo” operation
26 Passenger Data Update updatePassenger Update Updates Passenger personal data
27 Passenger to Packages Bindings Update updatePassengerBindings Update Updates Passenger data and his relationships to Services and Services in the Order.  You can get information about services of the Order by means of “getOrderInfo” operation


XML Requests



SearchFlight


Request:








YOUR_LOGIN
your_password


101
?
19.03.2011
12.03.2011
2
?
?
?
12796
?
?
?
541
?
?
?
?
?
?
?






Notes:


  • ageTypeID you can get by getAllAgeTypes Request (e.g. 101 for Adults, 163 for Infants (age 0-1), 111 for Children (age 2-11)
  • airCompanyCode can be received using getAirCompanies request
  • airDateFromDestination
  • airDateFromOrigin
  • airType: One Way (1) or Roundtrips (2). We recommend to use this parameter for searching simple one- or two segments flights
  • classofSeatsGroupTypeID: class types: business (Id: 102), comfort (Id: 124), first (Id: 103), premium (Id: 144), economy (Id: 101)
  • classofSeatsTypeID: carrier's booking classes; can be received by getAllClassOfSeats request
  • destinationAirPortID: for a particular city, can be received with getAirportByID request
  • destinationCityID: to get, please use getAllAirportCities request
  • flightNumber
  • logMessage
  • originAirPortID (see getAirportByID request)
  • originCityID (see getAllAirportCities request)
  • priceMax
  • priceMin
  • rowNumFrom: first number of rows displayed in search results; counted from 0
  • rowNumTo: last number of rows displayed in search results; counted from 1
  • sortType
  • tarifTypeID: tariff types of Tourproducts IDs, see getTariffTypes request.
  • tourProductTemplID

Response:










7




UN
U
2

3085
Çàëüöáóðã
327

840
Ìîñêâà




UN
U
2

840
Ìîñêâà
328

3085
Çàëüöáóðã


370.0 EUR
A1
A
5410938823
216
200911212



num rows=1
90






Notes:


SearchStandardTour


Request:








YOUR_LOGIN
your_password


122



0
0


5
541
7
7
?
87
29412
?
2
0
?
?
?
?
?
?
15.05.2011
122
214






Notes:


  • boardType: see getAllBoardTypes request
  • countryID can be received by using getAllCountries request
  • departureCityId can be received by using getAllCities request
  • durationMax
  • durationMin
  • hotelCategoryID: any="", "3*"="3", "3*sup"="4", "4*"="5", "5*"="7"
  • hotelCityID: 87 for Calella, Spain (see getAllCities request )
  • hotelID: 29412 for Calella Palace 4*, Calella, Spain
  • logMessage
  • numberOfAdults
  • numberOfChildren
  • priceMax
  • priceMin
  • regionID: see getAllRegions request
  • rowNumFrom
  • rowNumTo
  • sortType
  • startDate
  • tarifTypeID: 122 for "Pronto" (to get this, use getTariffTypes request )
  • tourProductTemplateID: 214 for standard tours, 219 for beach hotels only, 218 for city breaks (packages), 221 for city hotels only, 237 for standard ski tours, 238 for ski hotels only

Response:







num rows=2
1426



Èñïàíèÿ (Calella)
87
122
1109.0 EUR
7
Calella Palace 4*
29412
101298739 ,
standard
1
P188
5344075973
5344075973

1530
101298739
DBL
102


Èñïàíèÿ (Calella)
87
122
1227.0 EUR
7
Calella Palace 4*
29412
145652106 ,
standard PV
165
P188
5344282943
5344282943

1530
145652106
DBL
102









bookOrder


Request:






xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">
28877
494858
YOUR_LOGIN
your_password

xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">



1980-10-25T10:10:00
TEST
2015-10-25T10:10:00
22
TEST
?
?
-1
2



201868745
5206880096






Notes:


  • idAgencyUnit: see getAgencyUnits request
  • idContract: see getAgencyContracts request
  • birthday: (mandatory, date - time format)
  • firstname: passenger's first name (mandatory)
  • foreignPassportExpiryDate: (mandatory, date - time format)
  • foreingPaspNum: foreing pasport number (mandatory)
  • lastname: passenger's last name (mandatory)
  • lastnameRU: passenger's last name in cyrilic (optional)
  • nameRU: passenger's first name in cyrilic (optional)
  • passengerID: not used
  • passengerType: 1 for Child, 2 for Mister, 3 for Miss, 4 for Infant (mandatory)
  • id: tourProductID received with an availability request (e.g. searchFlight)
  • idTariff: tariffID received with an availability request (e.g. searchFlight)

Response:



xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">





2011-02-22T00:00:00+03:00
84492758
6E-84530831


1980-10-25T00:00:00+03:00
TEST
2015-10-25T00:00:00+04:00
22
TEST
?
?
2831343
2




2831343
84492760


2011-03-19T00:00:00+03:00


0.0

0
0
6175
0
Äîïîëíèòåëüíàÿ óñëóãà ïðî÷àÿ ñáîð





0.0

0
0
84492760
0
Àâèàïåðåëåò
2011-03-19T00:00:00+03:00




84492759
1323





0







cancelOrder


Request:


xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">



xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">
YOUR_LOGIN
your_password

xmlns:java="java:com.nt.slib.ws.wssearch.booking.protocol.cancellation" xmlns:xs="http://www.w3.org/2000/XMLSchema-instance">
84492758



Response:



xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">




84492758


0






Contacts

Natalie Tours
Sadovaya-Kudrinskaya, 25, 123001 Moscow, Russia
E-mail:
Phone: (+7)495 785 37 11