API - Planyo Web Services - list_users

Sie sind hier: Planyo » Hilfe » API » list_users

list_users

Description:

Returns all users with at least one reservation (unless list_created_by_admin is set to true in which case users created by the admins are returned, also with no reservations). You can specify a user filter. A single API call returns at most 1000 results. If you want to get further results, change the page parameter. Note: old name of this function was get_all_users. You can still use that function name instead.

Input:

page int optional
Zero-based page number. The default is 0. Max. number of results per page is by default 100. Note: you can change the page size (max 1000) with the page_size parameter.
site_id int optional
Site ID. Used only in case the API key used is assigned to a meta site.
detail_level int optional
Sum of one or more of the following integers (ORed value): 1=user information, 4=custom user properties. Default value is 1 (all user information without custom properties).
user_filter_name string optional
Optional custom user property filter name (use underscores instead of spaces in the custom user property name). Together with user_filter_value, these parameters will let you only get a subset of users. See Q215 for more info about custom user properties.
user_filter_value string optional
Exact value of the custom user property to be used together with user_filter_name as the user filter. Note: instead of using this parameter, you can also use user_filter_value_inc which looks for values of the custom user property which include the requested text. Using user_filter_value will only find exact matches.
first_name string optional
Optionally you can filter the results by this field (user's first name). You can use the star to match multiple values, e.g. Jo* would match both John and Joanne.
last_name string optional
Optionally you can filter the results by this field (user's last name). You can use the star to match multiple values.
email string optional
Optionally you can filter the results by this field (user's email address). You can use the star to match multiple values.
country string optional
Optionally you can filter the results by this field (user's 2-letter country code).
address string optional
Optionally you can filter the results by this field (user's address). You can use the star to match multiple values.
city string optional
Optionally you can filter the results by this field (user's city). You can use the star to match multiple values.
zip string optional
Optionally you can filter the results by this field (user's zip code / postal address). You can use the star to match multiple values.
phone_number string optional
Optionally you can filter the results by this field (user's phone number excluding the country code). You can use the star to match multiple values.
phone_country_code string optional
Optionally you can filter the results by this field (user's phone country code, e.g. 1 for the US or 41 for Switzerland).
mobile_number string optional
Optionally you can filter the results by this field (user's mobile number excluding the country code). You can use the star to match multiple values.
mobile_country_code string optional
Optionally you can filter the results by this field (user's mobile country code, e.g. 1 for the US or 41 for Switzerland).
list_unconfirmed bool optional
Set this to true if you'd also like to list users without any confirmed reservations. By default only users with confirmed reservations will be returned.
list_created_by_admin bool optional
Set this to true if you'd like to list users created by the administrators (or by the api). By default this function only lists users with at least one reservation
modified_since DateTime optional
You can pass an optional date/time (UTC time zone) if you'd like to limit the results to the users that have been modified in any way (including being created) since given time
method string required
must be set to list_users
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:

users array
Array of users. Each item is an array with the following keys: id, first_name, last_name, email, login, registration_time, ip_address, reservation_count, phone_number, phone_country_code, mobile_number, mobile_country_code, address, city, zip, state, country, language, email_verified. If you requested custom user properties to be returned (using detail_level), then they will be returned in properties.

API playground:

Click here to test this function in the API playground.