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!
====== getUnitAvailabilityByParams method ====== Get an availability information. ===== Valid content types ===== * ''hotel'' (at the moment only this content type is supported) ===== Description ===== <code php> public array getUnitAvailabilityByParams( array $searchData, array $headerData) </code> ===== Parameters ===== * ''searchData (array)'' : search parameters. Required serach parameters: ''toc''. Non mandatory parameters: ''objectId'', ''unitId'', ''dateFrom'', ''dateTo'' * ''headerData (array)'' : in addition to [[soap_header|SOAP Header Information]] , you'll need an export account credentials (''xuser'', ''xpass'') ===== Return Values ===== Returns an availability in selected period <code> Array ( [units] => Array ( [17281] => Array ( [id] => 17281 [unitName] => A2+2 [unitType] => AP [unitView] => pool [inventory] => Array ( [2015-02-18] => Array ( [date] => 2015-02-18 [availableUnits] => 1 [request] => 0 [rateClosed] => false [rateClosedOnArrival] => false [rateClosedOnDeparture] => false ) [2015-02-19] => Array ( [date] => 2015-02-19 [availableUnits] => 1 [request] => 0 [rateClosed] => false [rateClosedOnArrival] => false [rateClosedOnDeparture] => false ) [2015-02-20] => Array ( [date] => 2015-02-20 [availableUnits] => 1 [request] => 0 [rateClosed] => false [rateClosedOnArrival] => false [rateClosedOnDeparture] => false ) ) ) ) ) </code> ===== Return parameters ===== * ''units'' (array) : list of units * ''id'' : unit ID * ''unitName'' : unit name * ''unitType'' : unit type * ''unitView'' : unit view * ''inventory'' (array) : inventory information * ''date'' : date * ''availableUnits'' : a number of available units for this date * ''request'' : 0 - unit is not on request ; 1 - unit is on request ===== Examples ===== * Example : availability for entire object <code php> $searchParams = array( 'toc' => 'APP', // touroperator code 'objectId' => '4081', // unit id 'dateFrom' => '2015-02-20', // from date 'dateTo' => '2015-03-20', // to date ); $inventory = $soapClient->orsxml_hotel_api_call( 'getUnitAvailabilityByParams', $searchParams, $header ); </code> * Example : availability for selected unit <code php> $searchParams = array( 'toc' => 'APP', // touroperator code 'unitId' => '17281', // unit id 'dateFrom' => '2015-02-20', // from date 'dateTo' => '2015-03-20', // to date ); $inventory = $soapClient->orsxml_hotel_api_call( 'getUnitAvailabilityByParams', $searchParams, $header ); </code>