Request for Tour Search

In order to get the result in json format the following URL is used:

http://search.tez-tour.com/toursearch/getResult?accommodationId=2&after=21.03.2013&before=15.04.2013&cityId=345&countryId=1104%C2%A4cy=5561&hotelClassBetter=true&hotelClassId=2569&hotelInStop=false&locale=ru&nightsMax=15&nightsMin=7&noTicketsFrom=false&noTicketsTo=false&priceMax=999999&priceMin=0&rAndBBetter=true&rAndBId=2424&tourId=1285&formatResult=true&xml=false

You can also use ‘formatResult=false’ parameter in order to the get result in one string. The request consists of the following parameters:

Mandatory parameters:

countryId=1104 – resort country id;

cityId=345 – departure city id;

priceMin=0 – minimum package price;

priceMax=999999 – maximum package price;

before=31.05.2010 – highest value for check-in date interval;

after=21.05.2010 – lowest value for check-in date interval;

currency=5561 – id of the currency in which the price is specified;

nightsMin=7 – minimum number of nights spent at the hotel;

nightsMax=15 – maximum number of nights spent at the hotel;

accommodationId=2 – accommodation id;

hotelClassId=2569 – hotel category (stars) id;

hotelClassBetter=true / false – allows (or does not allow) to show in the tour search results the hotels of higher category than specified (in interface it is displayed as “and better” checkbox);

rAndBId=2424 – meal type id;

rAndBBetter=true / false – allows (or does not allow) to show in the tour search results the offers with meals of the higher level than specified (in interface it is displayed as “and better” checkbox);

noTicketsFrom=false / true – allows (or does not allow) to search for offers without suitable return flight (in interface it is displayed as “no tickets on arrivals” checkbox);

noTicketsTo=false / true – allows (or does not allow) to search for offers without suitable departure flight (in interface it is displayed as “no tickets on departures” checkbox);

hotelInStop=false / true – allows (or does not allow) to search for offers with hotels in stop sale (in interface it is displayed as “hotels in stop sale” checkbox);

spoRegionId=1234 – SPO region identifier. For each country SPO region has meaning (in interface it is displayed as “Tour” list). Cannot be used together with tourId.

tourId=1285 – region id. You can specify several regions: tourId=14259&tourId=14385. For second accommodations specify tourId=14259,14385. The parameters cannot be used together with spoRegionId.

hotelId=1234 – hotel id. You can specify several hotels: hotelId=1234&hotelId=12345;

birthday1=22.06.2005 – child birthday. Parameter should be specified only in case of child accommodation;

birthday2=12.06.2005 – second child birthday. Parameter should be specified only in case of two children accommodation;

Optional parameters:

xml=true / false – results (reply) format. True – the reply will be received in xml format, false – the reply will be received in search format.

formatResult= true / false – reply formatting. True – the reply will be formatted, false – the reply will be received as single string. Relevant only for reply in json format.

locale=ru / en – localization. Ru – Russian localization, en – English localization (under development).

Tour search result in json format with description:

