User Tools

Site Tools


ors-soap-api:public:getunitavailabilitybyparams

getUnitAvailabilityByParams method

Get an availability information.

Valid content types

  • hotel (at the moment only this content type is supported)

Description

public array getUnitAvailabilityByParams( array $searchData, array $headerData)

Parameters

  • searchData (array) : search parameters. Required serach parameters: toc. Non mandatory parameters: objectId, unitId, dateFrom, dateTo
  • headerData (array) : in addition to SOAP Header Information , you'll need an export account credentials (xuser, xpass)

Return Values

Returns an availability in selected period

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
                                )

                        )

                )

        )

)

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
      • rateClosed : if true - rate is closed on this day for arrivals and for departures
      • rateClosedOnArrival : if true - rate is closed on this day only for arrivals
      • rateClosedOnDeparture : if true - rate is closed on this day only for departures

Examples

  • Example : availability for entire object
$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 );
  • Example : availability for selected unit
$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 );
ors-soap-api/public/getunitavailabilitybyparams.txt · Last modified: 2015/03/05 12:06 by admin