Add a New Product Section crm.productsection.add

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

Scope: crm

Who can execute the method: any user

DEPRECATED

Development of this method has been halted. Please use catalog.section.add.

The method crm.productsection.add creates a new product section.

Method Parameters

Required parameters are marked with *

Name
type

Description

fields*
array

A set of fields — an array in the format array("field"=>"value"[, ...]), containing the values of the product section fields.

Note

To find out the required format for the fields, execute the method crm.productsection.fields and check the format of the returned values for these fields.

Code Examples

How to Use Examples in Documentation

catalogId=$(prompt "Enter Catalog ID")
        sectionId=$(prompt "Enter Parent Section ID (0 if at root)")
        sectionName=$(prompt "Enter Section Name")
        
        curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{
            "fields": {
                "CATALOG_ID": '"$catalogId"',
                "NAME": "'"$sectionName"'",
                "SECTION_ID": '"$sectionId"'
            }
        }' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.productsection.add
        
catalogId=$(prompt "Enter Catalog ID")
        sectionId=$(prompt "Enter Parent Section ID (0 if at root)")
        sectionName=$(prompt "Enter Section Name")
        
        curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{
            "fields": {
                "CATALOG_ID": '"$catalogId"',
                "NAME": "'"$sectionName"'",
                "SECTION_ID": '"$sectionId"'
            },
            "auth": "**put_access_token_here**"
        }' \
        https://**put_your_bitrix24_address**/rest/crm.productsection.add
        
try
        {
            const catalogId = prompt("Enter Catalog ID");
            const sectionId = prompt("Enter Parent Section ID (0 if at root)");
            const sectionName = prompt("Enter Section Name");
        
            const response = await $b24.callMethod(
                "crm.productsection.add",
                {
                    fields:
                    {
                        CATALOG_ID: catalogId,
                        NAME: sectionName,
                        SECTION_ID: sectionId
                    }
                }
            );
        
            const result = response.getData().result;
            console.info("A new section has been created with ID " + result);
        }
        catch(error)
        {
            console.error(error);
        }
        
try {
            $catalogId = readline("Enter Catalog ID");
            $sectionId = readline("Enter Parent Section ID (0 if at root)");
            $sectionName = readline("Enter Section Name");
        
            $response = $b24Service
                ->core
                ->call(
                    "crm.productsection.add",
                    [
                        'fields' => [
                            'CATALOG_ID' => $catalogId,
                            'NAME' => $sectionName,
                            'SECTION_ID' => $sectionId
                        ]
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            if ($result->error()) {
                error_log($result->error());
            } else {
                echo "A new section has been created with ID " . $result->data();
            }
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error creating product section: ' . $e->getMessage();
        }
        
var catalogId = prompt("Enter Catalog ID");
        var sectionId = prompt("Enter Parent Section ID (0 if at root)");
        var sectionName = prompt("Enter Section Name");
        BX24.callMethod(
            "crm.productsection.add",
            {
                fields:
                {
                    CATALOG_ID: catalogId,
                    NAME: sectionName,
                    SECTION_ID: sectionId
                }
            },
            function(result)
            {
                if(result.error())
                    console.error(result.error());
                else
                    console.info("A new section has been created with ID " + result.data());
            }
        );
        
require_once('crest.php');
        
        $catalogId = readline("Enter Catalog ID: ");
        $sectionId = readline("Enter Parent Section ID (0 if at root): ");
        $sectionName = readline("Enter Section Name: ");
        
        $result = CRest::call(
            'crm.productsection.add',
            [
                'fields' => [
                    'CATALOG_ID' => $catalogId,
                    'NAME' => $sectionName,
                    'SECTION_ID' => $sectionId
                ]
            ]
        );
        
        if (isset($result['error'])) {
            echo "Error: " . $result['error_description'] . "\n";
        } else {
            echo "A new section has been created with ID " . $result['result'] . "\n";
        }