call.followup.get
Получить Follow-up звонка
Описание
Метод относится к REST 3.0. Особенности вызова и формат ответа новой версии API описаны в обзоре REST 3.0.
Метод call.followup.get возвращает Follow-up одного звонка по идентификатору.
Параметры
callId
integer
обязательный
Идентификатор звонка.
Идентификатор можно получить методом call.followup.list
select
array
необязательный
Список полей и вложенных путей, которые нужно вернуть в ответе.
Если параметр не передан, метод возвращает все поля из раздела Корневой объект. Отсутствующие данные имеют значение null.
Если передан пустой массив, метод возвращает только базовые метаданные: callId, callType, initiatorId, startDate, endDate, durationSeconds.
Если передан список полей, метод возвращает только перечисленные поля и всегда добавляет callId. Полный список полей смотрите в статье Поля Follow-up звонков
mentionFormat
string
необязательный
Формат упоминаний пользователей в текстовых AI-полях.
Возможные значения:
bb— BBCode-форматhtml— HTML-форматnone— текст без разметки упоминаний
По умолчанию: bb
Примеры запроса
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"callId":12345,"mentionFormat":"html"}' \
https://**put_your_bitrix24_address**/rest/api/**put_your_user_id_here**/**put_your_webhook_here**/call.followup.get
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"callId":12345,"mentionFormat":"html","auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/api/call.followup.get
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
// Shape of the payload returned in result (match the "response handling" section of the page)
type FollowUpGetResult = {
item: {
callId: number
callType?: number
initiatorId?: number
startDate?: string
endDate?: string
durationSeconds?: number
uuid?: string
language?: string
version?: number
participants?: unknown[]
outcomes?: string[]
createdAt?: string
tracks?: unknown[]
transcription?: unknown
overview?: unknown
summary?: unknown
insights?: unknown
evaluation?: unknown
}
}
try {
const response = await $b24.actions.v3.call.make<FollowUpGetResult>({
method: 'call.followup.get',
params: {
callId: 12345,
mentionFormat: 'html',
},
requestId: Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const result = response.getData()!.result
console.info(result.item)
}
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function getFollowUp() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v3.call.make({
method: 'call.followup.get',
params: {
callId: 12345,
mentionFormat: 'html',
},
requestId: B24Js.Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
const result = response.getData().result
console.info(result.item)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', getFollowUp)
</script>
try {
$response = $b24Service
->core
->call(
'call.followup.get',
[
'callId' => 12345,
'mentionFormat' => 'html',
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error: ' . $e->getMessage();
}
BX24.callMethod(
'call.followup.get',
{
callId: 12345,
mentionFormat: 'html'
},
function(result) {
console.info(result.data());
console.log(result);
}
);
require_once('crest.php');
$result = CRest::call(
'call.followup.get',
[
'callId' => 12345,
'mentionFormat' => 'html',
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "call.followup.get", b24.Params{
"callId": 12345,
"mentionFormat": "html",
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("call.followup.get: %w", err)
}
// Ответ приходит как json.RawMessage — разберите его
// в структуру под форму ответа, показанную ниже на этой странице.
fmt.Printf("%s\n", res.Result)
Ответ
HTTP-статус: 200
Возвращаемые данные
result
object
Объект с данными ответа
item
object
Объект Follow-up. Состав полей зависит от select
time
time
Информация о времени выполнения запроса
Обработка ошибок
HTTP-статус: 403
{
"error": {
"code": "access_denied",
"message": "Нет доступа к данным Follow-up"
}
}
| Код | Описание | Значение |
|---|---|---|
Поле |
Описание ошибки | Как исправить |
| — | Недостаточно прав доступа: отсутствует необходимый scope | Проверьте, что у приложения или вебхука есть scope call |

