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!
Get a list of offers.
pauschal
hotel
trips
charter
is not supported!)oneway
is not supported!)extras
public array offers( array $searchData, array $headerData, array $topOffersFilter = array(), boolean $cleanUrl = true )
searchData (array)
: search parameters. Required serach parameters: vnd
, bsd
, epc
, tdc
headerData (array)
: SOAP Header InformationtopOffersFilter (array)
: top offers filter. Results that match this filter will be listed under array('top_offers' ⇒ …)
Example $topOffersFilter
:
array( 'toc' => 'FTI, 5VF', // tour operator must be FTI or 5VF 'stc' => 4 // hotel category must be 4 or grater )
cleanUrl (bool)
: TRUE returns clean friendly URLs.Returns a list of available offers. Here is an example of output:
Array ( [header] => Array ( [typ] => hotel [offers] => 138 [rgc] => 659 [rgn] => Dalmatia [rgg] => 100023 [rggn] => Croatia [pages] => 10 [perpage] => 15 [offset] => [sid] => b8hf8e9qene0lf8v46lujkokl2 ) [top_offers] => Array ( ) [offers] => Array ( [0] => Array ( [htn] => Feral [gid] => 71088 [pic] => http://www.ors.si/giata-pics/71088//thumb.jpg [hon] => Brna [zhn] => Dalmacija (HrvaĹĄka) [zhc] => 4CR,DBV [oid] => 23887 [stc] => 4.0 [ovr] => 100 [emf] => 80 [cnt] => 3 [pax] => št. oseb [rooms] => 1 [bedrooms] => 1 [ppc] => 27.00 [tdc] => 1 [rgc] => 659 [rgn] => Dalmatia [rgg] => 100023 [rggn] => Croatia [picf] => http://www.ors.si/giata-pics/71088//full.jpg [geo] => 1 [lat] => 42.9045823966052000 [lon] => 16.8566189525687980 [url] => croatia/brna/feral/100023/659/71088/?epc=2&vnd=1&bsd=300&toc=&tdc=1-7&rgc=659&sel[gid]=71088 [vpcs] => Array ( [HP] => half board [AI] => all inclusive [UF] => bed & breakfast ) [zacs] => Array ( [DZ] => double room [EC] => economy room ) [tocs] => Array ( [TERR] => Terra Reisen [PALM] => Palma ) [facts] => Array ( [bea] => Array ( [code] => bea [value] => bea [status] => 1 ) [pol] => Array ( [code] => pol [value] => pol [status] => 1 [ski] => Array ( [code] => ski [value] => ski [status] => 0 ) ) ) ... [filters] => Array ( [toc] => Array ( [selected] => 0 [val] => Array ( [PALM] => Palma [TERR] => Terra Reisen ) ) [zac] => Array ( [selected] => 0 [val] => Array ( [AP] => apartment [DZ] => double room [FZ] => family room ) ) [vpc] => Array ( [selected] => 0 [val] => Array ( [UF] => bed & breakfast [HP] => half board ) ) [stc] => Array ( [selected] => 0 [val] => Array ( [0.0] => 0.0 [3.0] => 3.0 [4.0] => 4.0 ) ) [ovr] => Array ( [selected] => 0 ) [oid] => Array ( [selected] => 0 [val] => Array ( [573] => Bled ) ) [ppc] => Array ( [selected] => 0 [val] => Array ( [00] => 00 [112] => 112 ) ) ) [sorts] => Array ( [htn] => 0 [hon] => 0 [stc] => 0 [ovr] => 0 [gid] => 0 [emf] => 0 [ppc] => asc ) ...
When searching for extras
you'll get different return values.
Array ( [header] => Array ( [typ] => extras [offers] => 1 [pages] => 1 [page] => 1 [sid] => esnme76mer643ssgokmob3d8j3 ) [offers] => Array ( [0] => Array ( [id] => 199 [ide] => 199 [opt] => 0 [time] => [opt_name] => [etype] => 1 [etype2] => 0 [transfer] => 0 [fzhc] => [foid] => [tzhc] => [toid] => [fzhn] => [fhon] => [tzhn] => [thon] => [calc_in_ttp] => [htn] => Sonus Festival Ticket [description] => 18.08.-22.08.2014 [vnd] => 2014-08-18 [bsd] => 2014-08-22 [extras_dates] => [ton] => CMT d.o.o. [ido] => 23 [thumb_pic] => http://www.ors.si/sellitx/phps/sellit/showPic.php?type=extraspic&picname=&rnd=493807 [ppc] => 139 [hsc] => 199|0||0|2014-08-18|2014-08-22| [url] => ?vnd=18.08.2014&bsd=22.08.2014&tag=sonus%2Cfestivalticket&epc=2&toc=CMT&sel[gid]= [options] => Array ( [0] => Array ( [id] => 0 [name] => default [oid] => [zhc] => [hon] => [zhn] => [ppc] => 695 [ttp] => 1390 [stock] => -1 [hsc] => 199|0||0|2014-08-18|2014-08-22| [rates] => Array ( [2014-08-18] => Array ( [datum] => 2014-08-18 [ppc] => 139 [hsc] => 199|0||0|2014-08-18|2014-08-18|2014-08-18 ) [2014-08-19] => Array ( [datum] => 2014-08-19 [ppc] => 139 [hsc] => 199|0||0|2014-08-19|2014-08-19|2014-08-19 ) [2014-08-20] => Array ( [datum] => 2014-08-20 [ppc] => 139 [hsc] => 199|0||0|2014-08-20|2014-08-20|2014-08-20 ) [2014-08-21] => Array ( [datum] => 2014-08-21 [ppc] => 139 [hsc] => 199|0||0|2014-08-21|2014-08-21|2014-08-21 ) [2014-08-22] => Array ( [datum] => 2014-08-22 [ppc] => 139 [hsc] => 199|0||0|2014-08-22|2014-08-22|2014-08-22 ) ) ) ) ) )
header
(array) : information about a selected region and paging informationtyp
: content typeoffers
: number of offers foundpages
: number of pagesperpage
: records per pageoffset
: current page (first page have offset 0, second page have offset 1, …)sid
: session id usedrgc
: selected region code (ID)rgn
: selected region namergg
: selected region group code (ID)rggn
: selected region group nametop_offers (array)
: a list of top offfers (this list depends on a filter $topOffersFilter
, if this filter is not set then this array is empty.offers (array)
: a list of offershtn
: accommodation namegid
: accommodation GIATA IDpic
: picture thumbnailstc
: hotel categoryovr
: overall ratingemf
: users recommendation (in percents)cnt
: number of reviewerspax
: number of personsrooms
: number of roomsbedrooms
: number of bedroomshon
: city nameoid
: city IDzhn
: destination namezhc
: destination code (IATA code)rgc
: region code (ID)rgn
: region namergg
: region group IDrggn
: region group namepicf
: full picturegeo
: does this accommodatin have a geo location codes (1) or not (0)lat
: latitudelon
: longitudeppc
: lowest price per person for this regionurl
: a suggested URL with search parameters for trips methodvpcs (array)
: a list of all services that this accommodation offerszacs (array)
: a list of all room types that this accommodation offerstocs (array)
: a list of all touroperators that sels this accommodationfacts (array)
: a list of all facts that this accommodation offers. Here is an entire list of facts available in ORS.filters (array)
: all possible filterstoc (array)
: filters by touroperatorsselected
: (0) if this filter is not selected, (1) if this filter is selectedval (array)
: a list of values you can use for this filterzac
: filters by room typesvpc
: filters by service typesstc
: filters by hotel categoryovr
: filters by overall ratingoid
: filters by city IDppc
: filters by price per personsorts (array)
: possible sortinghtn
: sort by hotel namehon
: sort by citystc
: sort by hotel categoryovr
: sort by ratingppc
: sort by price (default sorting)
Here is a list of return parameters when searching for content type extras
header (array)
: header infooffers (array)
: a list of offersid
: extras IDide
: extras ID (same as id
)opt
: option ID. Some extras have different options / variants. This is also a key in offers[0][options] (array)
, In simple extras like tickets, massage, … there is only one option and it has value 0.opt_name
: option name. For simple extras this is empty.time
: extras time (arrival time / checkin time). Some extras have different checkin time. Format: 'H:i:s'. For simple extras this is empty.etype
: extras inventory type. etype2
: extras tyoetransfer
: (1) means this is a transfer from point Airport to city (or from City to Airport). (0) means this is not a transfer.fzhc
: (only when transfer
= 1), from Airport codetzhc
: (only when transfer
= 1), to Airport codefoid
: (only when transfer
= 1), from City IDtoid
: (only when transfer
= 1), to City IDfzhn
: (only when transfer
= 1), from Airport nametzhn
: (only when transfer
= 1), to Airport namefhon
: (only when transfer
= 1), from City namethon
: (only when transfer
= 1), to City namecalc_in_ttp
: (1) price is included in the package, (0) price is not included in package. When price is included in package, then this extras price is usually 0.htn
: extras name / titledescription
: extras descriptionvnd
: start datebsd
: end dateextras_dates
: selected datesthumb_pic
: picture thumbnailppc
: price per personhsc
: unique hash code for this extras (use this code for booking)url
: experimental !options (array)
: different options / variants.id
: option IDname
: option name (when ID is 0 then option name is 'default')ppc
: price per person for this optionttp
: total price for all personsstock
: available stock for this option (if etype == 1
and stock == -1
then stock is unlimited)hsc
: unique hash code for this optionrates (array)
: price rates for each selected date#date
: key for each rate is a date in format: 'Y-m-d'datum
: dateppc
: price per personhsc
: unique hash code for this option/date$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 'rgcs' => '100023', // region code for entire Coratia ); $offers = $soapClient->orsxml_hotel_api_call( 'offers', $searchParams, $header );
$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 'hon' => 'bled' // city ); $offers = $soapClient->orsxml_hotel_api_call( 'offers', $searchParams, $header );
// filter offers using single filter $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 'rgcs' => '100023', // region code for entire Coratia 'filter' => array( 'zac' => 'DZ' // filter by room type (display only double rooms) ) ); $offers = $soapClient->orsxml_hotel_api_call( 'offers', $searchParams, $header ); // filter offers using more then one filters $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 'rgcs' => '100023', // region code for entire Coratia 'filter' => array( 'zac' => 'DZ', // filter by room type (display only double rooms) 'vpc' => 'AI,HP' // filter by service type (display only all inclusive and halfboard offers) ) ); $offers = $soapClient->orsxml_hotel_api_call( 'offers', $searchParams, $header );
// sort by hotel name (ascending order) $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 'rgcs' => '100023', // region code for entire Coratia 'sort' => 'htn|asc' // sort by hotel name in ascending order ); $offers = $soapClient->orsxml_hotel_api_call( 'offers', $searchParams, $header ); // sort by price (descending order) $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 'rgcs' => '100023', // region code for entire Coratia 'sort' => 'ppc|desc' // sort by price in descending order ); $offers = $soapClient->orsxml_hotel_api_call( 'offers', $searchParams, $header );
// return 4th page $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 'rgcs' => '100023', // region code for entire Coratia 'offset' => '3' // display 4th page (offset 0 returns 1st page) ); $offers = $soapClient->orsxml_hotel_api_call( 'offers', $searchParams, $header );
Searching for extras is a bit different.
// you must speficy one date (usually this is a checkin date if extras is used in combination with accommodation) $searchParams = array( 'vnd' => '30.10.2014', // start date 'bsd' => '30.10.2014', // end date 'tag' => 'ticket', // using tag 'ticket' (tags are defined by owner of extras) 'epc' => '2', // number of adults 'toc' => 'ABC' // touroperator code ); $offers = $soapClient->orsxml_extras_api_call( 'offers', $searchParams, $header );
// search for simple extras with times $searchParams = array( 'vnd' => '30.10.2014', // start date 'bsd' => '30.10.2014', // end date 'time' => '10:00:00', // arrival time (H:i:s) 'tag' => 'bus', // using tag 'ticket' (tags are defined by owner of extras) 'epc' => '2', // number of adults 'toc' => 'ABC' // touroperator code ); $offers = $soapClient->orsxml_extras_api_call( 'offers', $searchParams, $header );
// search for inbound transfer $searchParams = array( 'vnd' => '30.10.2014', // start date 'bsd' => '30.10.2014', // end date 'epc' => '2', // number of adults 'transfer' => '1', // search for transfer 'foid' => '12225', // from City ID 'tzhc' => 'SPU', // to airport (IATA code) 'toc' => 'ABC' // touroperator code ); $inbound_offers = $soapClient->orsxml_extras_api_call( 'offers', $searchParams, $header ); // search for outbound transfer $searchParams = array( 'vnd' => '30.10.2014', // start date 'bsd' => '30.10.2014', // end date 'epc' => '2', // number of adults 'transfer' => '1', // search for transfer 'fzhc' => 'ZAG', // from airport (IATA code) 'toid' => '12225', // to City ID 'toc' => 'ABC' // touroperator code ); $outbound_offers = $soapClient->orsxml_extras_api_call( 'offers', $searchParams, $header );
$searchParams = array( 'vnd' => '30.10.2014', // start date 'bsd' => '30.10.2014', // end date 'epc' => '2', // number of adults 'idp' => '1005', // offer ID. This ID is located in 'Check method' response. Without this ID you won't get packaged extras 'toc' => 'ABC' // touroperator code ); $offers = $soapClient->orsxml_extras_api_call( 'offers', $searchParams, $header );