User Tools

Site Tools


ors-soap-api:public:regions

This is an old revision of the document!


Regions method

Get a list of regions.

Valid content types

  • pauschal
  • hotel
  • trips
  • charter
  • oneway
  • (extras is not supported!)

Description

public array regions( array $searchData, array $headerData, array $topOffersFilter = array(), boolean $cleanUrl = true )

Parameters

  • searchData (array) : search parameters. Required serach parameters: vnd, bsd, epc, tdc
  • headerData (array) : SOAP Header Information
  • topOffersFilter (array) : top offers filter. Set a preffered region codes for each content type that you consider as top regions. Results that match this filter will be listed under array('top_regions' ⇒ …)

Example $topOffersFilter:

array(
    'hotel' => array('rgcs' => '123,160,133'),  // top region codes for content type hotel
    'pauchal' => array('rgcs' => '133')         // top region codes for content type pauschal
    'charter' => array('zhcs' => 'PMI,PUJ')     // top zhc codes for content type charter
    'oneway' => array('zhcs' => 'PMI')          // top zhc codes for content type oneway
)
  • cleanUrl (bool) : TRUE returns clean friendly URLs.

Return Values

Returns a list of available regions and groups. Here is an example of output:

Array
(
    [top_regions] => Array
        (
        )

    [rfilters] => Array
        (
          [ppc] => "26-27"
        )

    [regions] => Array
        (
            [0] => Array
                (
                    [region] => Croatia
                    [rgc] => 100023
                    [rgid] => 100023
                    [ppc] => 26
                    [offer] => Array
                        (
                            [0] => Array
                                (
                                    [rgc] => 1108
                                    [rgn] => Croatia - Istria
                                    [dtemp] => 
                                    [wtemp] => 
                                    [info] => 1
                                    [ppc] => 26
                                    [url] => croatia-istria/1108/?epc=2&vnd=1&bsd=300&toc=&tdc=1-7&sel[rgc]=1108
                                )

                            [1] => Array
                                (
                                    [rgc] => 659
                                    [rgn] => Dalmatia
                                    [dtemp] => 
                                    [wtemp] => 
                                    [info] => 0
                                    [ppc] => 27
                                    [url] => dalmatia/659/?epc=2&vnd=1&bsd=300&toc=&tdc=1-7&sel[rgc]=659
                                )
...

Return parameters

  • top_regions (array) : a list of top regions (this list depends on a filter $topOffersFilter, if this filter is not set then this array is empty.
  • rfilters (array) : range filters
    • ppc : filters by price per person
  • regions (array) : a list of region groups
    • region : region group name
    • rgc : region group ID
    • rgid : same as rgc
    • ppc : lowest price per person in this group
    • offer (array) : a list of regions in this group
      • rgc : region ID
      • rgn : region name
      • dtemp : current air temperature in this region
      • wtemp : current water temperature in this region
      • info : is a description for this region available (1) or not (0). This is not used anymore!
      • ppc : lowest price per person for this region
      • url : a suggested URL with search parameters for Offers method

Examples

  • Example with basic search parameters
$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
);
 
$regions = $soapClient->orsxml_hotel_api_call( 'regions', $searchParams, $header );
  • Example with top offers filtes and range filters
$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
  'rfilter' => [
     'ppc' => '200-400'        // filter by price range
  ]
);
 
// top regions filter
$topRegions = array(
    'hotel' => array('rgcs' => '123,160,133'), 
    'pauchal' => array('rgcs' => '133') 
);
$regions = $soapClient->orsxml_hotel_api_call( 'regions', $searchParams, $header, $topRegions );

JSON Examples

@see ORS JSON API how to post request.

{
  "requestType" : "search",
  "action": "regions",
  "search": {
    "typ": "hotel",
    "vnd": "2018-01-10",
    "bsd": "2018-03-10",
    "tdc": "1-5",
    "epc": "2"
  },
  "top"  : {
    "toc" : "FTI",
    "stc" : "3" 
  },
  "header": {
    "lang": "[lang]",
    "usr" : "[usr]",
    "pass": "[pass]",
    "agid": "[agid]"
  }
}
ors-soap-api/public/regions.1563177471.txt.gz · Last modified: 2019/07/15 09:57 (external edit)