userfieldtype.add
Registration of new type of user fields. This method returns true or an error with description.
Parameters
Parameter | Type | Description | Limitations |
---|---|---|---|
USER_TYPE_ID | Line | Inline code of the type. Required parameter. |
|
HANDLER | URL | Address of user type handler. Required parameter. | Shall be in the same domain as the application main address and must be unique |
TITLE | Line | Type text name. Will be displayed in the admin interface of user field settings. | |
DESCRIPTION | Line | Type text description. Will be displayed in the admin interface of user field settings. | |
OPTIONS | Multi-dimentional array | Additional settings. Presently, only one key is available: height - indicates custom field height by default in pixels. By default - 0 When specifying as '0' - uses standard height for displaying such embedding. . Applies any positive value. |
Examples
Call example
BX24.callMethod( 'userfieldtype.add', { USER_TYPE_ID: 'test', HANDLER: 'https://www.myapplication.com/handler/', TITLE: 'Test type', DESCRIPTION: 'Test userfield type for documentation' } );
Request example
POST https://sometestportal.bitrix24.com/rest/userfieldtype.add HTTP/1.1 USER_TYPE_ID=test&HANDLER=https%3A%2F%2Fwww.myapplication.com%2Fhandler%2F&TITLE=Test+type&DESCRIPTION=Test+userfield+type+for+documentation&auth=63t6r4z9cugaciaxocrh2r47zlodp12y HTTP/1.1 200 OK { "result": true }
© «Bitrix24», 2001-2024