User Tools

Site Tools


ors-soap-api:public:getobjects

Differences

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

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
ors-soap-api:public:getobjects [2015/02/18 20:27]
admin created
ors-soap-api:public:getobjects [2015/02/21 20:06]
admin [Examples]
Line 11: Line 11:
  
 <code php> <code php>
-public ​array getObjects( array $searchData,​ array $headerData)+public ​string ​getObjects( array $searchData,​ array $headerData)
 </​code>​ </​code>​
  
Line 17: Line 17:
  
   * ''​searchData (array)''​ : search parameters. Required serach parameters: ''​toc''​. Non mandatory parameters: ''​objectId''​   * ''​searchData (array)''​ : search parameters. Required serach parameters: ''​toc''​. Non mandatory parameters: ''​objectId''​
-  * ''​headerData (array)''​ : in addition to [[soap_header|SOAP Header Information]] , you'll need export account ​information ​(xuser, xpass)+  * ''​headerData (array)''​ : in addition to [[soap_header|SOAP Header Information]] , you'll need an export account ​credentials ​(''​xuser''​''​xpass''​)
  
 ===== Return Values ===== ===== Return Values =====
  
-Returns a list of available objects. Here is an example of output:+Returns a list of available objects. Here is an example of output ​(string is always returned):
  
 <​code>​ <​code>​
-array +4081:​17281:​2SI408126481:​26481:​OV:​2015-08-01:​2015-07-08
-+
-    [objects] => Array +
-        ( +
-            [0] => Array +
-                ( +
-                    [id] => 4081 +
-                    [objectName] => Apartmaji Vila Maia +
-                    [objectPlace] => Strunjan +
-                    [objectCountryIso] => SI +
-                ) +
- +
-            [1] => Array +
-                ( +
-                    [id] => 5471 +
-                    [objectName] => Vile Terme Zreče +
-                    [objectPlace] => Zreče +
-                    [objectCountryIso] => SI +
-                ) +
- +
-            [2] => Array +
-                ( +
-                    [id] => 7871 +
-                    [objectName] => Villa Piranesi +
-                    [objectPlace] => Piran +
-                    [objectCountryIso] => SI +
-                ) +
-...+
 </​code>​ </​code>​
  
  
-===== Return parameters ===== 
- 
-  * ''​objects''​ (array) : list of objects 
-    * ''​id''​ : object ID 
-    * ''​objectName''​ : object name 
-    * ''​objectPlace''​ : object place 
-    * ''​objectCountryIso''​ : object country ISO code 
-    
 ===== Examples ===== ===== Examples =====
  
-  * Example ​with basic search parameters with selected region group ID+  * Example ​1
 <code php> <code php>
 $searchParams = array( $searchParams = array(
-  '​toc'​ => '​APP', ​      ​// touroperator code+  '​toc'​ => '​APP', ​              ​// touroperator code 
 +  '​unitId'​ => '​17281', ​         // unit id 
 +  '​rateId'​ => '​26481', ​         // rate id (get this from getUnitPricesByParams method) 
 +  '​dateFrom'​ => '​2015-08-01', ​  // check-in date 
 +  '​dateTo'​ => '​2015-07-08', ​    // check-out date
 ); );
  
-$objects ​= $soapClient->​orsxml_hotel_api_call( 'getObjects', $searchParams,​ $header );+$hash = $soapClient->​orsxml_hotel_api_call( 'getPriceCheckHash', $searchParams,​ $header );
 </​code>​ </​code>​
  
-  * Example : search object by id+  * Example ​with serviceType
 <code php> <code php>
 $searchParams = array( $searchParams = array(
-  '​toc'​ => '​APP', ​      ​// touroperator code +  '​toc'​ => '​APP', ​              ​// touroperator code 
-  'objectId' => '4081', // object ​id+  'unitId' => '17281', ​         // unit id 
 +  '​rateId'​ => '​26481', ​         // rate id (get this from getUnitPricesByParams method) 
 +  '​dateFrom'​ => '​2015-08-01', ​  // check-in date 
 +  '​dateTo'​ => '​2015-07-08', ​    // check-out date 
 +  '​serviceType'​ => '​OV'​ ,     // service type code
 ); );
  
-$objects ​= $soapClient->​orsxml_hotel_api_call( 'getObjects', $searchParams,​ $header );+$hash = $soapClient->​orsxml_hotel_api_call( 'getPriceCheckHash', $searchParams,​ $header );
 </​code>​ </​code>​
  
   ​   ​
ors-soap-api/public/getobjects.txt · Last modified: 2015/02/21 20:10 by admin