• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/office365/apiservice.php
  • Класс: BitrixCalendarSyncOffice365ApiService
  • Вызов: ApiService::addSectionSubscription
public function addSectionSubscription(string $vendorSectionId, string $state = ''): array
{
	$data = [
		'changeType' => 'created,updated,deleted',
		'notificationUrl' => $this->getNotificationUrl(),
		'resource' => "me/calendars/$vendorSectionId/events",
		'expirationDateTime' => $this->getExpirationDateTime(),
		'clientState' => $state,
		'latestSupportedTlsVersion' => 'v1_2',
	];

	return $this->apiClient->post('subscriptions', $data);
}