Planfix API user.update: Difference between revisions
From Planfix
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 55: | Line 55: | ||
|birthdate ||DateTime ||birthdate ||optional field | |birthdate ||DateTime ||birthdate ||optional field | ||
|- | |- | ||
|sex ||enum ||employee's gender ||optional field. list of acceptable values can be found in the [[Planfix API: | |sex ||enum ||employee's gender ||optional field. list of acceptable values can be found in the [[Planfix API:Employee gender|employee gender]] section | ||
|- | |- | ||
|phones || string||phones|| | |phones || string||phones|| | ||
Line 104: | Line 104: | ||
== Go To == | == Go To == | ||
*[[Planfix API:Employees]] | *[[Planfix API:Employees]] | ||
*[[Error codes]] | *[[Error codes XML API v1|Error codes]] | ||
*[[List of functions]] | *[[List of functions]] |
Latest revision as of 13:51, 22 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 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>