{
  "success": true, //tour search results. If the tour search is successful, ‘true’ value is returned. 
If an error occurred in the process of tour search, ‘false’ value and error description are returned.
  "serverName": "amba.teztour.com", //server name
  "data": [   //contains the description of the first result of tour search
    [
      1, // number of tour search result 
      "06.04.2013", //check-in date in the hotel
      "Сб", //day of week of check-in in the hotel
      "", //flight departure date. If it is the same as check-in date, the value is not specified
      7, //number of nights
      "до 13.04", //check-out date in the hotel
      "NAZAR BEACH CITY & RESORT HOTEL 4 *", //hotel name
      "http://www.tez-tour.com/hotel.html?id=9000184", //link to the hotel on the company’s website
      "Standard", // room type
      [
        [
          "", // if the search result presumes several accommodations during stay, the hotel name for second accommodation is returned here
          "http://online.tez-tour.com/armmanager/workplace/section/new-order?cDateId=40204692237
&depCity=345&arrivalCity=345&hotStType=2&priceOfferId=10020707&locale=ru",
//link to agency’s online workplace for booking.
          "http://book.tez-tour.com/book/vc/common/spo?spoId=10020707&hotelRoomId=9004082#hotelContent9004082" 
//link to special offer in the old version of agency’s online workplace. It has lost relevance and will be removed.
        ]
      ],
      "Antalya", //Accommodation region 
      "ANTALYA", //SPO region
      7, // 0 - blank, 1 – instant confirmation, 2 – early booking, 4 - 
Tez recommends. The rest of the numbers are a combination of the offered variant, for example 7=4+2+1, meaning that the offer refers to both instant confirmation, early booking and tez recommends options.
However, it is recommended to use the information below instead, because it is more detailed. For example,         
          //       "baseHotel": {
         //              "value": true,
         //               "comment": "Tez recommends "
         //                           },
      "AI", //Meal type
      "All Inclusive", //Meal type description
      "DBL<br><small>2+0+0</small>", //Accommodation and number of people. The field is not relevant, it is included for backward compatibility support.
      "$886", //tour price without extra charges.
      "SPO 1213", //Special offer
      "Yes", //Hotel availability
      "Available", //First class seats availability on departure flight
      "No", //Business class seats availability on departure flight
      "No", //Premium economy class seats availability on departure flight
      "No", //Economy class seats availability on departure flight
      "", //Extra charge for flying in first class on departure flight
      "", //Extra charge for flying in business class on departure flight
      "", //Extra charge for flying in premium economy class on departure flight
      "", //Extra charge for flying in economy class on departure flight
      "Available", //First class seats availability on the return flight
      "No", //Business class seats availability on the return flight
      "No", //Premium economy class seats availability on the return flight
      "No", //Economy class seats availability on the return flight
      "", //Extra charge of flying in first class on return flight
      "", //Extra charge of flying in business class on return flight
      "", // Extra charge of flying in premium economy class on return flight
      "", // Extra charge of flying in economy class on return flight
      "Tez recommends, early booking (special booking conditions), instant confirmation", 
//Non-relevant field. Returned for backwards compatibility. Names of icons in search result.
      112201, // special offer id
      0, //package offer, signifying that flight is included. If ‘1’ then the offer is package offer.
      "http://s.tez-tour.com/hotel/3651/1311788176826_small.jpg", //Link to the main photo of the hotel
      886, // tour price
      "$", // tour currency
      [ // in this section the information about the number of tourists is returned. The section can include up to 3 sets of values.
First set is the one corresponding to the ‘Adult’ tourist category, second is the value set
corresponding to ‘big child’ tourist category, and the last set is the one corresponding to ‘small child’ category.
If one of the groups is absent, it means that the tour conditions do not provide for the corresponding tourist category.
The description of each set of values is given below.
        [
          2, // number of tourists in this category
          0, // minimum age for the tourists in this category. For adults ‘0’ is used.
          0 //maximum age for the tourists in this category. For adults ‘0’ is used.
        ]
      ],
      7, //day of the week.
      { // this section has additional hotel characteristics
        "baseHotel": {
          "value": true, 
          "comment": "Tez recommends // additional hotel characteristic
        },
        "earlyBooking": { //early booking conditions
          "value": true,
          "comment": "early booking (special booking conditions)",
          "text": [
            "up to 15.05",
            "View rules"
          ]
        },
        "onlineConfirm": { //instant confirmation
          "value": true,
          "comment": "instant confirmation"
        },
        "pack": { //is the tour a package
          "value": false
        },
        "topPriority": { //is the hotel from the TEZ Priority category
          "value": false
        },
        "exclusive": { //is the hotel from the TEZ Exclusive category
          "value": false
        },
        "flexComission": { //is flexible commission available for this offer
          "value": false
        },
        "fixComission": { //is fixed commission available for this offer
          "value": false
        }
      },
      {}, - is the package full or not. In this case the package is full package.
      40204692237, // special offer container id
      9000184, // hotel id
      9004082, // id of ‘hotel-room type’ combination
      9004081, // id of ‘hotel-meal type’ combination
      68567, // Age group id
      2 //Accommodations
    ],

General Reference Table in json Format

To get the general reference table in json format use URL: http://search.tez-tour.com/toursearch/references?locale=ru&formatResult=true&xml=false

You can also use ‘formatResult=false’ parameter to get the result in single string.

{
 "success": true
 "cities": [
   {
     "cityId": 345,
     "name": "Moscow"
   },
   {
     "cityId": 392, 
     "name": "Nizhny Novgorod"
  }
 ],
 "countries": [
   {
     "countryId": 1104,
     "name": "Turkey"
   },
   {
     "countryId": 5732,
     "name": "Egypt"
   },
   {
     "countryId": 5733,
     "name": "Spain"
   }
 ],
 "currencies": [
   {
     "currencyId": 5561,
     "name": "US Dollar"
   },
   {
     "currencyId": 8390,
     "name": "Rouble"
   }
 ],
 "hotelClasses": [
   {
     "classId": 2566,
     "name": "1 *",
     "weight": -4
   },
   {
     "classId": 2567,
     "name": "2 *",
     "weight": -1
  }
 ],
 "rAndBs": [
   {
     "rAndBId": 15350,
     "name": "RO",
     "weight": 0
   },
   {
     "rAndBId": 2424,
     "name": "BB",
     "weight": 1
   }      

Reference Table Description

{
 "success": true
 "cities": [
   {
     "cityId": 345,            //city id
     "name": "Moscow"                    //city name
   },
   {
     "cityId": 392,            //city id
     "name": "Nyzhny Novgorod" //city name
  }
 ],
 "countries": [
   {
     "countryId": 1104,        //country id
     "name": "Turkey"                    //country name
   },
   {
     "countryId": 5732,        //country id
     "name": "Egypt"
   },
   {
     "countryId": 5733,
     "name": "Spain" //country name
   }
 ],
 "currencies": [
   {
     "currencyId": 5561,       //currency id
     "name": "US Dollar"       //currency name
   },
   {
     "currencyId": 8390,       //currency id
     "name": "Rouble"                    //currency name
   }
 ],
 "hotelClasses": [
   {
     "classId": 2566,                    //hotel category id
     "name": "1 *",            //hotel category name
     "weight": -4              //weight (coefficient) of hotel category
   },
   {
     "classId": 2567,                    //hotel category id
     "name": "2 *",            //hotel category name
     "weight": -1              //weight (coefficient) of hotel category
  }
 ],
 "rAndBs": [
   {
     "rAndBId": 15350,         //meal type id
     "name": "RO",             //meal type name
     "weight": 0               //weight (coefficient) of the meal type
   },
   {
     "rAndBId": 2424,                    //meal type id
     "name": "BB",             //meal type name
     "weight": 1               //weight (coefficient) of meal type
   }

Reference Table by Countries in json Format

To get the reference table in json format use URL: http://search.tez-tour.com/toursearch/byCountry?countryId=5732&locale=ru&xml=false

You can also use ‘formatResult=false’ parameter to get the result in single string.

{
 "success": true,
 "tours": [
   {
     "name": "Dahab",
     "tourId": [
       26313
     ],
     "fromCityId": [
       2552,
       9001185,
       786,
       1392,
       3711,
       2680,
       412,
       392,
       2141,
       6529,
       1107,
       3429,
       345,
       2729,
       3667,
       12044,
       1421,
       1754,
       1776,
       2672
     ]
   },
   {
     "name": "El Guna",
     "tourId": [
       14351
     ],
     "fromCityId": [
       4800,
       17151,
       3711,
       1776,
       2680,
       1754,
       392,
       412,
       2141,
       2729,
       3667,
       345,
       786,
       2552,
       1107,
       9001185,
       521,
       2672,
       3429
     ]
   },
     ]
   }
 ],
 "regions": [
   {
     "regionId": 7078307,
     "name": "HURGHADA"
   },
   {
     "regionId": 7078308,
     "name": "SHARM EL-SHEIKH"
   },
   }
 ],
 "hotels": [
   {
     "tourId": 111466,
     "hotelId": 127648,
     "name": "ABOU DABBAB RESORT 3 *",
     "hcWeight": 2,
     "rbWeight": [
       7,
       1,
       3
     ]
   },
   {
     "tourId": 5735,
     "hotelId": 3012644,
     "name": "AIDA RESORT & HOTELS 3 *",
     "hcWeight": 2,
     "rbWeight": [
       7,
       3
     ]
   },
 ],
 "accommodations": [
   {
     "accommodationId": 1,
     "name": "SGL",
     "children": 0
   },
   {
     "accommodationId": 14317,
     "name": "SGL+CHD",
     "children": 1
   },
   {
     "accommodationId": 2,
     "name": "DBL",
     "children": 0
   },

Description of list by country:

{
 "success": true,              //
 "tours": [                              //
   {                                     //
     "name": "Dahab",                    // region name
     "tourId": [
       26313                             // region id
     ],
     "fromCityId": [
       2552,                             //id of departure city that has flights to this region
       9001185,                // id of the departure city that has flights to this region
       786,
       1392,
       3711,
       2680,
       412,
       392,
       2141,
       6529,
       1107,
       3429,
       345,
       2729,
       3667,
       12044,
       1421,
       1754,
       1776,
       2672
     ]
   },
     ]
   }
 ],
 "regions": [
   {
     "regionId": 7078307,                //SPO region id
     "name": "HURGHADA"                  // SPO region name
   },
   }
 ],
 "hotels": [
   {
     "tourId": 111466,                   //region id
     "hotelId": 127648,                  //hotel id
     "name": "ABOU DABBAB RESORT 3 *",   //hotel name
     "hcWeight": 2,                      //weight (coefficient) of hotel category
     "rbWeight": [
       7,                                //weight (coefficient) of meal type in the hotel
       1,                               //weight (coefficient) of meal type in the hotel
       3                                 //weight (coefficient) of meal type in the hotel
     ]
   },
 "accommodations": [
   {
     "accommodationId": 1,               //accommodation id
     "name": "SGL",                      //accommodation name
     "children": 0                       //number of children
   },
   

Flights List in search format

To get the list of flights in the json format use the following URL: http://search.tez-tour.com/toursearch/getFlightDeparture?cityId=345&countryId=5733&formatResult=true&xml=false You can also use ‘formatResult=false’ parameter in order to get results in a single string

Flights list

{
 "success": true,
 "data": [
   [
     2010,                     //year
     [                         //1st month
     ],             //1st month
     [                         //2nd month
     ],             //2nd month
     [                         //3rd month
     ],             //3rd month
     [                         //4th month
     ],             //4th month
     [                         //5th month
       28,                     //date for which the flight is assigned
       29,                     //date for which the flight is assigned
       30           //date for which the flight is assigned
     ],             //5th month
     [
       2,
       3,
       4,
       5,
       6,
       8,
       9,
       10,
       11,
       12,
       13,
       15,
       16,
       17,
       18,
       19,
       20,
       22,
       23,
       24,
       25,
       26,
       27,
       29,
       30
     ],