UpdatePerson

Use this method to update properties of an existing user. It is also used to disable a login, to change the password or to activate a login.

URL

(POST) companies/{companyid}/persons

PARAMETERS

token

The token obtained on connection

Required

companyid

The company id of the person to modify

Required

data

A json containing the person information (see below)

Required

 

JSON format of "data" parameter

 

PersonIdThe person id of the person to updateRequired
LastNameThe last name of the personOptional
FirstNameThe first name of the personOptional
EmailThe email address of the person. This must be a valid email address or the API will return an error.Optional
LoginThe login to connect. Use for example "John.Hollow" or "mylogin123". The minimum length of logins is 8 characters.Optional
PasswordThe password to connect. The password must comply with the password policy settings (see "Settings" > "Advanced security" in Wordbee Translator.Optional
UserProfileIdThe profile id of the person. See API call to enumerate profiles. Note that you cannot create a person with the Administrator profile and that you cannot delete the Administrator.Optional
IsActive

Activate or deactivate account. An inactive account cannot login. Boolean value. To activate a person you need to specify login, password and profile id as well.

Default value if not set: false

Optional
PersonCode

The person code.

Default value: If not set, then preset with the first letter of the first name and the first letter of the last name.

Optional
TitleThe person titleOptional
RoleThe person roleOptional
PhoneThe person phone numberOptional
PhoneMobileThe person mobile phone numberOptional
CommentsInternal comments on personOptional
Labels

Set a label: "labels": [ { "id": 10, "value": 1 }, … ]

Clear a label: "labels": [ { "id": 10, "value": null }, … ]

See chapter Custom labels to get the list of labels.

Optional

 

Just set the fields that you want to update in the JSON.

If you want to create a login for this person, Login, Password and UserProfileId must all be set.

To remove the login, just set Login, Password or UserProfileId to null.

 

License checks: When enabling an account, the system verifies that a user account license is still available. If this is not the case, the API returns an HTTP error code.

 

Here is a sample to simply enable a login. Json data parameter:

{

"PersonId":131,

"IsActive":true

}

You can easily deactivate the person if you set IsActive to false.

 

Here is a sample to set a login to a person. Json data parameter:

{

"PersonId":131

"Login":"Adrien.Login",

"Password":"password1",

"UserProfileId":8,

"IsActive":true

}

 

Here is a sample to remove a login from a person. Json data parameter:

{

"PersonId":131

"Login":null

}

 

RESULTS

No result. In case of invalid parameters an HTTP error code is returned.





Copyright Wordbee - Buzzin' Outside the Box since 2008