API - Planyo Web Services - modify_user

Vous êtes ici: Planyo » Aide » API » modify_user

modify_user

Description:

Use this function to modify an existing user's data. The user must be identified by one of the following fields: email, user_id, user_login. Access to modify user's data is possible only when the user was either added manually or via CSV import by one of your admins, or if they made at least one reservation with your site/metasite. On top of that you cannot modify users who made reservations with sites which you don't administer (or which are not a part of your metasite, if it's used). You can modify any number of fields in a single call.

Input:

email string optional
User's email address (only one of: email, user_id, user_login must be passed to identify the user)
user_id int optional
User's ID (only one of: email, user_id, user_login must be passed to identify the user)
user_login string optional
User's login (only one of: email, user_id, user_login must be passed to identify the user)
first_name string optional
New first name
last_name string optional
New last name
new_email string optional
New email address
country string optional
New country
address string optional
New address
email_verified bool optional
Set to true if user's email should be marked as verified
city string optional
New city
zip string optional
New zip/postal code
state string optional
New state/province
phone string optional
New phone (without international prefix or zero prefix)
phone_country_code string optional
New international country code for the phone (e.g. 1 for the USA/Canada)
mobile string optional
New mobile number (without international prefix or zero prefix)
mobile_country_code string optional
New international country code for the mobile number (e.g. 1 for the USA/Canada)
user_language string optional
New 2-letter language code (e.g. EN, DE, FR etc.). Emails sent to the user will use this language.
prop_user_xyz string optional
User-specific properties (defined in the admin panel in: Site settings / Custom user properties). E.g. for a custom property 'member ID', this would be prop_user_member_id (where '_' replaces all space characters).
is_preapproved bool optional
Set to true to mark the customer as pre-approved (automatic confirmations). Set to false to reset the pre-approved status
is_banned bool optional
Set to true to mark the customer as banned or to false to reset the banned status
site_id int optional
Optional and used only with metasite-level api keys and when working on the level of a single site
method string required
must be set to modify_user
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:

user_id int
ID of the user (in case of success) whose data was modified.

API playground:

Click here to test this function in the API playground.