v1.1.0

CallV3.make

Method for making Bitrix24 REST API version 3 calls.
We are still updating this page. Some data may be missing here — we will complete it shortly.

Overview

Use CallV3.make() to call REST API version 3 methods.

The method returns a Promise with an AjaxResult object containing response data, status, and error handling methods.

// Basic usage
const response = await $b24.actions.v3.call.make({
  method: 'tasks.task.get',
  params: {
    id: 123
  },
  requestId: 'unique-request-id'
})

Method Signature

make<T = unknown>(
  options: ActionCallV3
): Promise<AjaxResult<T>>

Parameters

The options object contains the following properties:

ParameterTypeRequiredDescription
methodstringYesREST API method name (e.g., crm.contact.get, tasks.task.get).
paramsTypeCallParamsNoObject with parameters to pass to the REST API method.
requestIdstringNoUnique request identifier for tracking. Used for request deduplication and debugging.

Return Value

Promise<AjaxResult<T>> — a promise that resolves to an AjaxResult object.

This object provides:

  • .getData(): SuccessPayload<T> | undefined — returns the success envelope { result: T, time: PayloadTime }, or undefined when the request failed. Check .isSuccess first.
  • .isSuccess: boolean — flag indicating successful request execution.
  • .getErrorMessages(): string[] — array of error messages.

Error Handling

Always check the result using isSuccess and handle errors:

const response = await $b24.actions.v3.call.make({
  method: 'some.method',
  params: { /* some_params */ },
  requestId: 'unique-request-id'
})

if (!response.isSuccess) {
  // Handling error
  console.error(new Error(`Error: ${response.getErrorMessages().join('; ')}`))
  return
}

// Working with a successful result
const data = response.getData()

Examples

Getting a Task

Alternatives and Recommendations

  • For working with lists: Instead of manually managing pagination use:
    • CallList — automatically retrieves all pages and returns a single result.
    • FetchList — returns an async generator for step-by-step processing of large lists.
  • For batch operations: Use Batch to execute up to 50 commands in a single request.
  • On the client-side (browser): Use the built-in B24Frame object.