Planfix API user.update: Difference between revisions
From Planfix
(Created page with "A function to update user data. Request format: <source lang="xml"> <?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><...") |
No edit summary |
||
| Line 45: | Line 45: | ||
|lastName ||string ||user's last name ||optional field | |lastName ||string ||user's last name ||optional field | ||
|- | |- | ||
|email || string|| | |email || string|| email address||optional field | ||
|- | |- | ||
|role ||enum || user's role in the system||optional field. editable only by administrators. full list can be found in the [Planfix API:user roles|user roles]] section | |role ||enum || user's role in the system||optional field. editable only by administrators. full list can be found in the [Planfix API:user roles|user roles]] section | ||
|- | |- | ||
|status ||enum | |status ||enum ||status ||optional field. editable only by administrators. list of acceptable values can be found in the [[Planfix API:user statuses|user statuses]] section | ||
|- | |- | ||
|password ||string ||password ||optional field | |password ||string ||password ||optional field | ||
Revision as of 09:11, 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>| Название | Тип | Значение | Примечание |
|---|---|---|---|
| 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>