API - Planyo Web Services - add_user

Jesteś tutaj: Planyo » Pomoc » API » add_user

add_user

Description:

Use this function to insert a new user associated with your Planyo site. You can optionally specify a login/password and assign any number of user-specific properties. Note: for existing users, custom user properties (prop_user_xyz) and personal details will be updated, the login data will not be overridden.

Input:

email string required
User's email address
first_name string required
First name
last_name string optional
Last name
user_login string optional
If you wish to assign a login and password to this user, specify the login here.
user_password string optional
If you wish to assign a login and password to this user, specify the password here.
country string optional
User's country (2-letter country code, e.g. US, DE, FR)
address string optional
Address
city string optional
City
zip string optional
Zip/postal code
state string optional
State/province
phone string optional
Phone (without international prefix or zero prefix)
phone_country_code string optional
International country code for the phone (e.g. 1 for the USA/Canada)
mobile string optional
Mobile number (without international prefix or zero prefix)
mobile_country_code string optional
International country code for the mobile number (e.g. 1 for the USA/Canada)
user_language string optional
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).
admin_user_id int optional
Optional parameter which lets you tell the system which admin user adds this new user. This should be used only in case it's a resource admin who should be able to access the new user's personal information.
method string required
must be set to add_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 newly created user (in case of success).
is_new int
1 if user was created or 0 for an existing user

API playground:

Click here to test this function in the API playground.