user.fields
Scope: catalog Permissions to execute: for all
List of Bitrix24 user fields to be retrieved as the result of executed method depends on application/webhook scope. Find more details on access to user data in this article.
Retrieves list of user field names. Method fetches standard list of fields, custom user fields cannot be used.
Parameters
Method has no parameters.
Call
BX24.callMethod('user.fields');
Request (xml for clarity of response)
https://my.bitrix24.com/rest/user.fields.xml?auth=7c9d8f00ea0ddd9e02cab3eb2b3bd0d1
Response
<response> <result> <ID>ID</ID> <ACTIVE>Activity</ACTIVE> <EMAIL>E-Mail</EMAIL> <NAME>First name</NAME> <LAST_NAME>Last name</LAST_NAME> <SECOND_NAME>Middle name</SECOND_NAME> <PERSONAL_GENDER>Gender</PERSONAL_GENDER> <PERSONAL_PROFESSION>Occupation</PERSONAL_PROFESSION> <PERSONAL_WWW>Home page</PERSONAL_WWW> <PERSONAL_BIRTHDAY>Date of birth</PERSONAL_BIRTHDAY> <PERSONAL_PHOTO>Photo</PERSONAL_PHOTO> <PERSONAL_ICQ>ICQ</PERSONAL_ICQ> <PERSONAL_PHONE>Phone</PERSONAL_PHONE> <PERSONAL_FAX>Fax</PERSONAL_FAX> <PERSONAL_MOBILE>Mobile</PERSONAL_MOBILE> <PERSONAL_PAGER>Pager</PERSONAL_PAGER> <PERSONAL_STREET>Street address</PERSONAL_STREET> <PERSONAL_CITY>City</PERSONAL_CITY> <PERSONAL_STATE>State/ Region</PERSONAL_STATE> <PERSONAL_ZIP>Zip code</PERSONAL_ZIP> <PERSONAL_COUNTRY>Country</PERSONAL_COUNTRY> <WORK_COMPANY>Company</WORK_COMPANY> <WORK_POSITION>Title</WORK_POSITION> <UF_DEPARTMENT>Departments</UF_DEPARTMENT> <UF_INTERESTS>Hobbies</UF_INTERESTS> <UF_SKILLS>Skills</UF_SKILLS> <UF_WEB_SITES>Other websites</UF_WEB_SITES> <UF_XING>Xing</UF_XING> <UF_LINKEDIN>LinkedIn</UF_LINKEDIN> <UF_FACEBOOK>Facebook</UF_FACEBOOK> <UF_TWITTER>Twitter</UF_TWITTER> <UF_SKYPE>Skype</UF_SKYPE> <UF_DISTRICT>District</UF_DISTRICT> <UF_PHONE_INNER>Internal phone</UF_PHONE_INNER> </result> </response>
Example
Update user department:
$res = CRest::call( 'user.update', [ 'ID' => 4, 'UF_DEPARTMENT' => [ 3 ], ] );
Add user to workgroup:
$res = CRest::call( 'sonet_group.user.invite', [ 'USER_ID' => 4, 'GROUP_ID' => 3, 'MESSAGE' => 'Invitation' ] );
© «Bitrix24», 2001-2024