Update Product catalog.product.update

Choose a tool for developing with an AI agent:

  • use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
  • use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation

Scope: catalog

Who can execute the method: a user with the "Edit product" permission and one of the following permissions: "View product catalog", "View catalog products", or "Edit selling price"

The catalog.product.update method updates a product in the trade catalog. Fields that are not in the request keep their previous values.

Method Parameters

Required parameters are marked with *

Name
type

Description

id*
catalog_product.id

Product identifier. You can retrieve the identifier using the catalog.product.list method

fields*
object

Object with the product fields to change (detailed description).

If you pass an empty object, the method returns the product unchanged.

The product information block cannot be changed: if you pass a different iblockId, the method returns no error and does not move the product

Parameter fields

Name
type

Description

name
string

Product name. An empty value causes the "Name is not specified" error

active
string

Product activity.

Possible values:

  • Y — active
  • N — inactive

Other values are saved as N

code
string

Symbolic code

xmlId
string

External code

sort
integer

Sorting

createdBy
user.id

Identifier of the user who created the product. You can retrieve the identifier using the user.get method

modifiedBy
user.id

Identifier of the user who modified the product

dateActiveFrom
datetime

Activity start date. Currently the date cannot be set: a string in any format causes the "Incorrect starting date format" error, and a number is ignored. null is accepted

dateActiveTo
datetime

Activity end date. Currently the date cannot be set: a string in any format causes the "Incorrect expiration date format" error, and a number is ignored. null is accepted

dateCreate
datetime

Creation date. The field is filled in automatically, so you do not need to pass it: currently a passed date is saved incorrectly, for example, 2024-05-27T10:00:00+01:00 is saved as 2001-11-30T00:00:00+01:00

iblockSectionId
catalog_section.id

Identifier of the main section. You can retrieve the identifier using the catalog.section.list method.

For a nonexistent section, the method returns the 200040300050 error. To unlink the product from sections, pass 0

iblockSection
catalog_section.id[]

Array of identifiers of the sections to link the product to, for example, [41, 39]. Set the main section in iblockSectionId.

The array replaces the current section links

previewText
string

Preview description

previewTextType
string

Type of the preview description.

Possible values:

  • text — text
  • html — HTML

previewPicture
object

Preview picture. An object in the format {"fileData": ["photo.png", "base64"]}: the first element is the file name with the extension, the second is the file content in Base64 encoding.

To delete the picture, pass {"remove": "Y"}

detailText
string

Detailed description

detailTextType
string

Type of the detailed description.

Possible values:

  • text — text
  • html — HTML

detailPicture
object

Detailed picture. An object in the format {"fileData": ["photo.png", "base64"]}: the first element is the file name with the extension, the second is the file content in Base64 encoding.

To delete the picture, pass {"remove": "Y"}

quantity
double

Available quantity. When inventory management is enabled, the value is not retained: the method returns no error, but the field keeps its previous value

quantityReserved
double

Reserved quantity. When inventory management is enabled, the value is not retained: the method returns no error, but the field keeps its previous value

quantityTrace
string

Quantity accounting mode.

Possible values:

  • Y — enabled
  • N — disabled
  • D — value from the Trade Catalog module settings.

The response returns the resulting value Y or N

canBuyZero
string

Allow purchase when the product is out of stock.

Possible values:

  • Y — yes
  • N — no
  • D — value from the Trade Catalog module settings.

The response returns the resulting value Y or N

subscribe
string

Allow subscription to the product.

Possible values:

  • Y — yes
  • N — no
  • D — value from the Trade Catalog module settings.

The response returns the resulting value Y or N

vatId
catalog_vat.id

VAT rate identifier. You can retrieve the identifier using the catalog.vat.list method.

The method does not check that the rate exists: a nonexistent identifier is saved without an error

vatIncluded
string

VAT is included in the price.

Possible values:

  • Y — yes
  • N — no

purchasingPrice
double

Purchasing price. When inventory management is enabled, the value is not retained: the method returns no error, but the field keeps its previous value

purchasingCurrency
string

Purchasing price currency, for example, EUR. You can retrieve the list of currencies using the crm.currency.list method.

When inventory management is enabled, the value is not retained: the method returns no error, but the field keeps its previous value

barcodeMulti
string

Unique barcode for each item.

Possible values:

  • Y — yes
  • N — no

weight
double

Weight

length
double

Length

width
double

Width

height
double

Height

measure
catalog_measure.id

Unit of measure identifier. You can retrieve the identifier using the catalog.measure.list method.

The method does not check that the unit of measure exists: a nonexistent identifier is saved without an error

recurSchemeLength
integer

Payment period length. Used only in the on-premise version for selling content

recurSchemeType
string

Time unit of the payment period.

