Get a List of Recurring Deal Template Settings crm.deal.recurring.list

Scope: crm

Who can execute the method: user with "read" access permission for deals

The method crm.deal.recurring.list returns a list of recurring deal template settings based on the provided filter.

Method Parameters

Name
type

Description

order
object

Object format:

{
            field_1: value_1,
            field_2: value_2,
            ...,
            field_n: value_n,
        }
        

where:

  • field_n — the name of the field to sort by
  • value_n — sort direction: ASC or DESC

The list of fields available for sorting can be obtained using the method crm.deal.recurring.fields

filter
object

Filter object format:

{
            field_1: value_1,
            field_2: value_2,
            ...,
            field_n: value_n,
        }
        

where:

  • field_n — the name of the field to filter the selection of elements
  • value_n — filter value

You can add a prefix to the keys field_n to specify the filter operation.
Possible prefix values:

  • >= — greater than or equal to
  • > — greater than
  • <= — less than or equal to
  • < — less than
  • @ — IN, an array is passed as the value
  • !@ — NOT IN, an array is passed as the value
  • % — LIKE, substring search. The % symbol does not need to be included in the filter value. The search looks for the substring in any position of the string
  • =% — LIKE, substring search. The % symbol must be included in the value. Examples:
    • "mol%" — searches for values starting with "mol"
    • "%mol" — searches for values ending with "mol"
    • "%mol%" — searches for values where "mol" can be in any position
  • %= — LIKE (similar to =%)
  • = — equals, exact match (used by default)
  • != — not equal
  • ! — not equal

The list of fields available for filtering can be obtained using the method crm.deal.recurring.fields.

The PARAMS field in the filter is ignored and does not affect the selection result

start
integer

Pagination parameter.

The page size is fixed: 50 records.

The formula for obtaining the N-th page:
start = (N - 1) * 50

Code Examples

How to Use Examples in Documentation

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"order":{"deal_id":"ASC"},"filter":{">COUNTER_REPEAT":0}}' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.deal.recurring.list
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"order":{"deal_id":"ASC"},"filter":{">COUNTER_REPEAT":0},"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/crm.deal.recurring.list
        
