Update Service Fields catalog.product.service.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:
catalogWho can execute the method: a user with the "Edit product" access permission, one of the "View product catalog", "View catalog products", or "Edit selling price" access permissions, and the permission to edit elements of the catalog information block
The catalog.product.service.update method updates the service fields.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
Identifier of the service. You can retrieve the identifier using the catalog.product.service.list method. The method does not check the element type: if you pass the identifier of a product, the method updates its fields and returns |
|
|
fields* |
Object with the service fields to update (detailed description). If you pass an empty object, the method returns the service unchanged |
Parameter fields
|
Name |
Description |
|
name |
Service name. An empty value causes the "Name is not specified" error |
|
active |
Service activity. Possible values:
Other values are saved as |
|
code |
Symbolic code |
|
xmlId |
External code |
|
sort |
Sort order |
|
createdBy |
Identifier of the user who created the service. You can retrieve the identifier using the user.get method |
|
modifiedBy |
Identifier of the user who modified the service |
|
dateActiveFrom |
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. |
|
dateActiveTo |
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. |
|
dateCreate |
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 |
|
iblockSectionId |
Identifier of the main section. You can retrieve the identifier using the catalog.section.list method. For a nonexistent section, the method returns the |
|
iblockSection |
Array of identifiers of the sections to link the service to, for example The array replaces the current section links |
|
measure |
Identifier of the unit of measurement. You can retrieve the identifier using the catalog.measure.list method. The method does not check that the unit of measurement exists: a nonexistent identifier is saved without an error |
|
previewText |
Preview description |
|
previewTextType |
Type of the preview description. Possible values:
|
|
previewPicture |
Preview picture. An object in the format To delete the picture, pass |
|
detailText |
Detailed description |
|
detailTextType |
Type of the detailed description. Possible values:
|
|
detailPicture |
Detailed picture. An object in the format To delete the picture, pass |
|
vatId |
Identifier of the VAT rate. 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 |
Whether VAT is included in the price. Possible values:
|
|
propertyN |
Value of the service property, where The value of a single property is an object If |
Working with Service Prices
To change the service 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":7697,"fields":{"name":"Air conditioner installation with an on-site visit","previewText":"Split system installation with a technician visit","detailPicture":{"fileData":["photo.png","iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="]},"property301":{"valueId":4159,"value":"SRV-AC-03"},"property305":[{"valueId":4161,"value":"Technician visit"},{"value":"Removal of the old unit"}]}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/catalog.product.service.update
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"id":7697,"fields":{"name":"Air conditioner installation with an on-site visit","previewText":"Split system installation with a technician visit","detailPicture":{"fileData":["photo.png","iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="]},"property301":{"valueId":4159,"value":"SRV-AC-03"},"property305":[{"valueId":4161,"value":"Technician visit"},{"value":"Removal of the old unit"}]},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/catalog.product.service.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 ServiceResult = {
service: {
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<ServiceResult>({
method: 'catalog.product.service.update',
params: {
id: 7697,
fields: {
name: 'Air conditioner installation with an on-site visit',
previewText: 'Split system installation with a technician visit',
detailPicture: {
fileData: ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=='],
},
property301: {
valueId: 4159,
value: 'SRV-AC-03',
},
property305: [
{
valueId: 4161,
value: 'Technician visit',
},
{
value: 'Removal of the old unit',
},
],
},
},
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 service id:', result.service.id, 'name:', result.service.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 updateService() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v2.call.make({
method: 'catalog.product.service.update',
params: {
id: 7697,
fields: {
name: 'Air conditioner installation with an on-site visit',
previewText: 'Split system installation with a technician visit',
detailPicture: {
fileData: ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=='],
},
property301: {
valueId: 4159,
value: 'SRV-AC-03',
},
property305: [
{
valueId: 4161,
value: 'Technician visit',
},
{
value: 'Removal of the old unit',
},
],
},
},
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 service id:', result.service.id, 'name:', result.service.name)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', updateService)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.catalog.product.service.update(
id=7697,
fields={
"name": "Air conditioner installation with an on-site visit",
"previewText": "Split system installation with a technician visit",
"detailPicture": {
"fileData": ["photo.png", "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="],
},
"property301": {
"valueId": 4159,
"value": "SRV-AC-03",
},
"property305": [
{
"valueId": 4161,
"value": "Technician visit",
},
{
"value": "Removal of the old unit",
},
],
},
).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.service.update',
[
'id' => 7697,
'fields' => [
'name' => 'Air conditioner installation with an on-site visit',
'previewText' => 'Split system installation with a technician visit',
'detailPicture' => [
'fileData' => ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=='],
],
'property301' => [
'valueId' => 4159,
'value' => 'SRV-AC-03',
],
'property305' => [
[
'valueId' => 4161,
'value' => 'Technician visit',
],
[
'value' => 'Removal of the old unit',
],
],
],
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error updating service: ' . $e->getMessage();
}
BX24.callMethod(
'catalog.product.service.update',
{
'id': 7697,
'fields': {
'name': 'Air conditioner installation with an on-site visit',
'previewText': 'Split system installation with a technician visit',
'detailPicture': {
'fileData': ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==']
},
'property301': {
'valueId': 4159,
'value': 'SRV-AC-03'
},
'property305': [
{
'valueId': 4161,
'value': 'Technician visit'
},
{
'value': 'Removal of the old unit'
}
]
}
},
function(result)
{
if(result.error())
console.error(result.error());
else
console.log(result.data());
}
);
require_once('crest.php');
$result = CRest::call(
'catalog.product.service.update',
[
'id' => 7697,
'fields' => [
'name' => 'Air conditioner installation with an on-site visit',
'previewText' => 'Split system installation with a technician visit',
'detailPicture' => [
'fileData' => ['photo.png', 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=='],
],
'property301' => [
'valueId' => 4159,
'value' => 'SRV-AC-03',
],
'property305' => [
[
'valueId' => 4161,
'value' => 'Technician visit',
],
[
'value' => 'Removal of the old unit',
],
],
],
]
);
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.service.update", b24.Params{
"id": 7697,
"fields": b24.Params{
"name": "Air conditioner installation with an on-site visit",
"previewText": "Split system installation with a technician visit",
"detailPicture": b24.Params{
"fileData": []string{"photo.png", "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="},
},
"property301": b24.Params{
"valueId": 4159,
"value": "SRV-AC-03",
},
"property305": []b24.Params{
b24.Params{
"valueId": 4161,
"value": "Technician visit",
},
b24.Params{
"value": "Removal of the old unit",
},
},
},
})
if err != nil {
return fmt.Errorf("catalog.product.service.update: %w", err)
}
// The method wraps the response in an object with the "service" key.
raw, ok := b24.Unwrap(res.Result, "service")
if !ok {
return fmt.Errorf("no service 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": {
"service": {
"active": "Y",
"available": "N",
"bundle": "N",
"code": null,
"createdBy": 1269,
"dateActiveFrom": null,
"dateActiveTo": null,
"dateCreate": "2026-11-06T14:21:47+01:00",
"detailPicture": {
"id": "40065",
"url": "/rest/catalog.product.download?fields%5BfieldName%5D=detailPicture&fields%5BfileId%5D=40065&fields%5BproductId%5D=7697",
"urlMachine": "/rest/catalog.product.download?fields%5BfieldName%5D=detailPicture&fields%5BfileId%5D=40065&fields%5BproductId%5D=7697"
},
"detailText": null,
"detailTextType": "text",
"iblockId": 25,
"iblockSection": null,
"iblockSectionId": null,
"id": 7697,
"measure": null,
"modifiedBy": 1269,
"name": "Air conditioner installation with an on-site visit",
"previewPicture": null,
"previewText": "Split system installation with a technician visit",
"previewTextType": "text",
"property301": {
"value": "SRV-AC-03",
"valueId": "4159"
},
"property303": null,
"property305": [
{
"value": "Technician visit",
"valueId": "4161"
},
{
"value": "Removal of the old unit",
"valueId": "4163"
}
],
"sort": 500,
"timestampX": "2026-11-06T14:21:59+01:00",
"type": 7,
"vatId": null,
"vatIncluded": "N",
"xmlId": "7697"
}
},
"time": {
"start": 1793964118,
"finish": 1793964119.417712,
"duration": 1.4177119731903076,
"processing": 0,
"date_start": "2026-11-06T14:21:58+01:00",
"date_finish": "2026-11-06T14:21:59+01:00",
"operating_reset_at": 1793964660,
"operating": 0.6042139530181885
}
}
Returned Data
|
Name |
Description |
|
result |
Root element of the response |
|
result.service |
Object with the service fields after the update. Empty fields are returned as The response contains all information block properties as |
|
time |
Information about the request execution time |
Error Handling
HTTP status: 400
{
"error":"200040300010",
"error_description":"Access denied"
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Status |
Code |
Description |
Value |
|
|
|
Access Denied |
The user has none of the "View product catalog", "View catalog products", or "Edit selling price" access permissions |
|
|
|
Access Denied |
The user does not have the "Edit product" access permission |
|
|
|
Access Denied |
The user does not have the permission to edit elements of the catalog information block |
|
|
|
Access Denied |
The |
|
|
Empty value |
service does not exist. |
There is no service with the specified |
|
|
|
Could not find value for parameter |
The |
|
|
|
Could not find value for parameter |
The |
|
|
|
Invalid value {abc} to match with parameter {fields}. Should be value of type array. |
|
|
|
|
productType is not allowed for this catalog |
|
|
|
|
Incorrect starting date format. |
|
|
|
|
Incorrect expiration date format. |
|
|
|
|
Name is not specified. |
|
|
|
|
User createdBy is not exists |
The |
|
|
|
User modifiedBy is not exists |
The |
|
|
|
Wrong format of field |
The field contains an array or an object instead of a value. The text names the 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 |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
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 |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
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 — |
|
|
|
No active webhook with the specified user identifier and secret code was 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 |
|
|
|
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 |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
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
- Add Service catalog.product.service.add
- Get Service Field Values catalog.product.service.get
- Get List of Services catalog.product.service.list
- Delete Service catalog.product.service.delete
- Download Service Files catalog.product.service.download
- Get Service Fields by Filter catalog.product.service.getFieldsByFilter