Possible values:

  • H — hour
  • D — day
  • W — week
  • M — month
  • Q — quarter
  • S — half-year
  • Y — year.

Used only in the on-premise version for selling content

trialPriceId
integer

Identifier of the product for trial payment. Used only in the on-premise version for selling content

withoutOrder
string

Renewal without placing an order.

Possible values:

  • Y — yes
  • N — no.

Used only in the on-premise version for selling content

propertyN
object|array

Product property value, where N is the property identifier, for example, property301.

Value format:

  • {"valueId": 4083, "value": "value"} — for a single property
  • [{"valueId": 4085, "value": "value 1"}, {"value": "value 2"}] — for a multiple property

valueId is the identifier of the current property value. You can retrieve the identifiers using the catalog.product.get and catalog.product.list methods. If the property has no value yet, pass only value.

Pass a single property value as an object: a string instead of an object clears the property value.

For a multiple property, values without valueId in the request are deleted. The exception is "File" properties: values that are not passed in the request are retained, but their valueId values change.

For a property with the BoolEnum userType, pass Y or N in value.

Changing values of "File" properties is described in the How to Update and Delete Files article

The id, type, available, bundle, and timestampX fields are filled in automatically. The method skips fields that are not in the table without an error.

Working with Product Prices

To change the product price, use the catalog.price.* methods.

Code Examples

How to Use Examples in Documentation

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"id":7651,"fields":{"name":"Basic T-shirt, white","previewText":"Cotton T-shirt, white","detailPicture":{"fileData":["photo.png","iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="]},"property301":{"valueId":4083,"value":"TS-002"},"property305":[{"valueId":4085,"value":"Cotton"},{"value":"Linen"}]}}' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/catalog.product.update
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"id":7651,"fields":{"name":"Basic T-shirt, white","previewText":"Cotton T-shirt, white","detailPicture":{"fileData":["photo.png","iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="]},"property301":{"valueId":4083,"value":"TS-002"},"property305":[{"valueId":4085,"value":"Cotton"},{"value":"Linen"}]},"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/catalog.product.update
        
