| Метод в библиотеке | Метод в Битрикс24 |
|---|---|
| createLead | crm.lead.add |
| getLead | crm.lead.get |
| getLeads | crm.lead.list |
| updateLead | crm.lead.update |
| deleteLead | crm.lead.delete |
| getDuplicateLeads | crm.duplicate.findbycomm |
| createDeal | crm.deal.add |
| getDeal | crm.deal.get |
| getDeals | crm.deal.list |
| updateDeal | crm.deal.update |
| deleteDeal | crm.deal.delete |
| createContact | crm.contact.add |
| getContact | crm.contact.get |
| getContacts | crm.contact.list |
| updateContact | crm.contact.update |
| getDuplicateContact | crm.duplicate.findbycomm |
| getUser | user.get |
| getUsers | user.get |
| sendNotify | im.notify.personal.add |
| sendTimelineComment | crm.timeline.comment.add |
Установка с помощью Composer
composer require lozemc/simple-bitrix24-api<?php
use Lozemc\B24;
require __DIR__ . '/vendor/autoload.php';
// https://subdomain.bitrix24.ru/rest/1/0jdfg12ukk104oxf/ - Вебхук из настроек интеграций в Bitrix24
// Хук состоит из домена, ID пользователя и токена
$subdomain = 'subdomain.bitrix24.ru';
$user_id = 1;
$token = '0jdfg12ukk104oxf';
$b24 = B24::init($user_id, $subdomain, $token)
$response = $b24->getLead(123);
print_r($response);
/*
Array
(
[result] => Array
(
[ID] => 3
[TITLE] => Lead Name New
....
[time] => Array
(
[start] => 1717135411.1906
[finish] => 1717135411.227
[duration] => 0.036404848098755
[processing] => 0.014520168304443
[date_start] => 2024-05-31T09:03:31+03:00
[date_finish] => 2024-05-31T09:03:31+03:00
[operating_reset_at] => 1717136011
[operating] => 0
)
*/