Skip to main content

Get lead structure

Gets a structure with field descriptions for creating a lead

Function GetLeadStructure(Val URL, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
Token--tokenStringAccess token, when app auth method used

Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API


tip

Method at API documentation: crm.lead.fields


1C:Enterprise/OneScript code example
    URL = "https://b24-ar17wx.bitrix24.by/rest/1/yg2...";

Result = OPI_Bitrix24.GetLeadStructure(URL);

URL = "b24-ar17wx.bitrix24.by";
Token = "2f4e4067006e9f06006b12e400000001000...";

Result = OPI_Bitrix24.GetLeadStructure(URL, Token);
    oint bitrix24 GetLeadStructure \
--url "b24-ar17wx.bitrix24.by" \
--token "***"
Result
{
"result": {
"ID": {
"type": "integer",
"isRequired": false,
"isReadOnly": true,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "ID"
},
"TITLE": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Название лида"
},
"HONORIFIC": {
"type": "crm_status",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"statusType": "HONORIFIC",
"title": "Обращение"
},
"NAME": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Имя"
},
"SECOND_NAME": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Отчество"
},
"LAST_NAME": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Фамилия"
},
"BIRTHDATE": {
"type": "date",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Дата рождения"
},
"COMPANY_TITLE": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Название компании"
},
"SOURCE_ID": {
"type": "crm_status",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"statusType": "SOURCE",
"title": "Источник"
},
"SOURCE_DESCRIPTION": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Дополнительно об источнике"
},
"STATUS_ID": {
"type": "crm_status",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"statusType": "STATUS",
"title": "Стадия"
},
"STATUS_DESCRIPTION": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Дополнительно о стадии"
},
"STATUS_SEMANTIC_ID": {
"type": "string",
"isRequired": false,
"isReadOnly": true,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Состояние статуса"
},
"POST": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Должность"
},
"ADDRESS": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Адрес"
},
"ADDRESS_2": {
"type": "string",
"isRequired": false,
"isReadOnly": false,
"isImmutable": false,
"isMultiple": false,
"isDynamic": false,
"title": "Адрес (стр. 2)"
},
"ADDRESS_CITY": {
...