catalog.productProperty.update
Изменить свойство товаров или вариаций
Описание
Метод catalog.productProperty.update изменяет поля свойства товара или вариации.
Параметры
id
catalog_product_property.id
обязательный
Идентификатор свойства.
Идентификаторы свойств можно получить методом catalog.productProperty.list
fields
object
обязательный
Набор полей для обновления свойства (подробное описание)
Параметр fields
iblockId
catalog_catalog.id
обязательный
Идентификатор торгового каталога.
Идентификаторы можно получить методом catalog.catalog.list
name
string
необязательный
Название свойства
propertyType
string
необязательный
Базовый тип свойства. Изменять нельзя
active
char
необязательный
Признак активности. Допустимые значения:
- Y — да
- N — нет
sort
integer
необязательный
Индекс сортировки
code
string
необязательный
Символьный код свойства. Код свойства может состоять из латинских символов, цифр и знака подчеркивания. Первый символ не может быть цифрой
defaultValue
text
необязательный
Значение свойства по умолчанию
userType
string
необязательный
Пользовательский тип свойства. Изменять нельзя
rowCount
integer
необязательный
Число строк поля ввода
colCount
integer
необязательный
Число колонок поля ввода
listType
char
необязательный
Внешний вид списка. Допустимые значения:
- L — выпадающий список
- C — набор флажков
multiple
char
необязательный
Признак множественного значения. Допустимые значения:
- Y — да
- N — нет
xmlId
string
необязательный
Внешний идентификатор свойства
fileType
string
необязательный
Список расширений файлов для свойства типа F
multipleCnt
integer
необязательный
Число полей для ввода множественных значений
linkIblockId
catalog_catalog.id
необязательный
Идентификатор связанного инфоблока.
Доступные идентификаторы можно получить методом catalog.catalog.list
withDescription
char
необязательный
Признак хранения описания значения. Допустимые значения:
- Y — да
- N — нет
searchable
char
необязательный
Признак участия в поиске. Допустимые значения:
- Y — да
- N — нет
filtrable
char
необязательный
Признак участия в фильтрации. Допустимые значения:
- Y — да
- N — нет
isRequired
char
необязательный
Признак обязательного значения. Допустимые значения:
- Y — да
- N — нет
hint
string
необязательный
Подсказка к полю
userTypeSettings
object
необязательный
Настройки пользовательского типа. Поддерживаются только скалярные значения и вложенные объекты из скалярных значений.
Если указан userType, но не указан userTypeSettings, настройки не валидируются методом дополнительно
Примеры запроса
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"id":115,"fields":{"iblockId":19,"name":"Размер","propertyType":"L","isRequired":"Y","active":"Y"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/catalog.productProperty.update
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"id":115,"fields":{"iblockId":19,"name":"Размер","propertyType":"L","isRequired":"Y","active":"Y"},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/catalog.productProperty.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 ProductPropertyUpdateResult = {
productProperty: {
active: 'Y' | 'N'
code: string | null
colCount: number
defaultValue: string | null
fileType: string | null
filtrable: 'Y' | 'N'
hint: string | null
iblockId: number
id: number
isRequired: 'Y' | 'N'
linkIblockId: number | null
listType: string | null
multiple: 'Y' | 'N'
multipleCnt: number | null
name: string
propertyType: string
rowCount: number
searchable: 'Y' | 'N'
sort: number
timestampX: ISODate
userType: string | null
userTypeSettings: Record<string, unknown> | null
withDescription: 'Y' | 'N' | null
xmlId: string | null
}
}
try {
const response = await $b24.actions.v2.call.make<ProductPropertyUpdateResult>({
method: 'catalog.productProperty.update',
params: {
id: 115,
fields: {
iblockId: 19,
name: 'Size',
propertyType: 'L',
isRequired: 'Y',
active: 'Y',
},
},
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(result.productProperty.id, result.productProperty.name, result.productProperty.active)
}
} 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 updateProductProperty() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v2.call.make({
method: 'catalog.productProperty.update',
params: {
id: 115,
fields: {
iblockId: 19,
name: 'Size',
propertyType: 'L',
isRequired: 'Y',
active: 'Y',
},
},
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(result.productProperty.id, result.productProperty.name, result.productProperty.active)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', updateProductProperty)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.catalog.product_property.update(
bitrix_id=115,
fields={
"iblockId": 19,
"name": "Размер",
"propertyType": "L",
"active": "Y",
},
).response
result = bitrix_response.result
print(result)
except BitrixAPIError as error:
print(
"Ошибка Bitrix API",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Ошибка Bitrix SDK: {error.message}")
except Exception as error:
print(f"Непредвиденная ошибка: {error}")
try {
$response = $b24Service
->core
->call(
'catalog.productProperty.update',
[
'id' => 115,
'fields' => [
'iblockId' => 19,
'name' => 'Размер',
'propertyType' => 'L',
'isRequired' => 'Y',
'active' => 'Y',
]
]
);
print_r($response->getResponseData()->getResult());
} catch (\Throwable $exception) {
echo $exception->getMessage();
}
BX24.callMethod(
'catalog.productProperty.update',
{
id: 115,
fields: {
iblockId: 19,
name: 'Размер',
propertyType: 'L',
isRequired: 'Y',
active: 'Y'
}
},
function(result) {
if (result.error()) {
console.error(result.error());
} else {
console.log(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'catalog.productProperty.update',
[
'id' => 115,
'fields' => [
'iblockId' => 19,
'name' => 'Размер',
'propertyType' => 'L',
'isRequired' => 'Y',
'active' => 'Y',
]
]
);
print_r($result);
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "catalog.productProperty.update", b24.Params{
"id": 115,
"fields": b24.Params{
"iblockId": 19,
"name": "Размер",
"propertyType": "L",
"isRequired": "Y",
"active": "Y",
},
})
if err != nil {
return fmt.Errorf("catalog.productProperty.update: %w", err)
}
// Метод заворачивает ответ в объект с ключом "productProperty".
raw, ok := b24.Unwrap(res.Result, "productProperty")
if !ok {
return fmt.Errorf("в ответе нет ключа productProperty")
}
var item struct {
Active string `json:"active"`
ColCount int `json:"colCount"`
Filtrable string `json:"filtrable"`
IblockID b24.ID `json:"iblockId"`
ID b24.ID `json:"id"`
Name string `json:"name"`
}
if err := json.Unmarshal(raw, &item); err != nil {
return fmt.Errorf("разбор ответа: %w", err)
}
fmt.Println(item.Active, item.ColCount)
Ответ
HTTP-статус: 200
{
"result": {
"productProperty": {
"active": "Y",
"code": null,
"colCount": 30,
"defaultValue": null,
"fileType": null,
"filtrable": "Y",
"hint": null,
"iblockId": 19,
"id": 115,
"name": "Размер",
"isRequired": "Y",
"linkIblockId": null,
"listType": "L",
"multiple": "N",
"multipleCnt": null,
"propertyType": "L",
"rowCount": 1,
"searchable": "N",
"sort": 500,
"timestampX": "2026-03-19T20:46:43+03:00",
"userType": null,
"userTypeSettings": null,
"withDescription": null,
"xmlId": null
}
},
"time": {
"start": 1773946003,
"finish": 1773946003.953583,
"duration": 0.9535830020904541,
"processing": 0,
"date_start": "2026-03-19T21:46:43+03:00",
"date_finish": "2026-03-19T21:46:43+03:00",
"operating_reset_at": 1773946603,
"operating": 0
}
}
Возвращаемые данные
result
object
Корневой объект ответа
productProperty
catalog_product_property
Объект с информацией об обновленном свойстве
time
time
Информация о времени выполнения запроса
Обработка ошибок
HTTP-статус: 400
{
"error": "0",
"error_description": "Required fields: iblockId"
}
| Код | Описание | Значение |
|---|---|---|
400 |
0 |
Required fields: iblockId |
400 |
0 |
Access Denied |
400 |
Пустое значение | productProperty does not exist |
400 |
0 |
The specified property does not belong to a product catalog |
400 |
0 |
Invalid property type specified |
400 |
0 |
Invalid custom property type settings specified |
400 |
0 |
Код свойства не может начинаться с цифры |
400 |
0 |
Неверный код информационного блока |
400 |
100 |
Invalid value {...} to match with parameter {id}. Should be value of type int |
400 |
0 |
Wrong format of field ... |
400 |
0 |
Error updating product property |

