mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-01-16 05:06:02 +02:00
128 lines
3.6 KiB
Plaintext
128 lines
3.6 KiB
Plaintext
---
|
|
sidebar_position: 3
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Получить сделку
|
|
Получает сделку по ID
|
|
|
|
|
|
|
|
`Функция ПолучитьСделку(Знач URL, Знач IDСделки, Знач Токен = "") Экспорт`
|
|
|
|
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
|
|-|-|-|-|-|
|
|
| URL | --url | Строка | ✔ | URL внешнего вебхука или адрес Bitrix24 при использовании токена |
|
|
| IDСделки | --deal | Число,Строка | ✔ | ID сделки |
|
|
| Токен | --token | Строка | ✖ | Токен авторизации, если используется не вебхук |
|
|
|
|
|
|
Возвращаемое значение: Соответствие Из КлючИЗначение - сериализованный JSON ответа от Bitrix24
|
|
|
|
<br/>
|
|
|
|
:::tip
|
|
Метод в документации API: [crm.deal.get](https://dev.1c-bitrix.ru/rest_help/crm/cdeals/crm_deal_get.php)
|
|
:::
|
|
<br/>
|
|
|
|
|
|
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
|
URL = "https://b24-ar17wx.bitrix24.by/rest/1/yg2...";
|
|
IDСделки = "1696";
|
|
|
|
Результат = OPI_Bitrix24.ПолучитьСделку(URL, IDСделки);
|
|
|
|
URL = "b24-ar17wx.bitrix24.by";
|
|
Токен = "2f4e4067006e9f06006b12e400000001000...";
|
|
IDСделки = "1696";
|
|
|
|
Результат = OPI_Bitrix24.ПолучитьСделку(URL, IDСделки, Токен);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint bitrix24 ПолучитьСделку \
|
|
--url "b24-ar17wx.bitrix24.by" \
|
|
--deal 1720 \
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint bitrix24 ПолучитьСделку ^
|
|
--url "b24-ar17wx.bitrix24.by" ^
|
|
--deal 1720 ^
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Результат"
|
|
{
|
|
"result": {
|
|
"ID": "756",
|
|
"TITLE": "Плановая продажа",
|
|
"TYPE_ID": "GOODS",
|
|
"STAGE_ID": "NEW",
|
|
"PROBABILITY": "30",
|
|
"CURRENCY_ID": "USD",
|
|
"OPPORTUNITY": "5000.00",
|
|
"IS_MANUAL_OPPORTUNITY": "N",
|
|
"TAX_VALUE": null,
|
|
"LEAD_ID": null,
|
|
"COMPANY_ID": "1",
|
|
"CONTACT_ID": "3",
|
|
"QUOTE_ID": null,
|
|
"BEGINDATE": "2024-01-01T03:00:00+03:00",
|
|
"CLOSEDATE": "2030-01-01T03:00:00+03:00",
|
|
"ASSIGNED_BY_ID": "1",
|
|
"CREATED_BY_ID": "1",
|
|
"MODIFY_BY_ID": "1",
|
|
"DATE_CREATE": "2024-10-08T20:51:26+03:00",
|
|
"DATE_MODIFY": "2024-10-08T20:51:26+03:00",
|
|
"OPENED": "Y",
|
|
"CLOSED": "N",
|
|
"COMMENTS": null,
|
|
"ADDITIONAL_INFO": null,
|
|
"LOCATION_ID": null,
|
|
"CATEGORY_ID": "0",
|
|
"STAGE_SEMANTIC_ID": "P",
|
|
"IS_NEW": "Y",
|
|
"IS_RECURRING": "N",
|
|
"IS_RETURN_CUSTOMER": "N",
|
|
"IS_REPEATED_APPROACH": "N",
|
|
"SOURCE_ID": null,
|
|
"SOURCE_DESCRIPTION": null,
|
|
"ORIGINATOR_ID": null,
|
|
"ORIGIN_ID": null,
|
|
"MOVED_BY_ID": "1",
|
|
"MOVED_TIME": "2024-10-08T20:51:26+03:00",
|
|
"LAST_ACTIVITY_TIME": "2024-10-08T20:51:26+03:00",
|
|
"UTM_SOURCE": null,
|
|
"UTM_MEDIUM": null,
|
|
"UTM_CAMPAIGN": null,
|
|
"UTM_CONTENT": null,
|
|
"UTM_TERM": null,
|
|
"LAST_ACTIVITY_BY": "1"
|
|
},
|
|
"time": {
|
|
"start": 1728409887.14826,
|
|
"finish": 1728409887.19519,
|
|
"duration": 0.0469341278076172,
|
|
"processing": 0.0196211338043213,
|
|
"date_start": "2024-10-08T20:51:27+03:00",
|
|
"date_finish": "2024-10-08T20:51:27+03:00",
|
|
"operating_reset_at": 1728410487,
|
|
"operating": 0
|
|
}
|
|
}
|
|
```
|