Table of contents
-
- Search methods
- Check methods
- Booking methods
- Info methods
Data export
- Methods
Table of contents
Data export
This is an old revision of the document!
Availability check. This method also returns a total price for all passengers.
all content types
searchData (array)
: search parameters. This parameter is optional but is preffered you use the same search parameters that you've used with trips method, because this will ensure that session won't expire, trip (array)
: trip parameters (you will get this info from trips method). Required params are (hsc
and toc
, also sid
when using trips
content type.headerData (array)
: SOAP Header InformationReturns availability status and total price for all passengers. If session hasn't expired then this method will also return offer and trip info.
Array ( [offerTripInfo] => Array ( [xmlReq] => [searchtermin_xmlReq] => [header] => Array ( [typ] => hotel [offers] => 1 [rgc] => [rgn] => 0 [rgg] => [rggn] => [pages] => 1 [perpage] => 20 [offset] => [sid] => 4u1u6nof70tngqqq3tgc0preo0 ) [offer] => Array ( [pic] => http://www.ors.si/giata-pics/71088//full.jpg [gid] => 71088 [htn] => Feral [stc] => 4.0 [ovr] => 0 [oid] => 23887 [hon] => Brna [fcts] => bea=1,ben=1,chf=0,clb=0,ani=0,pol=1,wel=0,spt=1,sgl=0,stn=0,ski=0 [dtemp] => [wtemp] => [rgc] => 659 [rgn] => Dalmatia [rgg] => 100023 [rggn] => Croatia [geo] => 1 [lat] => 42.9045823966052000 [lon] => 16.8566189525687980 ) [trip] => Array ( [sub] => catalog [gid] => 71088 [toc] => PALM [tockoda] => 80657677 [ton] => Palma [rgc] => 659 [oid] => 2288 [zac] => EC [zackoda] => 6967 [zan] => economy room [vpc] => AI [vpckoda] => 6573 [vpn] => all inclusive [od] => aid=,iid=,lid=,vid=,zid=palm_22411 [htc] => LEHRV5041414 [svc] => 22411 EC AI [ahckoda] => [vnd] => 2014-10-16 [bsd] => 2014-10-18 [tdc] => 2 [md5p] => 35a59b162e642f1df7c7c5664e46ffef [md5t] => 172984d5ecb727f81e54a2f5db03a100 [hsc] => 172984d5ecb727f81e54a2f5db03a100 [ppc] => 76 [alt] => 0 [top] => 0 [tocpic] => http://www.ors.si/ibe/ikonce/toc/palm.gif [aid] => [atx] => [iid] => [itx] => [lid] => [ltx] => [vid] => [vtx] => [zid] => palm_22411 [ztx] => 1/2 ECO AC; ALL LIGHT ) ) [xmlReq] => [xmlRes] => [response] => Array ( [mid] => 712 [ttp] => 152.00 [ttpd] => 0.00 [ppc] => 76.00 [ppct] => 1 [txt] => Reservation possible, insert B command [status] => 1 ) [offer] => Array ( [typ] => hotel [sub] => catalog [toc] => PALM [ton] => Palma [tocp] => http://www.ors.si/ibe/ikonce/toc/palm.gif [htc] => LEHRV504141486 [gid] => 71088 [hon] => KORÄULA [oid] => [desc] => [zac] => EC [zan] => economy room [vpc] => AI [vpn] => all inclusive [svc] => 22411 EC AI [stc] => [htn] => Hotel Feral 4* [zhc] => DBV [zhn] => Dubrovnik (Kroatien) [ahc] => [ahn] => [vnd] => 16.10.2014 [bsd] => 18.10.2014 [tdc] => 2 [sid] => [sin] => [idp] => [IDP] [ovr] => 0 [pic] => http://www.ors.si/giata-pics/71088/full.jpg ) [actions] => Array ( ) [extras] => Array ( [0] => Array ( [info] => Array ( [id] => 27104:9:1 [name] => POLPENZION [price] => 6.00 ) ) [1] => Array ( [info] => Array ( [id] => 27104:9:2 [name] => POLNI PENZION [price] => 13.00 ) ) [2] => Array ( [info] => Array ( [id] => 27104:9:3 [name] => KRAJŠE BIVANJE NA VPRAŠANJE [price] => 6.80 ) ) ) [operator] => Array ( [act] => BA [toc] => PALM [hsc] => 172984d5ecb727f81e54a2f5db03a100 [agt] => 454085 ) [travellers] => Array ( [0] => Array ( [id] => 1 [typ] => H [sur] => UDBBCSVN [pre] => LTULCFCH [tvp] => 76 [age] => ) [1] => Array ( [id] => 2 [typ] => H [sur] => JLEJAETI [pre] => FUVFXQCG [tvp] => 76 [age] => ) ) [included] => Array ( [0] => Array ( [group] => Array ( [code] => ExtracostOnPlace [description] => Dodatni stroški ) [items] => Array ( [0] => Array ( [code] => LT [name] => Turistična pristojbina [cost] => 1.00 [cost_type] => PER PERSON ) [1] => Array ( [code] => TW [name] => Brisače [cost] => 10.00 [cost_type] => PER PERSON ) [2] => Array ( [code] => BW [name] => Posteljnina ob prihodu [cost] => 10.00 [cost_type] => PER PERSON ) [3] => Array ( [code] => FC [name] => Končno čiščenje [cost] => 15.00 [cost_type] => PER PERSON ) [4] => Array ( [code] => EG [name] => Stroški elektrike [cost] => 35.00 [cost_type] => PER PERSON/WEEK ) [5] => Array ( [code] => DE [name] => Plačilo varščine z gotovino [cost] => 100.00 [cost_type] => PER ITEM ) ) ) ) [info] => Array ( [0] => Room type: 1/2 ECO AC; ALL LIGHT [1] => Hotel Feral 4* [2] => Code: LEHRV504141486 [3] => City: KORCULA [4] => Room: economy room [5] => Service: all inclusive [6] => Service code: 22411 EC AI [7] => CRS powered by ORS XTREME ) [exInfo] => Array ( ) [errorNr] => [error] => )
offerTripInfo
(array) : offer and trip info (check offertripinfo)xmlReq
: for internal use onlysearchtermin_xmlReq
: for internal use onlyheader (array)
: information about a selected region and paging information (check trips method for this return array)offer (array)
: check trips method for this return arraytrip (array)
: check trips method for this return arrayxmlReq
: ors xml request used with this methodxmlRes
: ors xml response used with this methodresponse (array)
: availability status, message and a total pricemid
: availability message ID (check Message IDs for a list of possible values)txt
: availability text message (message is in selected language and it depends on mid
value)status
: availability status. ttp
: total price for all passengersppc
: price per person (in situations when there is a price per room then this value will be empty or zero)ttpd
: this is a reserved parameter!ppct
: price type (0 - price per person, 1 - price per unit)offer (array)
: this are an offer information directly from touroperator. This values may differ from offerTripInfo
information!typ
: content typesub
: sub categorytoc
: touroperator codeton
: touroperator nametocp
: touroperator logohtc
: hotel code (or product code)gid
: accommodation GIATA IDhon
: city nameoid
: city IDdesc
: reserved parameterzac
: room type codezan
: room type namevpc
: service type codevpn
: service type namesvc
: service codehtn
: accommodation namestc
: hotel categoryzhc
: destination code (IATA code)zhn
: destination nameahc
: departure airport code (IATA code)ahn
: departure airport namevnd
: checkin datebsd
: checkout datetdc
: durationsid
: bus stop id (only for trips
content type)sin
: bus stop nameidp
: offer ID (use this to search extras
services that are in combination with accommodation)ovr
: overall ratingpic
: full pictureactions (array)
: promotions used with this offer. This is currently experimental because not all extras (array)
: extra surcharges that can be bookedinfo (array
: extras informationid
: extras idname
: extras nameprice
: extras priceoperator (array)
: used action, touroperator info and trip hash codeact
: actiontoc
: touroperator codehsc
: unique trip hash code used for this check method agt
: agency numbertravellers (array)
: passengers infoid
: passenger sequence numbertyp
: passenger sex / type. Possible values: sur
: last namepre
: first nameage
: age / birthdaytvp
: price for this personincluded
(array) : additional informatio about what is included in pricegroup
(array) : group informationcode
: group codedescription
: group description (in selected language)items
(array) : items in this groupcode
: item codename
: item name (in selected language)cost
: item costcost_type
: price type (PER PERSON, PER PERSON/WEEK, PER ITEM,…)info
: touroperator information text. This text is directly from selectged touroperator and can be in different language. Usually this text contains important information about checked offer.errorNr
: error numbererror
: error message$searchParams = array( 'vnd' => '30.10.2014', // start date 'bsd' => '15.11.2014', // end date 'tdc' => '1-4', // duration [min-max] days 'epc' => '2', // number of adults 'gid' => '71088', // selected hotel by GIATA ID ); $trip = array( 'hsc' => '172984d5ecb727f81e54a2f5db03a100', // unique trip hash code 'toc' => 'PALM' // toruoperator code ); // availability check $check = $soapClient->orsxml_hotel_api_call( 'check', $searchParams, $trip, $headerData ); // check availability status and total price if ($check['response']['status'] == 1) { echo "Offer is available. \n"; echo "Total price: " . $check['response']['ttp']; } if ($check['response']['status'] == 2) { echo "Offer is on request.\n"; echo "Total price: " . $register['check']['ttp']; } if ($check['response']['status'] == 0 || $check['response']['status'] == 4) { echo "Offer is not available"; } if ($check['response']['status'] == 3) { echo "Communication error. Please try again. \n"; echo "Touroperator message: " . $check['response']['txt']; } if ($check['response']['status'] == 5) { echo "Unable to check offer, Check touroperator message: " . $check['response']['txt']; }
Before making a check request with extras, you must fist make offers
request to get extras hash codes. Check offers on how to get different extras.
$searchParams
is a bit different. Accommodations and extras are entered as arrays. You can book different accommodations with more then one room (be careful that you place persons correctly). $searchParams = array( 'vnd' => '30.10.2014', // start date 'bsd' => '15.11.2014', // end date 'tdc' => '1-4', // duration [min-max] days 'epc' => '4', // number of adults // accommodations 'hotel' => array( // first accommodation '2262:4862:ZAD22627102:7102:OV:2014-08-16:2014-08-23' => array( // first room (for 1st and 2nd person) 0 => array( 'hsc' => '2262:4862:ZAD22627102:7102:OV:2014-08-16:2014-08-23', // offer hash code 'psn' => '1,2', // 1st and 2nd person ), // second room (for 3rd and 4th person) 1 => array( 'hsc' => '2262:4862:ZAD22627102:7102:OV:2014-08-16:2014-08-23', // offer hash code 'psn' => '3,4', // 3rd and 4th person ) ) ) // extras 'extras' => array( // 1st extras (for all persons) '199|0||0|2014-08-18|2014-08-18|2014-08-18' => array( 'hsc' => '199|0||0|2014-08-18|2014-08-18|2014-08-18', 'psn' => '1,2,3,4' ), // 2nd extras (for first two persons) '751|0||0|2014-08-18|2014-08-18|2014-08-18' => array( 'hsc' => '751|0||0|2014-08-18|2014-08-18|2014-08-18', 'psn' => '1,2' ) ), ); $trip = array( 'hsc' => 'x', // when booking packages, then just place 'x' for this parameter 'toc' => 'CMT' // touroperator code ); // check method $check = $soapClient->orsxml_hotel_api_call( 'check', $searchParams, $trip, $headerData );
* Example of check availability only extra services (without accommodation)
$searchParams = array( 'epc' => '2', // number of adults // extras 'extras' => array( // 1st extras (for all persons) '199|0||0|2014-08-18|2014-08-18|2014-08-18' => array( 'hsc' => '199|0||0|2014-08-18|2014-08-18|2014-08-18', 'psn' => '1,2' ), ), ); $trip = array( 'hsc' => 'x', // when booking packages, then just place 'x' for this parameter 'toc' => 'CMT' // touroperator code ); // check method (when using only extras, use 'extras' API call!!) $check = $soapClient->orsxml_extras_api_call( 'check', $searchParams, $trip, $headerData );