Skip to main content

Get deal

Gets deal by ID

Function GetDeal(Val URL, Val DealID, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
DealID--dealNumber, StringDeal ID
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.deal.get


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

Result = OPI_Bitrix24.GetDeal(URL, DealID);

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

Result = OPI_Bitrix24.GetDeal(URL, DealID, Token);
    oint bitrix24 GetDeal \
--url "b24-ar17wx.bitrix24.by" \
--deal 1728 \
--token "***"
Result
{
"result": {
"ID": "772",
"TITLE": "Planned sale",
"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-09T09:22:26+03:00",
"DATE_MODIFY": "2024-10-09T09:22: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-09T09:22:26+03:00",
"LAST_ACTIVITY_TIME": "2024-10-09T09:22:26+03:00",
"UTM_SOURCE": null,
"UTM_MEDIUM": null,
"UTM_CAMPAIGN": null,
"UTM_CONTENT": null,
"UTM_TERM": null,
"LAST_ACTIVITY_BY": "1"
},
"time": {
"start": 1728454947.12395,
"finish": 1728454947.17279,
"duration": 0.0488379001617432,
"processing": 0.0184519290924072,
"date_start": "2024-10-09T09:22:27+03:00",
"date_finish": "2024-10-09T09:22:27+03:00",
"operating_reset_at": 1728455547,
"operating": 0
}
}