// callListMethod: retrieves all data at once. Suitable for small selections.
        try {
          const response = await $b24.callListMethod(
            'crm.deal.recurring.list',
            {
              order: { deal_id: 'ASC' },
              filter: { '>COUNTER_REPEAT': 0 }
            }
          );
          const items = response.getData() || [];
          for (const item of items) {
            console.log(item);
          }
        } catch (error) {
          console.error('Request failed', error);
        }
        
        // fetchListMethod: retrieves data in parts (iterator).
        try {
          const iterator = $b24.fetchListMethod(
            'crm.deal.recurring.list',
            {
              order: { deal_id: 'ASC' },
              filter: { '>COUNTER_REPEAT': 0 }
            },
            'id'
          );
          for await (const page of iterator) {
            for (const item of page) {
              console.log(item);
            }
          }
        } catch (error) {
          console.error('Request failed', error);
        }
        
        // callMethod: manual pagination using the start parameter.
        try {
          const response = await $b24.callMethod(
            'crm.deal.recurring.list',
            {
              order: { deal_id: 'ASC' },
              filter: { '>COUNTER_REPEAT': 0 }
            },
            0
          );
          const result = response.getData().result || [];
          for (const item of result) {
            console.log(item);
          }
        } catch (error) {
          console.error('Request failed', error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'crm.deal.recurring.list',
                    [
                        'order' => ['deal_id' => 'ASC'],
                        'filter' => ['>COUNTER_REPEAT' => 0],
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            if ($result->error()) {
                error_log($result->error());
                echo 'Error: ' . $result->error();
            } else {
                echo 'Success: ' . print_r($result->data(), true);
            }
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error fetching recurring deals: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'crm.deal.recurring.list',
            {
                order: { deal_id: 'ASC' },
                filter: { '>COUNTER_REPEAT': 0 }
            },
            function(result)
            {
                if (result.error())
                    console.error(result.error());
                else
                {
                    console.info(result.data());
                    if (result.more())
                        result.next();
                }
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'crm.deal.recurring.list',
            [
                'order' => ['deal_id' => 'ASC'],
                'filter' => ['>COUNTER_REPEAT' => 0],
            ]
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        

Response Handling

HTTP Status: 200

{
            "result": [
                {
                    "id": "1",
                    "deal_id": "575",
                    "based_id": "573",
                    "ACTIVE": "N",
                    "category_id": "1",
                    "IS_LIMIT": "T",
                    "COUNTER_REPEAT": "2",
                    "LIMIT_REPEAT": "2",
                    "LIMIT_DATE": "",
                    "START_DATE": "2020-06-15T03:00:00+02:00",
                    "NEXT_EXECUTION": "",
                    "LAST_EXECUTION": "2020-06-17T01:00:00+02:00",
                    "PARAMS": {
                        "MODE": "multiple",
                        "SINGLE_BEFORE_START_DATE_TYPE": "day",
                        "SINGLE_BEFORE_START_DATE_VALUE": 0,
                        "MULTIPLE_TYPE": "day",
                        "MULTIPLE_INTERVAL": 1,
                        "OFFSET_BEGINDATE_TYPE": "day",
                        "OFFSET_BEGINDATE_VALUE": 1,
                        "OFFSET_CLOSEDATE_TYPE": "day",
                        "OFFSET_CLOSEDATE_VALUE": 1
                    }
                },
                {
                    "id": "5",
                    "deal_id": "6555",
                    "based_id": "6531",
                    "ACTIVE": "Y",
                    "category_id": "9",
                    "IS_LIMIT": "N",
                    "COUNTER_REPEAT": "471",
                    "LIMIT_REPEAT": null,
                    "LIMIT_DATE": "",
                    "START_DATE": "2024-11-21T03:00:00+02:00",
                    "NEXT_EXECUTION": "2026-03-07T01:00:00+02:00",
                    "LAST_EXECUTION": "2026-03-06T01:00:00+02:00",
                    "PARAMS": {
                        "MODE": "multiple",
                        "SINGLE_BEFORE_START_DATE_TYPE": "day",
                        "SINGLE_BEFORE_START_DATE_VALUE": 0,
                        "MULTIPLE_TYPE": "day",
                        "MULTIPLE_INTERVAL": 1,
                        "OFFSET_BEGINDATE_TYPE": "day",
                        "OFFSET_BEGINDATE_VALUE": 0,
                        "OFFSET_CLOSEDATE_TYPE": "day",
                        "OFFSET_CLOSEDATE_VALUE": 0
                    }
                }
            ],
            "total": 5,
            "time": {
                "start": 1772757008,
                "finish": 1772757008.649235,
                "duration": 0.6492350101470947,
                "processing": 0,
                "date_start": "2026-03-06T03:30:08+02:00",
                "date_finish": "2026-03-06T03:30:08+02:00",
                "operating_reset_at": 1772757608,
                "operating": 0
            }
        }
        

Returned Data

Name
type

Description

result
recurring_deal[]

Array of recurring deal template settings.

Field descriptions are provided in the method crm.deal.recurring.get

total
integer

Total number of records found

next
integer

Offset for the next page request.

This field is present if there is a next page of results

time
time

Information about the request execution time

Error Handling

HTTP Status: 400

{
            "error": "",
            "error_description": "Access denied."
        }
        

Name
type

Description

error
string

String error code. It may consist of digits, Latin letters, and underscores

error_description
error_description

Textual description of the error. The description is not intended to be shown to the end user in its raw form

Possible Error Codes

Code

Description

Access denied

Insufficient permissions to read deals

Parameter 'order' must be array

The order parameter is not an object

Parameter 'filter' must be array

The filter parameter is not an object

Failed to get list. General error

Unable to retrieve the list due to an internal error

Statuses and System Error Codes

HTTP Status: 20x, 40x, 50x

The errors described below may occur when calling any method.

Status

Code
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred, please contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

An internal server error has occurred, please contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

405

ERROR_BATCH_METHOD_NOT_ALLOWED
Method is not allowed for batch usage

The current method is not allowed to be called using batch

400

ERROR_BATCH_LENGTH_EXCEEDED
Max batch length exceeded

The maximum length of parameters passed to the batch method has been exceeded

401

NO_AUTH_FOUND
Wrong authorization data

Invalid access token or webhook code

400

INVALID_REQUEST
Https required

The methods must be called using the HTTPS protocol

503

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block, to remove it you need to contact Bitrix24 technical support

403

ACCESS_DENIED
REST API is available only on commercial plans

The REST API is available only on commercial plans

403

INVALID_CREDENTIALS
Invalid request credentials

The user whose access token or webhook was used to call the method lacks permissions

404

ERROR_MANIFEST_IS_NOT_AVAILABLE
Manifest is not available

The manifest is not available

403

insufficient_scope
The request requires higher privileges than provided by the webhook token

The request requires higher privileges than those provided by the webhook token

401

expired_token
The access token provided has expired

The provided access token has expired

403

user_access_error
The user does not have access to the application

The user does not have access to the application. This means that the application is installed, but the account administrator has allowed access to this application only for specific users

500

PORTAL_DELETED
Portal was deleted

The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the option "Temporary closure of the public part of the site". Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site

Continue Learning