User Tools

Site Tools


ors-soap-api:public:getunits

getUnits method

Get a list of touroperator units.

Valid content types

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

Description

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

Parameters

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

Return Values

Returns a list of available units. Here is an example of output:

Array
(
    [objects] => Array
        (
            [0] => Array
                (
                    [id] => 4081
                    [objectName] => Apartmaji Vila Maia
                    [objectPlace] => Strunjan
                    [objectCountryIso] => SI
                    [units] => Array
                        (
                            [17281] => Array
                                (
                                    [id] => 17281
                                    [unitName] => A2+2
                                    [unitType] => AP
                                    [unitView] => pool
                                )

                            [17291] => Array
                                (
                                    [id] => 17291
                                    [unitName] => B4+2
                                    [unitType] => AP
                                    [unitView] => pool
                                )

                        )

                )

        )

)

Return parameters

  • objects (array) : list of objects
    • id : object ID
    • objectName : object name
    • objectPlace : object place
    • objectCountryIso : object country ISO code
    • units (array) : list of units
      • id : unit ID
      • unitName : unit name
      • unitType : unit type
      • unitView : unit view

Examples

  • Example : search by object id
$searchParams = array(
  'toc' => 'APP',       // touroperator code
  'objectId' => '4081', // object id
);
 
$units = $soapClient->orsxml_hotel_api_call( 'getUnits', $searchParams, $header );
  • Example : search by unit id
$searchParams = array(
  'toc' => 'APP',       // touroperator code
  'unitId' => '23571',  // unit id
);
 
$units = $soapClient->orsxml_hotel_api_call( 'getUnits', $searchParams, $header );
ors-soap-api/public/getunits.txt · Last modified: 2015/02/18 21:35 by admin