User Tools

Site Tools


ors-soap-api:public:offersdetails

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ors-soap-api:public:offersdetails [2015/01/24 16:40]
ors-soap-api:public:offersdetails [2015/01/24 16:40] (current)
Line 1: Line 1:
 +====== Offer details method ======
 +
 +Get a detailed list of offers. Only supported by ''​trips''​ content type at the moment!
 +
 +===== Valid content types =====
 +
 +
 +  * (''​pauschal''​ **is not supported!**)
 +  * (''​hotel''​ **is not supported!**)
 +  * ''​trips''​
 +  * (''​charter''​ **is not supported!**)
 +  * (''​oneway''​ **is not supported!**)
 +  * (''​extras''​ **is not supported!**)
 +
 +===== Description =====
 +
 +<code php>
 +public array offersDetails( array $searchData,​ array $headerData,​ array $topOffersFilter = array(), boolean $cleanUrl = true )
 +</​code>​
 +
 +===== Parameters =====
 +
 +  * ''​searchData (array)''​ : search parameters. Required serach parameters: ''​vnd'',​ ''​bsd'',​ ''​epc'',​ ''​tdc''​
 +  * ''​headerData (array)''​ : [[soap_header|SOAP Header Information]]
 +  * ''​topOffersFilter (array)''​ : top offers filter. Results that match this filter will be listed under array('​top_offers'​ => ...)
 +
 +Example ''​$topOffersFilter'':​
 +
 +<code php>
 +array(
 +    '​toc'​ => 'FTI, 5VF', ​   // tour operator must be FTI or 5VF
 +)
 +</​code>​
 +
 +  * ''​cleanUrl (bool)''​ : TRUE returns clean friendly URLs.
 +
 +===== Return Values =====
 +
 +Returns a detailed list of available offers. Here is an example of output:
 +
 +<​code>​
 +Array
 +(
 +    [header] => Array
 +        (
 +            [typ] => trips
 +            [offers] => 324
 +            [rgc] => 
 +            [rgn] => 0
 +            [rgg] => 
 +            [rggn] => 
 +            [pages] => 22
 +            [perpage] => 15
 +            [offset] => 
 +            [sid] => kk1uj2u6jt577920frneg0bsj7
 +        )
 +
 +    [top_offers] => Array
 +        (
 +        )
 +
 +    [offers] => Array
 +        (
 +            [0] => Array
 +                (
 +                    [sub] => trip
 +                    [subin] => bus
 +                    [subout] => bus
 +                    [htn] => Aquapark Istralandia
 +                    [gid] => 2222016332731
 +                    [pic] => http://​www.ors.si/​giata-pics2/​2222016332731/​PALM/​thumb.jpg
 +                    [toc] => PALM
 +                    [rgc] => 1108
 +                    [rgn] => Hrvaška - Istra
 +                    [ppc] => 21
 +                    [status] => 
 +                    [ton] => Palma
 +                    [picf] => http://​www.ors.si/​giata-pics2/​2222016332731/​PALM/​full.jpg
 +                    [rggn] => 
 +                    [url] => //​aquapark-istralandia//​1108/​2222016332731/?​alias=ponudbe%2Fpotovanja-izleti%2F&​search=&​gid=&​hon=&​epc=2&​ka1=&​ka2=&​ka3=&​vnd=20.08.2014&​bsd=20.01.2015&​tdc=1-10&​htn=&​toc=PALM%2CPHPL&​typ=trips&​pv=1&​izpis=1&​sel[gid]=2222016332731
 +                    [tdcs] => Array
 +                        (
 +                            [1] => 1
 +                        )
 +
 +                    [sids] => Array
 +                        (
 +                            [6000] => Koper - Capodistria ​
 +                        )
 +
 +                    [vnds] => Array
 +                        (
 +                            [20140823] => 23.08.2014
 +                            [20140827] => 27.08.2014
 +                            [20140830] => 30.08.2014
 +                            [20140906] => 06.09.2014
 +                            [20140913] => 13.09.2014
 +                            [20140920] => 20.09.2014
 +                        )
 +
 +                    [rgcs] => Array
 +                        (
 +                            [1108] => Hrvaška - Istra
 +                        )
 +
 +                    [rgns] => Array
 +                        (
 +                            [100023] => Hrvaška
 +                        )
 +
 +                )
 +
 +            [1] => Array
 +                (
 +                    [sub] => trip
 +                    [subin] => bus
 +                    [subout] => bus
 +                    [htn] => Čokolada in Gradec
 +                    [gid] => 2222512777901
 +                    [pic] => http://​www.ors.si/​giata-pics/​2222512777901/​PALM/​thumb.jpg
 +                    [toc] => PALM
 +                    [rgc] => 9994001
 +                    [rgn] => ostala ponudba
 +                    [ppc] => 24
 +                    [status] => 
 +                    [ton] => Palma
 +                    [picf] => http://​www.ors.si/​giata-pics/​2222512777901/​PALM/​full.jpg
 +                    [rggn] => 
 +                    [url] => //​cokolada-in-gradec//​9994001/​2222512777901/?​alias=ponudbe%2Fpotovanja-izleti%2F&​search=&​gid=&​hon=&​epc=2&​ka1=&​ka2=&​ka3=&​vnd=20.08.2014&​bsd=20.01.2015&​tdc=1-10&​htn=&​toc=PALM%2CPHPL&​typ=trips&​pv=1&​izpis=1&​sel[gid]=2222512777901
 +                    [tdcs] => Array
 +                        (
 +                            [1] => 1
 +                        )
 +
 +                    [sids] => Array
 +                        (
 +                            [program] => Po programu
 +                        )
 +
 +                    [vnds] => Array
 +                        (
 +                            [20140913] => 13.09.2014
 +                            [20140927] => 27.09.2014
 +                            [20141011] => 11.10.2014
 +                            [20141025] => 25.10.2014
 +                            [20141031] => 31.10.2014
 +                            [20141101] => 01.11.2014
 +                        )
 +
 +                    [rgcs] => Array
 +                        (
 +                            [9994001] => ostala ponudba
 +                        )
 +
 +                    [rgns] => Array
 +                        (
 +                            [572] => Avstrija
 +                        )
 +
 +                )
 +
 +            [2] => Array
 +                (
 +                    [sub] => trip
 +                    [subin] => bus
 +                    [subout] => bus
 +                    [htn] => Celovec,​Minimundus in Reptilarij
 +                    [gid] => 2229045454
 +                    [pic] => http://​www.ors.si/​giata-pics/​2229045454/​PALM/​thumb.jpg
 +                    [toc] => PALM
 +                    [rgc] => 495
 +                    [rgn] => Koroška
 +                    [ppc] => 25
 +                    [status] => 
 +                    [ton] => Palma
 +                    [picf] => http://​www.ors.si/​giata-pics/​2229045454/​PALM/​full.jpg
 +                    [rggn] => 
 +                    [url] => //​celovec-minimundus-in-reptilarij//​495/​2229045454/?​alias=ponudbe%2Fpotovanja-izleti%2F&​search=&​gid=&​hon=&​epc=2&​ka1=&​ka2=&​ka3=&​vnd=20.08.2014&​bsd=20.01.2015&​tdc=1-10&​htn=&​toc=PALM%2CPHPL&​typ=trips&​pv=1&​izpis=1&​sel[gid]=2229045454
 +                    [tdcs] => Array
 +                        (
 +                            [1] => 1
 +                        )
 +
 +                    [sids] => Array
 +                        (
 +                            [1000] => Ljubljana
 +                            [3000] => Celje 
 +                        )
 +
 +                    [vnds] => Array
 +                        (
 +                            [20140913] => 13.09.2014
 +                            [20140927] => 27.09.2014
 +                            [20141025] => 25.10.2014
 +                            [20141031] => 31.10.2014
 +                            [20141102] => 02.11.2014
 +                        )
 +
 +                    [rgcs] => Array
 +                        (
 +                            [495] => Koroška
 +                        )
 +
 +                    [rgns] => Array
 +                        (
 +                            [572] => Avstrija
 +                        )
 +
 +                )
 +    [filters] => Array
 +        (
 +            [toc] => Array
 +                (
 +                    [selected] => 0
 +                    [val] => Array
 +                        (
 +                            [PALM] => Palma
 +                        )
 +
 +                )
 +
 +            [tdc] => Array
 +                (
 +                    [selected] => 0
 +                    [val] => Array
 +                        (
 +                            [1] => 1
 +                            [2] => 2
 +                            [3] => 3
 +                            [4] => 4
 +                            [5] => 5
 +                            [6] => 6
 +                            [7] => 7
 +                            [8] => 8
 +                            [9] => 9
 +                            [10] => 10
 +                        )
 +
 +                )
 +
 +            [rgc] => Array
 +                (
 +                    [selected] => 0
 +                    [val] => Array
 +                        (
 +                            [930300] => Albanija
 +                            [591] => Andaluzija
 +                            [930400] => Anglija
 +                            [454] => Argentina
 +                            [990003] => Armenija
 +                            [999993] => Azerbejžan
 +                            [100144] => Balaton
 +                            [99912300] => Baltske države
 +                            [100027] => Barcelona z okolico
 +                            [615] => Bavarska
 +                            [175] => Belgija
 +                            [100100] => Belgija - Bruselj z okolico
 +                            [999003] => Benelux
 +                            [437] => Benetke
 +                            [619] => Berlin
 +                            [499] => Bern & Berner Oberland
 +                            [100359] => Bolgarija
 +                            [911] => Bosna in Hercegovina
 +                            [12] => Brazilija
 +                            [100145] => Budimpešta z okolico
 +                            [100033] => Campania / Amalfi (obala)
 +                            [250] => Centralna Švica
 +                            [637] => Ciper, sever (turški del)
 +                            [999900] => Danska
 +                            [160] => Dubaj
 +                            [701] => Dunaj z okolico
 +                            [800000] => Finska
 +                            [100120] => Finska - Helsinki z okolico
 +                            [128] => Gran Canaria
 +                            [990002] => Gruzija
 +                            [659] => Hrvaška - Dalmacija
 +                            [1108] => Hrvaška - Istra
 +                            [9990005] => Hrvaška - Jadran
 +                            [100342] => Hrvaška - križarjenja
 +                            [1109] => Hrvaška - notranjost
 +                            [560] => Hurghada & Safaga
 +                            [317] => Indija (ostala ponudba)
 +                            [100323] => Indija - krožna potovanja
 +                            [940300] => Iran
 +                            [204] => Irska (ostala ponudba)
 +                            [296] => Islandija
 +                            [147] => Istanbul z okolico
 +                            [100299] => Italija - krožna potovanja
 +                            [9990008] => Italija - zabaviščni parki
 +                            [74] => Izrael
 +                            [100330] => Japonska - krožna potovanja
 +                            [100192] => Jordanija - Amman
 +                            [960] => Kappadokija
 +                            [940700] => Kefalonija
 +                            [100199] => Kitajska - Peking z okolico
 +                            [1170] => Kitajska - južna obala
 +                            [9990021] => Kitajska - krožna potovanja
 +                            [495] => Koroška
 +                            [505] => Korzika
 +                            [100244] => Križarjenja po Nilu
 +                            [940500] => Lefkas
 +                            [652] => Lizbona z okolico
 +                            [100111] => London z okolico
 +                            [214] => Luksemburg
 +                            [935] => Madrid z okolico
 +                            [234] => Madžarska (ostala ponudba)
 +                            [833] => Makedonija & Trakija
 +                            [675] => Malezija - Kuala Lumpur
 +                            [667] => Malezija - Pahang
 +                            [100035] => Malta
 +                            [100054] => Maroko - Marakeš
 +                            [100250] => Maroko - krožna potovanja
 +                            [106] => Mehika (ostala ponudba)
 +                            [100143] => Mosel-Saar Region
 +                            [1036] => Neapelski zaliv
 +                            [9990017] => Nemčija (ostala ponudba)
 +                            [100363] => Nemški parki (zabavni, prosti čas)
 +                            [100259] => New York & New Jersey
 +                            [202] => Nizozemska
 +                            [100101] => Nizozemska - Amsterdam z okolico
 +                            [100105] => Nizozemska - jug
 +                            [754] => Normandija
 +                            [930100] => Norveška
 +                            [100096] => Pariz z okolico
 +                            [100151] => Poljska
 +                            [9997009] => Portugalska
 +                            [752] => Provansa
 +                            [434] => Rhein-Main Region
 +                            [9990006] => Rim in Južna Italija
 +                            [1164] => Rio de Janeiro z okolico
 +                            [657] => Romunija
 +                            [1000001] => Rusija (ostala ponudba)
 +                            [1186] => Rusija - Moskva z obročem
 +                            [627] => Sachsen
 +                            [492] => Salzburško
 +                            [83] => Sardinija
 +                            [9990007] => Severna in osrednja Italija
 +                            [999995] => Severna Španija
 +                            [84] => Sicilija
 +                            [481] => Slovaška
 +                            [1051] => Srbija
 +                            [585] => Ukrajina
 +                            [990001] => Uzbekistan
 +                            [500] => Vzhodna Švica
 +                            [71] => Zakintos
 +                            [100085] => južna mesta
 +                            [100247] => krožna potovanja
 +                            [9994001] => ostala ponudba
 +                            [9990004] => ostala ponudba (Francija)
 +                            [9996001] => ostala ponudba (Grška celina)
 +                            [100152] => ostala ponudba (Slovenija)
 +                            [999800] => ostala ponudba (Turčija)
 +                            [999501] => ostala ponudba (Španija)
 +                            [100083] => vzhodna mesta
 +                            [100084] => zahodna mesta
 +                            [232] => Češka
 +                            [100141] => Češka - Praga z okolico
 +                            [1052] => Črna gora
 +                            [800] => Škotska
 +                            [136] => Šri Lanka
 +                            [100312] => Šri Lanka - krožna potovanja
 +                            [100125] => Švedska - Stockholm z okolico
 +                            [100124] => Švedska - jug
 +                        )
 +
 +                )
 +
 +            [rgn] => Array
 +                (
 +                    [selected] => 0
 +                    [val] => Array
 +                        (
 +                            [572] => Avstrija
 +                            [100020] => Azija
 +                            [100093] => Baltik
 +                            [100012] => Benelux
 +                            [100014] => Bližnji vzhod
 +                            [743] => Bolgarija
 +                            [632] => Ciper
 +                            [100087] => Danska
 +                            [651] => Egipt
 +                            [634] => Francija
 +                            [745] => Grčija (celina)
 +                            [100002] => Grčija (otoki)
 +                            [100023] => Hrvaška
 +                            [100383] => Indija, Šri Lanka
 +                            [100016] => Indijski ocean
 +                            [999912] => Iran
 +                            [100007] => Italija
 +                            [999800] => Jordanija
 +                            [100094] => Jugovzhodna Evropa
 +                            [100019] => Južna Amerika
 +                            [851] => Kanarski otoki (Španija)
 +                            [999200] => Madžarska
 +                            [9999100] => Makedonija
 +                            [100431] => Malta
 +                            [100388] => Maroko
 +                            [100218] => Mehika
 +                            [100006] => Nemčija (jug)
 +                            [100005] => Nemčija (vzhod)
 +                            [100004] => Nemčija (zahod)
 +                            [100086] => Nemški parki (zabavni, prosti čas)
 +                            [725] => Portugalska
 +                            [999600] => Rusija, Belorusija
 +                            [100170] => Severni Atlantik
 +                            [100116] => Skandinavija
 +                            [999904] => Slovaška
 +                            [999001] => Srbija
 +                            [724] => Turčija
 +                            [100010] => Velika Britanija, Irska
 +                            [100009] => Vzhodna Evropa
 +                            [100147] => ZDA - mesta ob vzhodni obali
 +                            [650] => Združeni Arabski Emirati
 +                            [999903] => Češka
 +                            [999100] => Črna Gora
 +                            [119] => Španska celina
 +                            [744] => Švica
 +                        )
 +
 +                )
 +
 +            [sub] => Array
 +                (
 +                    [selected] => 0
 +                    [val] => Array
 +                        (
 +                            [busplane] => busplane
 +                            [busplaneship] => busplaneship
 +                            [cruise] => cruise
 +                            [lastmin] => lastmin
 +                            [plane] => plane
 +                            [train] => train
 +                            [trip] => trip
 +                        )
 +
 +                )
 +
 +            [ppc] => Array
 +                (
 +                    [selected] => 0
 +                    [val] => Array
 +                        (
 +                            [21] => 21
 +                            [2999] => 2999
 +                        )
 +
 +                )
 +
 +        )
 +
 +    [sorts] => Array
 +        (
 +            [htn] => 0
 +            [ppc] => asc
 +        )
 +
 +    [xmlReq] => 
 +)
 +...
 +</​code>​
 +
 +
 +
 +===== Return parameters =====
 +
 +  * ''​header''​ (array) : information about a selected region and paging information
 +    * ''​typ''​ : content type
 +    * ''​offers''​ : number of offers found
 +    * ''​pages''​ : number of pages
 +    * ''​perpage''​ : records per page
 +    * ''​offset''​ : current page (first page have offset 0, second page have offset 1, ...)
 +    * ''​sid''​ : session id used
 +    * ''​rgc''​ : selected region code (ID)
 +    * ''​rgn''​ : selected region name
 +    * ''​rgg''​ : selected region group code (ID)
 +    * ''​rggn''​ : selected region group name
 +  * ''​top_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 offers
 +    * ''​sub''​ : trip sub category (depending on transport combination)
 +      * **busplane** : bus + plane
 +      * **busplaneship** : bus + plane + ship
 +      * **cruise** : only ship
 +      * **lastmin** : lastminute offer
 +      * **plane** : only plane
 +      * **train** : transport via train
 +      * **trip** : ordinary bus trip
 +    * ''​subin''​ & ''​subout''​ : transport to and from the destination. Possible values ('​bus',​ '​plane',​ '​ship'​)
 +    * ''​htn''​ : accommodation name
 +    * ''​gid''​ : accommodation GIATA ID
 +    * ''​pic''​ : picture thumbnail
 +    * ''​toc''​ : touroperator code
 +    * ''​rgc''​ : region code (ID)
 +    * ''​rgn''​ : region name
 +    * ''​picf''​ : full picture
 +    * ''​ppc''​ : lowest price per person for this region
 +    * ''​url''​ : a suggested URL with search parameters for [[trips|trips method]]
 +    * ''​status''​ : reserved parameter
 +    * ''​tdcs (array)''​ : a list of possible durations (usually is only one possible duration per trip)
 +    * ''​sids (array)''​ : a list of possible entry points (every trips has at least one entry point)
 +    * ''​vnds (array)''​ : a list of possible trip dates
 +    * ''​rgcs (array)''​ : a list of regions through which trip is going
 +    * ''​rgns (array)''​ : a list of region groups through which trip is going
 +  * ''​filters (array)''​ : all possible filters
 +    * ''​toc (array)''​ : filters by touroperators
 +      * ''​selected''​ : (0) if this filter is not selected, (1) if this filter is selected
 +      * ''​val (array)''​ : a list of values you can use for this filter
 +    * ''​tdc''​ : filters by duration
 +    * ''​rgc''​ : filters by region
 +    * ''​rgn''​ : filters by region group
 +    * ''​sub''​ : filters by trip sub category
 +    * ''​ppc''​ : filters by price per person
 +  * ''​sorts (array)''​ : possible sorting
 +    * ''​htn''​ : sort by hotel name
 +    * ''​ppc''​ : sort by price (default sorting)
 +
 +
 +===== Examples =====
 +
 +  * Example with basic search parameters
 +
 +<code php>
 +$searchParams = array(
 +  '​vnd'​ => '​30.10.2014', ​      // start date
 +  '​bsd'​ => '​15.11.2014', ​      // end date
 +  '​tdc'​ => '​1-32', ​            // duration [min-max] days
 +  '​epc'​ => '​2', ​               // number of adults
 +);
 +
 +$offers = $soapClient->​orsxml_trips_api_call( '​offersDetails',​ $searchParams,​ $header );
 +</​code>​
 +
 +  * Example using filters
 +
 +<code php>
 +// filter offers using single filter
 +$searchParams = array(
 +  '​vnd'​ => '​30.10.2014', ​      // start date
 +  '​bsd'​ => '​15.11.2014', ​      // end date
 +  '​tdc'​ => '​1-23', ​            // duration [min-max] days
 +  '​epc'​ => '​2', ​               // number of adults
 +  '​filter'​ => array(
 +      '​sub'​ => '​busplane' ​     // filter by sub category (bus + plane)
 +   )
 +);
 +
 +$offers = $soapClient->​orsxml_trips_api_call( '​offersDetails',​ $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-32', ​            // duration [min-max] days
 +  '​epc'​ => '​2', ​               // number of adults
 +  '​filter'​ => array(
 +      '​sub'​ => '​busplane', ​    // filter by sub category (bus + plane)
 +      '​rgn'​ => '​572' ​          // filter by region group (Austria)
 +   )
 +);
 +
 +$offers = $soapClient->​orsxml_trips_api_call( '​offersDetails',​ $searchParams,​ $header );
 +</​code>​
 +
 +  * Example using sorting
 +
 +<code php>
 +// sort by trip name (ascending order)
 +$searchParams = array(
 +  '​vnd'​ => '​30.10.2014', ​      // start date
 +  '​bsd'​ => '​15.11.2014', ​      // end date
 +  '​tdc'​ => '​1-32', ​             // duration [min-max] days
 +  '​epc'​ => '​2', ​               // number of adults
 +  '​sort'​ => '​htn|asc' ​         // sort by hotel name in ascending order
 +);
 +
 +$offers = $soapClient->​orsxml_trips_api_call( '​offersDetails',​ $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
 +  '​sort'​ => '​ppc|desc' ​         // sort by price in descending order
 +);
 +
 +$offers = $soapClient->​orsxml_trips_api_call( '​offersDetails',​ $searchParams,​ $header );
 +</​code>​
 +
 +  * Example using paging
 +
 +<code php>
 +// 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
 +  '​offset'​ => '​3' ​             // display 4th page (offset 0 returns 1st page)
 +);
 +
 +$offers = $soapClient->​orsxml_trips_api_call( '​offersDetails',​ $searchParams,​ $header );
 +</​code>​
 +
  
ors-soap-api/public/offersdetails.txt · Last modified: 2015/01/24 16:40 (external edit)