Planfix API user.update: Difference between revisions
From Planfix
No edit summary |
No edit summary |
||
Line 86: | Line 86: | ||
</source> | </source> | ||
{| class="wikitable" style="margin-top: 1em; width:100% " | {| class="wikitable" style="margin-top: 1em; width:100% " | ||
!width="150"| | !width="150"|Name !!width="200"| Type !!width="50%"| Value !! Note | ||
|- | |- | ||
|user.id ||int || identifier of the updated user|| | |user.id ||int || identifier of the updated user|| | ||
Line 102: | Line 102: | ||
== Go To == | |||
== | *[[Planfix API:Employees]] | ||
*[[ | *[[Error codes]] | ||
*[[ | *[[List of functions]] | ||
*[[ |
Revision as of 09:12, 5 March 2024
A function to update user data. Request format:
<?xml version="1.0" encoding="UTF-8"?>
<request method="user.update">
<account></account>
<sid></sid>
<user>
<id></id>
<name></name>
<midName></midName>
<lastName></lastName>
<email></email>
<role></role>
<status></status>
<password></password>
<birthdate></birthdate>
<sex></sex>
<phones>
<phone>
<number></number>
<typeId></typeId>
<typeName></typeName>
</phone>
<!-- ... -->
</phones>
<isInvisibleOutOfGroup></isInvisibleOutOfGroup>
<isBlindOutOfGroup></isBlindOutOfGroup>
<userPic></userPic>
<post>
<id></id>
</post>
</user>
<signature></signature>
</request>
Name | Type | Value | Note |
---|---|---|---|
id | int | ||
name | string | user's name | |
midName | string | user's middle name | optional field |
lastName | string | user's last name | optional field |
string | email address | optional field | |
role | enum | user's role in the system | user roles]] section |
status | enum | status | optional field. editable only by administrators. list of acceptable values can be found in the user statuses section |
password | string | password | optional field |
birthdate | DateTime | birthdate | optional field |
sex | enum | employee's gender | optional field. list of acceptable values can be found in the employee's gender section |
phones | string | phones | |
phone.number | string | phone number | |
phone.typeId | int | type identifier of the number | acceptable values can be obtained with the contact.getPhoneTypes function |
phone.typeName | string | name of the number type | |
isInvisibleOutOfGroup | bool | true=Sees only members of his groups; false=Sees all employees | optional field. editable only by administrators |
isBlindOutOfGroup | bool | Only members of his groups can see him; false=All employees can see him | optional field. editable only by administrators |
userPic | string | base64 encoded picture | optional field |
post.id | int | position held by the user | optional field |
Result of successful function execution:
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
<user>
<id></id>
</user>
</response>
Name | Type | Value | Note |
---|---|---|---|
user.id | int | identifier of the updated user |
Otherwise, a response with an error will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
<code></code>
</response>