API - Planyo Web Services - list_sites

Ti trovi qui: Planyo » Aiuto » API » list_sites

list_sites

Description:

Returns sites defined in a Planyo meta site along with additional information and photos. You can specify a site filter.

Input:

detail_level int optional
Sum of one or more of the following integers (ORed value): 1=site name, 2=site settings, 4=custom site properties, 8=resource photos, 16=extension usage. Default value is 1 (name only).
page int optional
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 500) with the page_size parameter.
admin_id int optional
You can optionally filter the sites returned by the ID of the main site administrator. When this parameter is skipped, all sites will be returned.
filter_name string optional
Optional filter name (in form: prop_cal_xxx, see Q206 for the full list of site filters available for your Planyo site). Together with filter_value, these parameters work just just the site filter in advanced integration and let you only get a subset of sites.
filter_value string optional
Exact value of the custom site property to be used together with filter_name as the site filter. Note: instead of using this parameter, you can also use filter_value_inc which looks for values of the custom site property which include the requested text. Using filter_value will only find exact matches.
ppp_gps_coords_radius string optional
If you want to use a geolocation filter (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_cal_gps_coords. Only the results within specified distance from the given point will be returned. Additionally the distance in kilometers will be returned for each site ('distance' key).
sort string optional
Sort criterium. Currently you can only use the value 'prop_cal_gps_coords' (when using ppp_gps_coords_radius) or leave the value empty to have sites ordered by name.
method string required
must be set to list_sites
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. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp.

Output:

site_count int
Total number of sites. Note: this can be greater than the number of site returned because of the max. page size limit set to 100.
max_page int
Max. page number (page numbers are zero-based).
sites array
Array of sites. Each item is a named array with one or more of the following keys (depending on the specified detail_level): id, name, metasite_id (can include comma-separated values in case the site belongs to multiple meta sites), admin_id, creation_time, base_site_id, timezone, date_format, time_format, default_language, payment_mode (payment gateway used, see the full list in the documentation or set_payment_gateway), payment_account, online_payment_surcharge, allowed_domains (advanced integration will only work on these domain names, comma-separated), shopping_cart (true/false), site_type (PRO/PRO-COMM), properties (array of all site-specific properties -- name => value -- defined in the admin panel in: Settings / Custom properties), photos (array of photos containing following keys: id, path, title).

API playground:

Click here to test this function in the API playground.