This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| ors-soap-api:public:option_check [2015/01/24 18:41] admin removed | — (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Option Info method ====== | ||
| - | |||
| - | This method checks if option (free cancellation) is possible.  | ||
| - | |||
| - | ===== Valid content types ===== | ||
| - | |||
| - | * valid for ''all content types'' | ||
| - | |||
| - | ===== Description ===== | ||
| - | |||
| - | <code php> | ||
| - | public array option_check( array $searchData, array $trip, array $headerData ) | ||
| - | </code> | ||
| - | |||
| - | |||
| - | ===== Parameters ===== | ||
| - | |||
| - | * ''searchData (array)'' : search parameters. This parameter is optional but is preffered you use the same search parameters that you've used with [[ors-soap-api:public:trips|trips method]], because this will ensure that session won't expire,  | ||
| - | * ''trip (array)'' : trip parameters (you will get this info from [[trips|trips method]]). Required params are (''hsc'' and ''toc'', also ''sid'' when using ''trips'' content type. | ||
| - | * ''headerData (array)'' : [[ors-soap-api:public:soap_header|SOAP Header Information]] | ||
| - | |||
| - | ===== Return Values ===== | ||
| - | |||
| - | Returns availability status and total price for all passengers. If session hasn't expired then this method will also return offer and trip info. | ||
| - | |||
| - | <code> | ||
| - | 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] => 740 | ||
| - | [ttp] => 152.00 | ||
| - | [ttpd] => 0.00 | ||
| - | [ppc] => 76.00 | ||
| - | [txt] => Option is possible | ||
| - | [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 | ||
| - | [opts] => 1 | ||
| - | [optq] => 1 | ||
| - | [optd] => 2015-01-23 23:59:59 | ||
| - | ) | ||
| - | |||
| - | [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] => | ||
| - | ) | ||
| - | |||
| - | ) | ||
| - | |||
| - | [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] => | ||
| - | ) | ||
| - | </code> | ||
| - | |||
| - | ===== Return parameters ===== | ||
| - | |||
| - | * ''offerTripInfo'' (array) : offer and trip info (check [[offertripinfo|offertripinfo]]) | ||
| - | * ''xmlReq'' : for internal use only | ||
| - | * ''searchtermin_xmlReq'' : for internal use only | ||
| - | * ''header (array)'' : information about a selected region and paging information (check [[trips|trips method]] for this return array) | ||
| - | * ''offer (array)'' : check [[trips|trips method]] for this return array | ||
| - | * ''trip (array)'' : check [[trips|trips method]] for this return array | ||
| - | * ''xmlReq'' : ors xml request used with this method | ||
| - | * ''xmlRes'' : ors xml response used with this method | ||
| - | * ''response (array)'' : availability status, message and a total price | ||
| - | * ''mid'' : 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.  | ||
| - | * **0** : offer is not free | ||
| - | * **1** : offer is free (available to book) | ||
| - | * **2** : offer is on request. If offer is on request, a person can still book this offer but he/she must wait for a touroperator confirmation. | ||
| - | * **3** : communication error (something went wrong with communication between ORS and touroperator). | ||
| - | * **4** : offer is sold out (same as status 0) | ||
| - | * **5** : booking is not possible, you must check availability text message for detailed description of a problem | ||
| - | * ''ttp'' : total price for all passengers | ||
| - | * ''ppc'' : 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! | ||
| - | * ''offer (array)'' : this are an offer information directly from touroperator. This values may differ from ''offerTripInfo'' information! | ||
| - | * ''typ'' : content type | ||
| - | * ''sub'' : sub category | ||
| - | * ''toc'' : touroperator code | ||
| - | * ''ton'' : touroperator name | ||
| - | * ''tocp'' : touroperator logo | ||
| - | * ''htc'' : hotel code (or product code) | ||
| - | * ''gid'' : accommodation GIATA ID | ||
| - | * ''hon'' : city name | ||
| - | * ''oid'' : city ID | ||
| - | * ''desc'' : reserved parameter | ||
| - | * ''zac'' : room type code | ||
| - | * ''zan'' : room type name | ||
| - | * ''vpc'' : service type code | ||
| - | * ''vpn'' : service type name | ||
| - | * ''svc'' : service code | ||
| - | * ''htn'' : accommodation name | ||
| - | * ''stc'' : hotel category | ||
| - | * ''zhc'' : destination code (IATA code) | ||
| - | * ''zhn'' : destination name | ||
| - | * ''ahc'' : departure airport code (IATA code) | ||
| - | * ''ahn'' : departure airport name | ||
| - | * ''vnd'' : checkin date | ||
| - | * ''bsd'' : checkout date | ||
| - | * ''tdc'' : duration | ||
| - | * ''sid'' : bus stop id (only for ''trips'' content type) | ||
| - | * ''sin'' : bus stop name | ||
| - | * ''idp'' : offer ID (use this to search ''extras'' services that are in combination with accommodation) | ||
| - | * ''ovr'' : overall rating | ||
| - | * ''pic'' : full picture | ||
| - | * ''actions (array)'' : promotions used with this offer. This is currently experimental because not all | ||
| - | * ''extras (array)'' : extra surcharges that can be booked | ||
| - | * ''info (array'' : extras information | ||
| - | * ''id'' : extras id | ||
| - | * ''name'' : extras name | ||
| - | * ''price'' : extras price | ||
| - | * ''operator (array)'' : used action, touroperator info and trip hash code | ||
| - | * ''act'' : action | ||
| - | * ''toc'' : touroperator code | ||
| - | * ''hsc'' : unique trip hash code used for this check method  | ||
| - | * ''agt'' : agency number | ||
| - | * ''opts'' : option storno (1 = option will be automatically cancelled , 0 = option will go to fix) | ||
| - | * ''optq'' : quick option (1 = it is possible to create option for a few hours, 0 = quick option is not possible) | ||
| - | * ''optd'' : option date (a date/time when option will end) | ||
| - | * ''travellers (array)'' : passengers info | ||
| - | * ''id'' : passenger sequence number | ||
| - | * ''typ'' : passenger sex / type. Possible values:  | ||
| - | * **H** : mr. | ||
| - | * **D** : mrs. | ||
| - | * **K** : child | ||
| - | * **B** : baby (infant) | ||
| - | * ''sur'' : last name | ||
| - | * ''pre'' : first name | ||
| - | * ''age'' : age / birthday | ||
| - | * ''tvp'' : price for this person | ||
| - | * ''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 number | ||
| - | * ''error'' : error message | ||
| - | |||
| - | ===== Examples ===== | ||
| - | |||
| - | * Example of option_info | ||
| - | <code php> | ||
| - | $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 | ||
| - | ); | ||
| - | |||
| - | // option check | ||
| - | $check = $soapClient->orsxml_hotel_api_call( 'option_info', $searchParams, $trip, $headerData ); | ||
| - | |||
| - | </code> | ||
| - | |||