Add Measurement Unit crm.measure.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

The development of this method has been halted. Please use catalog.measure.add.

This method adds a new measurement unit.

Method Parameters

Required parameters are marked with *

Name
type

Description

fields*
array

A set of fields — an array in the form array("field"=>"value"[, ...]), containing the values of the measurement unit fields.

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

Parameter fields

Required parameters are marked with *

Name
type

Description

CODE*
integer

Code

MEASURE_TITLE*
string

Name of the measurement unit

SYMBOL_RUS
string

Symbol

SYMBOL_INTL
string

International symbol

SYMBOL_LETTER_INTL
string

International letter code

IS_DEFAULT
char

Default

Code Examples

How to Use Examples in Documentation

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"fields":{"CODE":"212","MEASURE_TITLE":"Watt","SYMBOL_RUS":"W","SYMBOL_INTL":"W","SYMBOL_LETTER_INTL":"WTT","IS_DEFAULT":"N"}}' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.measure.add
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"fields":{"CODE":"212","MEASURE_TITLE":"Watt","SYMBOL_RUS":"W","SYMBOL_INTL":"W","SYMBOL_LETTER_INTL":"WTT","IS_DEFAULT":"N"},"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/crm.measure.add
        
try
        {
            const response = await $b24.callMethod(
                'crm.measure.add',
                {
                    fields: {
                        "CODE": "212",
                        "MEASURE_TITLE": "Watt",
                        "SYMBOL_RUS": "W",
                        "SYMBOL_INTL": "W",
                        "SYMBOL_LETTER_INTL": "WTT",
                        "IS_DEFAULT": "N"
                    }
                }
            );
            
            const result = response.getData().result;
            console.info('Measurement unit created with ID ' + result);
        }
        catch(error)
        {
            console.error('Error:', error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'crm.measure.add',
                    [
                        'fields' => [
                            'CODE'              => '212',
                            'MEASURE_TITLE'     => 'Watt',
                            'SYMBOL_RUS'        => 'W',
                            'SYMBOL_INTL'       => 'W',
                            'SYMBOL_LETTER_INTL' => 'WTT',
                            'IS_DEFAULT'        => 'N',
                        ],
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Measurement unit created with ID ' . $result;
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error creating measurement unit: ' . $e->getMessage();
        }
        
BX24.callMethod(
            "crm.measure.add",
            {
                fields: {
                    "CODE": "212",
                    "MEASURE_TITLE": "Watt",
                    "SYMBOL_RUS": "W",
                    "SYMBOL_INTL": "W",
                    "SYMBOL_LETTER_INTL": "WTT",
                    "IS_DEFAULT": "N"
                }
            },
            function(result)
            {
                if(result.error())
                    console.error(result.error());
                else
                    console.info("Measurement unit created with ID " + result.data());
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'crm.measure.add',
            [
                'fields' =>
                [
                    'CODE' => '212',
                    'MEASURE_TITLE' => 'Watt',
                    'SYMBOL_RUS' => 'W',
                    'SYMBOL_INTL' => 'W',
                    'SYMBOL_LETTER_INTL' => 'WTT',
                    'IS_DEFAULT' => 'N'
                ]
            ]
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        

Continue Learning