API Playground - list_resources

list_resources


Returns resources defined in a Planyo site or meta site along with additional information and photos. You can specify a resource filter. Note: old name of this function was get_all_resources. You can still use that function name instead. (click for full documentation)

detail_level

Sum of one or more of the following integers (ORed value): 1=resource name, 2=resource settings (quantity, site_id, confirmation_type, category, unit_names, resource admin info), 4=resource properties (resource-specific properties), 8=resource photos. Default value is 1 (name only).

page

Zero-based page number. The default is 0. Max. number of results per page is defined by by default 100. Note: you can change the page size (max 300) with the page_size parameter.

list_published_only

Set to true if you only want published resources to be returned. False (default) will list all resources.

list_reservable_only

Set to true if you only want reservable resources to be returned. A resource is not reservable if it can be only reserved as part of a package. False (default) will list all resources.

list_resource_types

Skip this parameter or set to all in order to return all resources. Set it to one of the following values (or multiple comma-separated values) to filter the resource types returned: resource, bundle, package. This allows you to filter out normal base resources, packages and/or bundles from the returned listing.

admin_id

You can optionally filter the resources returned by the ID of the resource administrator. When this parameter is skipped, all resources will be returned.

prop_res_xyz

Resource-specific properties (defined in the admin panel in: Site settings / Custom resource properties). 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. On the other hand, the [include] prefix finds values that include the requested text, e.g. 'prop_res_desc = [include]find me'.

ppp_gps_coords_radius

If you want to do a geolocation search (see Q281 for more about this), you must pass the distance from a point using this parameter (use the 'm' suffix to indicate if the distance is in miles, for kilometers use the 'km' suffix or no suffix at all, just a float) and you should set the coordinates of the search point (latitude followed by a comma and then longitude in decimal degrees, e.g. 46.17,8.80) using the parameter prop_res_gps_coords (if the coordinates of the resources should be used) or prop_cal_gps_coords (if the coordinates on the site level should be used -- only for metasite api keys). Only the results within specified distance from the given point will be returned. Additionally the distance in kilometers will be returned for each result ('distance' key).

ppp_resfilter

This parameter allows you to additionally limit the returned resources. You can do this by specifying a comma-separated list containing resource IDs. For example, ppp_resfilter=1,2,3 will list the resources with IDs equal to 1, 2 and 3. Note that other parameters can limit the returned list even further.

sort

Sort criterium. One of: 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 resource properties). E.g. for a custom property 'distance to sea', this would be prop_res_distance_to_sea (where '_' replaces all space characters)

site_id

If using an API key for a meta site, you can limit the results to a single site ID.

language

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

* - campo requerido