Planfix API user.get
From Planfix
Function to get user information. Request format:
<?xml version="1.0" encoding="UTF-8"?>
<request method="user.get">
<account></account>
<sid></sid>
<user>
<id></id>
<general></general>
</user>
<signature></signature>
</request>
Name | Type | value | Note |
---|---|---|---|
user.id | int | user identifier | if this parameter and the general parameter are missing, the system will return the data of the employee who initiated the request. |
user.general | int | employee number | |
signature | string(32) | signature |
Response:
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
<user>
<id></id>
<general></general>
<name></name>
<lastName></lastName>
<midName></midName>
<login></login>
<email></email>
<secondaryEmails>
<email></email>
<!-- ... -->
</secondaryEmails>
<role></role>
<status></status>
<birthdate></birthdate>
<sex></sex>
<telegramId></telegramId>
<phones>
<phone>
<number></number>
<typeId><typeId>
<typeName><typeName>
</phone>
...
</phones>
<isInvisibleOutOfGroup></isInvisibleOutOfGroup>
<isBlindOutOfGroup></isBlindOutOfGroup>
<userPic></userPic>
<isOnline></isOnline>
<timezone></timezone>
<post>
<id></id>
<name></name>
</post>
<userGroups>
<userGroup>
<id></id>
<name></name>
</userGroup>
<userGroup>
<id></id>
<name></name>
</userGroup>
<!-- ... -->
</userGroups>
</user>
</response>
Name | Type | Value | Note |
---|---|---|---|
id | int | employee identifier | |
general | int | employee number | |
name | string | user's first name and middle name | |
lastName | string | user's last name | |
midName | string | user's middle name | |
login | string | account name in the system | |
string | email address | ||
secondaryEmails.email | additional email addresses, if any | ||
role | enum | user's role in the system | |
status | enum | status | see the list of allowable values in the user statuses section |
birthdate | DateTime | birthdate | if the value is not set, the value is empty |
sex | enum | employee's gender | see the list of allowable values in the employee gender section, if the value is not set, the value remains empty |
phones | list of phones | ||
phones.phone.number | string | phone number | |
phones.phone.typeId | int | phone number type identifier | |
phones.phone.typeName | string | phone number type name | |
isInvisibleOutOfGroup | bool | true=Only sees members of his groups; false=Sees all employees | available for users with administrator rights |
isBlindOutOfGroup | bool | true=Only his group members can see him; false=All employees can see him | available for users with administrator rights |
userPic | string | returns the full URL to the image | if not set - the node is empty |
timezone | string | employee's timezone | |
post | user's position | ||
post.id | int | position identifier | |
post.name | string | position name | |
userGroups | list of groups the user is a part of | ||
userGroups.userGroup | group | ||
userGroups.userGroup.id | int | group identifier | |
userGroups.userGroup.name | string | group name | |
telegramId | int | internal identifier in Telegram | returned only if Telegram notifications are enabled |
Otherwise, an error response will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
<code></code>
</response>