Planfix API user.get: Difference between revisions
From Planfix
(Created page with "{{#seo: |title=Planfix API user.get |titlemode=append |keywords=planfix, api |description=get user information }} Function to get user information. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="user.get"> <account></account> <sid></sid> <user> <id></id> <general></general> </user> <signature></signature> </request> </source> {| class="wikitable" style="margin-top: 1em; width:100% " !width="150"|Name !!width...") |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 108: | Line 108: | ||
|birthdate ||DateTime ||birthdate || if the value is not set, the value is empty | |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 [[Planfix API: | |sex ||enum ||employee's gender ||see the list of allowable values in the [[Planfix API:Employee gender|employee gender]] section, if the value is not set, the value remains empty | ||
|- | |- | ||
|phones|| ||list of phones || | |phones|| ||list of phones || | ||
Line 140: | Line 140: | ||
|userGroups.userGroup.name ||string ||group name || | |userGroups.userGroup.name ||string ||group name || | ||
|- | |- | ||
|telegramId || int || internal identifier in Telegram || returned only if Telegram notifications are enabled|- | |telegramId || int || internal identifier in Telegram || returned only if Telegram notifications are enabled | ||
|- | |||
|} | |} | ||
Line 154: | Line 155: | ||
== 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:58, 22 March 2024
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>