// 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, ISODate } from '@bitrix24/b24jssdk'
        
        declare const $b24: B24Frame
        
        // Shape of the payload returned in result (match the "response handling" section of the page)
        type ProductResult = {
          element: {
            id: number,
            iblockId: number,
            iblockSectionId: number | null,
            iblockSection: number[] | null,
            name: string,
            code: string | null,
            active: string,
            xmlId: string,
            dateCreate: ISODate,
            timestampX: ISODate,
            previewPicture: { id: string, url: string, urlMachine: string } | null,
            detailPicture: { id: string, url: string, urlMachine: string } | null,
            property301: { value: string, valueId: string } | null,
            property305: Array<{ value: string, valueId: string }> | null,
            [key: string]: unknown,
          }
        }
        
        try {
          const response = await $b24.actions.v2.call.make<ProductResult>({
            method: 'catalog.product.update',
            params: {
              id: 7651,
              fields: {
                name: 'Basic T-shirt, white',
                previewText: 'Cotton T-shirt, white',
                detailPicture: {
                  fileData: ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=='],
                },
                property301: {
                  valueId: 4083,
                  value: 'TS-002',
                },
                property305: [
                  {
                    valueId: 4085,
                    value: 'Cotton',
                  },
                  {
                    value: 'Linen',
                  },
                ],
              },
            },
            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('Updated product id:', result.element.id, 'name:', result.element.name)
          }
        } 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 updateProduct() {
            try {
              // Initialize the SDK inside a Bitrix24 frame
              const $b24 = await B24Js.initializeB24Frame()
        
              const response = await $b24.actions.v2.call.make({
                method: 'catalog.product.update',
                params: {
                  id: 7651,
                  fields: {
                    name: 'Basic T-shirt, white',
                    previewText: 'Cotton T-shirt, white',
                    detailPicture: {
                      fileData: ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=='],
                    },
                    property301: {
                      valueId: 4083,
                      value: 'TS-002',
                    },
                    property305: [
                      {
                        valueId: 4085,
                        value: 'Cotton',
                      },
                      {
                        value: 'Linen',
                      },
                    ],
                  },
                },
                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('Updated product id:', result.element.id, 'name:', result.element.name)
            } catch (error) {
              // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
              console.error(error)
            }
          }
        
          document.addEventListener('DOMContentLoaded', updateProduct)
        </script>
        
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
        
        try:
            bitrix_response = client.catalog.product.update(
                id=7651,
                fields={
                    "name": "Basic T-shirt, white",
                    "previewText": "Cotton T-shirt, white",
                    "detailPicture": {
                        "fileData": ["photo.png", "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="],
                    },
                    "property301": {
                        "valueId": 4083,
                        "value": "TS-002",
                    },
                    "property305": [
                        {
                            "valueId": 4085,
                            "value": "Cotton",
                        },
                        {
                            "value": "Linen",
                        },
                    ],
                },
            ).response
        
            result = bitrix_response.result
            print(result)
        
        except BitrixAPIError as error:
            print(
                "Bitrix API error",
                f"error: {error.error}",
                f"error_description: {error.error_description}",
                sep="\n",
            )
        except BitrixSDKException as error:
            print(f"Bitrix SDK error: {error.message}")
        except Exception as error:
            print(f"Unexpected error: {error}")
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'catalog.product.update',
                    [
                        'id'     => 7651,
                        'fields' => [
                            'name'          => 'Basic T-shirt, white',
                            'previewText'   => 'Cotton T-shirt, white',
                            'detailPicture' => [
                                'fileData' => ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=='],
                            ],
                            'property301'   => [
                                'valueId' => 4083,
                                'value'   => 'TS-002',
                            ],
                            'property305'   => [
                                [
                                    'valueId' => 4085,
                                    'value'   => 'Cotton',
                                ],
                                [
                                    'value' => 'Linen',
                                ],
                            ],
                        ],
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error updating product: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'catalog.product.update',
            {
                'id': 7651,
                'fields': {
                    'name': 'Basic T-shirt, white',
                    'previewText': 'Cotton T-shirt, white',
                    'detailPicture': {
                        'fileData': ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==']
                    },
                    'property301': {
                        'valueId': 4083,
                        'value': 'TS-002'
                    },
                    'property305': [
                        {
                            'valueId': 4085,
                            'value': 'Cotton'
                        },
                        {
                            'value': 'Linen'
                        }
                    ]
                }
            },
            function(result)
            {
                if(result.error())
                    console.error(result.error());
                else
                    console.log(result.data());
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'catalog.product.update',
            [
                'id'     => 7651,
                'fields' => [
                    'name'          => 'Basic T-shirt, white',
                    'previewText'   => 'Cotton T-shirt, white',
                    'detailPicture' => [
                        'fileData' => ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=='],
                    ],
                    'property301'   => [
                        'valueId' => 4083,
                        'value'   => 'TS-002',
                    ],
                    'property305'   => [
                        [
                            'valueId' => 4085,
                            'value'   => 'Cotton',
                        ],
                        [
                            'value' => 'Linen',
                        ],
                    ],
                ],
            ]
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        
// client and ctx are already created — see the Go SDK section
        res, err := client.Core().Call(ctx, "catalog.product.update", b24.Params{
        	"id":     7651,
        	"fields": b24.Params{
        		"name":          "Basic T-shirt, white",
        		"previewText":   "Cotton T-shirt, white",
        		"detailPicture": b24.Params{
        			"fileData": []string{"photo.png", "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="},
        		},
        		"property301":   b24.Params{
        			"valueId": 4083,
        			"value":   "TS-002",
        		},
        		"property305":   []b24.Params{
        			b24.Params{
        				"valueId": 4085,
        				"value":   "Cotton",
        			},
        			b24.Params{
        				"value": "Linen",
        			},
        		},
        	},
        })
        if err != nil {
        	return fmt.Errorf("catalog.product.update: %w", err)
        }
        
        // The method wraps the response in an object with the "element" key.
        raw, ok := b24.Unwrap(res.Result, "element")
        if !ok {
        	return fmt.Errorf("no element key in the response")
        }
        
        var item struct {
        	ID              int    `json:"id"`
        	IblockID        int    `json:"iblockId"`
        	IblockSectionID int    `json:"iblockSectionId"`
        	Name            string `json:"name"`
        	Code            string `json:"code"`
        	Active          string `json:"active"`
        	XMLID           string `json:"xmlId"`
        }
        if err := json.Unmarshal(raw, &item); err != nil {
        	return fmt.Errorf("parse response: %w", err)
        }
        fmt.Println(item.ID, item.Name)
        

Response Handling

HTTP status: 200

{
            "result": {
                "element": {
                    "active": "Y",
                    "available": "Y",
                    "barcodeMulti": "N",
                    "bundle": "N",
                    "canBuyZero": "Y",
                    "code": "tshirt-basic",
                    "createdBy": 1269,
                    "dateActiveFrom": null,
                    "dateActiveTo": null,
                    "dateCreate": "2026-11-05T18:23:16+01:00",
                    "detailPicture": {
                        "id": "40043",
                        "url": "/rest/catalog.product.download?fields%5BfieldName%5D=detailPicture&fields%5BfileId%5D=40043&fields%5BproductId%5D=7651",
                        "urlMachine": "/rest/catalog.product.download?fields%5BfieldName%5D=detailPicture&fields%5BfileId%5D=40043&fields%5BproductId%5D=7651"
                    },
                    "detailText": null,
                    "detailTextType": "text",
                    "height": null,
                    "iblockId": 25,
                    "iblockSection": [
                        39,
                        41
                    ],
                    "iblockSectionId": 41,
                    "id": 7651,
                    "length": null,
                    "measure": 9,
                    "modifiedBy": 1269,
                    "name": "Basic T-shirt, white",
                    "previewPicture": {
                        "id": "40041",
                        "url": "/rest/catalog.product.download?fields%5BfieldName%5D=previewPicture&fields%5BfileId%5D=40041&fields%5BproductId%5D=7651",
                        "urlMachine": "/rest/catalog.product.download?fields%5BfieldName%5D=previewPicture&fields%5BfileId%5D=40041&fields%5BproductId%5D=7651"
                    },
                    "previewText": "Cotton T-shirt, white",
                    "previewTextType": "text",
                    "property301": {
                        "value": "TS-002",
                        "valueId": "4083"
                    },
                    "property305": [
                        {
                            "value": "Cotton",
                            "valueId": "4085"
                        },
                        {
                            "value": "Linen",
                            "valueId": "4089"
                        }
                    ],
                    "purchasingCurrency": null,
                    "purchasingPrice": null,
                    "quantity": null,
                    "quantityReserved": null,
                    "quantityTrace": "Y",
                    "recurSchemeLength": null,
                    "recurSchemeType": "D",
                    "sort": 500,
                    "subscribe": "Y",
                    "timestampX": "2026-11-05T18:23:29+01:00",
                    "trialPriceId": null,
                    "type": 1,
                    "vatId": 1,
                    "vatIncluded": "Y",
                    "weight": 200,
                    "width": null,
                    "withoutOrder": "N",
                    "xmlId": "7651"
                }
            },
            "time": {
                "start": 1793892209,
                "finish": 1793892209.31875,
                "duration": 0.31874990463256836,
                "processing": 0,
                "date_start": "2026-11-05T18:23:29+01:00",
                "date_finish": "2026-11-05T18:23:29+01:00",
                "operating_reset_at": 1793892600,
                "operating": 0.7716009616851807
            }
        }
        

Returned Data

Name
type

Description

result
object

Request result containing the updated product

result.element
catalog_product

Object with information about the updated product

time
time

Information about the request execution time

Error Handling

HTTP status: 400

{
            "error":"200040300010",
            "error_description":"Access Denied"
        }
        

Name
type

Description

error
string

String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only error_description shows the reason

error_description
string

Error message for the developer. Do not show it to the end user without processing

Possible Error Codes

Status

Code

Description

Value

400

200040300043

Access Denied

No permission to edit the information block element

400

200040300050

Access Denied

The section in iblockSectionId was not found, or there is no permission to link the product to the section

400

200040300040

Access Denied

No permission to edit the product

400

200040300010

Access Denied

No permission to view the product catalog

400

200040300000

Iblock Not Found

The product information block was not found

400

100

Could not find value for parameter {id}

The required id parameter was not provided

400

100

Could not find value for parameter {fields}

The required fields parameter was not provided

400

Empty value

product does not exist.

The product with the specified id was not found

400

0

User createdBy is not exists or User modifiedBy is not exists

The user in createdBy or modifiedBy was not found

400

0

Name is not specified.<br>

An empty string was passed in name

400

0

Incorrect starting date format.<br>

A dateActiveFrom value was passed. For dateActiveTo, the error text is Incorrect expiration date format.<br>

400

0

Internal error updating product. Try updating again.

An internal error occurred while saving the product

Validation of the changed fields and product properties can return additional errors that describe a specific field.

Statuses and System Error Codes

HTTP Status: 4xx, 5xx

The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.

Status

Code
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

429

OPERATION_TIME_LIMIT
Method is blocked due to operation time limit

The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit

401

NO_AUTH_FOUND
Wrong authorization data

The request contains no authorization data: neither an access token nor a webhook code was passed

401

INVALID_REQUEST
Https required

Methods are called over the HTTPS protocol only

401

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support

401

ACCESS_DENIED
REST is available only on commercial plans

REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — REST is available only by subscription

401

INVALID_CREDENTIALS
Invalid request credentials

No active webhook with the specified user identifier and secret code was found

404

ERROR_METHOD_NOT_FOUND
Method not found!

No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope

401

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

The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with provided by the access token

401

expired_token
The access token provided has expired

The access token has expired

401

user_access_error
The user does not have access to the application

The application is installed, but the Bitrix24 administrator has granted access to it only to specific users

403

PORTAL_DELETED
Portal was deleted

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

Continue Learning