For AI agents: markdown of this page — /docs-content-en/entities/catalog-sections/update.md documentation index — /llms.txt
Update a section
PATCH /v1/catalog-sections/:id
Modifies an existing catalog section. Fields are passed flat at the root of the JSON. Send only the fields you want to change — the rest keep their current values.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionSection identifier |
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
Fieldname |
Typestring | Requiredno | DescriptionSection name |
FieldiblockSectionId |
Typenumber | Requiredno | DescriptionParent section ID. 0 moves the section to the top level. List: GET /v1/catalog-sections |
Fieldcode |
Typestring | Requiredno | DescriptionSection symbolic code |
FieldxmlId |
Typestring | Requiredno | DescriptionExternal identifier |
Fieldsort |
Typenumber | Requiredno | DescriptionSort index |
Fieldactive |
Typeboolean | Requiredno | DescriptionWhether the section is active |
Fielddescription |
Typestring | Requiredno | DescriptionSection description |
FieldiblockId |
Typenumber | Requiredno | DescriptionCatalog ID. Filled in automatically from the current record if not passed. List: GET /v1/catalogs |
id is passed in the path (/v1/catalog-sections/:id); it cannot be passed in the body — it is read-only. Bitrix24 requires the iblockId and name fields on every change, so when they are absent from the body they are taken from the current record — passing a single changed field is enough.
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/catalog-sections/215" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sort": 200
}'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/catalog-sections/215" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sort": 200
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-sections/215', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
sort: 200,
}),
})
const { success, data } = await res.json()
console.log('New sort order:', data.sort)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-sections/215', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
sort: 200,
}),
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionFull updated section object |
Fielddata.id |
Typenumber | DescriptionSection identifier |
Fielddata.iblockId |
Typenumber | DescriptionCatalog ID. List: GET /v1/catalogs |
Fielddata.iblockSectionId |
Typenumber | null | DescriptionParent section ID. null — top-level section. List: GET /v1/catalog-sections |
Fielddata.name |
Typestring | DescriptionSection name |
Fielddata.code |
Typestring | null | DescriptionSection symbolic code |
Fielddata.xmlId |
Typestring | null | DescriptionExternal identifier |
Fielddata.sort |
Typenumber | DescriptionSort index |
Fielddata.active |
Typeboolean | DescriptionWhether the section is active |
Fielddata.description |
Typestring | null | DescriptionSection description |
Fielddata.descriptionType |
Typestring | DescriptionDescription format: text or html |
Response example
{
"success": true,
"data": {
"active": true,
"code": null,
"description": null,
"descriptionType": "text",
"iblockId": 25,
"iblockSectionId": null,
"id": 215,
"name": "New arrivals",
"sort": 200,
"xmlId": null
}
}
Error response example
422 — a section with the given id does not exist:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "Required fields: iblockId"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP422 | CodeBITRIX_ERROR |
DescriptionA section with the given id does not exist — iblockId cannot be filled in from the current record, so Bitrix24 responds with Required fields: iblockId |
| HTTP400 | CodeREADONLY_FIELD |
Descriptionid was passed in the body — this field is filled in by the system and is not accepted on update |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key is missing the catalog scope |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionX-Api-Key was not passed |
Full list of common API errors — Errors.