User Tools

Site Tools


ors-soap-api:public:quicksearch

This is an old revision of the document!


Quick Search method

Returns a list of hotels / places or countries by sending query string.

Query string is a string that user enters in quick search field. You can specify which lists do you want to return by defining types attribute.

Valid content types

  • dhotel (only this type is currently supported!)

Description

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

Parameters

  • searchData (array) : search parameters. Required search parameters: query (types is optional)
  • headerData (array) : SOAP Header Information

Return Values

Gets a list of hotels, places and countries that matches query string.

Array
(
    [hotel] => Array
        (
            [0] => Array
                (
                    [code] => PL8415.200.2
                    [name] => PL8415.200.2 Dom Zdrojowy
                    [gid] => !interhome:IlBMODQxNS4yMDAuMiI=
                    [oid] => 17440
                    [hon] => Jastarnia
                    [cntyiso] => PL
                    [country] => Poland
                )

            [1] => Array
                (
                    [code] => PL8415.200.6
                    [name] => PL8415.200.6 Dom Zdrojowy
                    [gid] => !interhome:IlBMODQxNS4yMDAuNiI=
                    [oid] => 17440
                    [hon] => Jastarnia
                    [cntyiso] => PL
                    [country] => Poland
                )

        )

    [places] => Array
        (
            [0] => Array
                (
                    [oid] => 47032
                    [hon] => Busko Zdroj
                    [cntyiso] => PL
                    [country] => Poland
                )

            [1] => Array
                (
                    [oid] => 62847
                    [hon] => Wysowa ZdrĂłj
                    [cntyiso] => PL
                    [country] => Poland
                )

        )


    [regions] => Array
        (
            [0] => Array
                (
                    [code] => 100434
                    [name] => Kvarner
                )

            [1] => Array
                (
                    [code] => 99990088
                    [name] => Kvarner hribi
                )

        )        

    [countries] => Array
        (
            [0] => Array
                (
                    [code] => US
                    [name] => Združene države Amerike
                )

        )

Return parameters

  • hotel (array) : a list of hotels
    • code : object unique code
    • gid : object GIATA ID
    • name : object name
    • hon : city name
    • oid : city ID
    • cntyiso : country ISO code
    • countrya: country name
  • places (array) : a list of places
    • hon : city name
    • oid : city ID
    • cntyiso : country ISO code
    • countrya: country name
  • regions (array) : a list of regions
    • code : region code (rgc)
    • name : region name
  • countries (array) : a list of countries
    • code : country ISO code (2 characters)
    • name : country name

Examples

  • Example of quicksearch request
$searchParams = array(
  'query' => 'zdr',       // search string
  'types' => 'hotel,places,countries,regions',       // type of lists to return
);
 
// this is the same as upper array (when types is empty then quicksearch returns all of the lists)
$searchParams = array(
  'query' => 'zdr',       // search string
);
 
$results = $soapClient->orsxml_dhotel_api_call( 'quicksearch', $searchParams, $header );
  • Example of quicksearch request (return only places)
$searchParams = array(
  'query' => 'zdr',       // search string
  'types' => 'places',       // type of lists to return
);
 
$results = $soapClient->orsxml_dhotel_api_call( 'quicksearch', $searchParams, $header );
  • Example of quicksearch request (return only regions)
$searchParams = array(
  'query' => 'kvarner',       // search string
  'types' => 'regions',       // type of lists to return
);
 
$results = $soapClient->orsxml_dhotel_api_call( 'quicksearch', $searchParams, $header );
ors-soap-api/public/quicksearch.1423733486.txt.gz · Last modified: 2015/02/12 10:31 by admin