API - Planyo Web Services - resource_search

Planyo » Pomoc » API » resource_search

resource_search (version 0.2)

Description:

Searches for available resources for given time period. The results can be returned as raw data or as HTML code depending on the value of the optional 'output' parameter.

Input:

start_time DateTime required
Desired start time
end_time DateTime required
Desired end time
site_id int required
Planyo site ID
quantity int required
Desired number of units
sort string optional
Sort criterium. One of: price, resname (resource name), site (site ID), location, prop_res_xyz (sorted by one of the resource-specific properties defined in the admin panel in: Site settings / Custom property manager). E.g. for a custom property 'distance to sea', this would be prop_res_distance_to_sea (where '_' replaces all space characters)
prop_res_xyz string required
Resource-specific properties (defined in the admin panel in: Site settings / Custom property manager). E.g. for a custom property 'distance to sea', this would be prop_res_distance_to_sea (where '_' replaces all space characters). If you want to look for values greater or less than a specific number (e.g. hotels with specific max. distance to sea), prefix the value with one of the following operators: <, >, e.g. prop_res_distance_to_sea = <500
output string optional
If set to 'html', the results will be returned in form of HTML code that can be embedded on your web site. By default (when this parameter is skipped) the results will be returned as data.
version float optional
you can optionally specify the version of the API that you're using. Use the value of latest or simply skip this parameter to use the latest API version. The latest version is: 0.2
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key

Output:

results array
If no output was set, this will be the array of results matching the search criteria. Each array element is a named array with the following fields: id, name, total_price
code string
If the 'output' parameter was set to 'html', this is the output HTML code. The formatting of the results is determined by the template used (Settings / Integrate with your site / Availability search box / Search result templates)