For AI agents: markdown of this page — /docs-content-en/entities/product-sections/delete.md documentation index — /llms.txt

Delete section

DELETE /v1/product-sections/:id

Deletes a product catalog section by identifier. A deleted section cannot be restored via the API — create a new one if needed.

Parameters

Parameter Type Required Description
id (path) number yes Section identifier

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/product-sections/197" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/product-sections/197" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/product-sections/197', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

if (res.status === 204) {
  console.log('Section deleted')
}

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/product-sections/197', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

if (res.status === 204) {
  console.log('Section deleted')
}

Response

On successful deletion, HTTP status 204 No Content is returned with an empty body. The success indicator is the response code, not the content.

Response example

http
HTTP/1.1 204 No Content

Error response example

404 — section not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Product section is not found."
  }
}

Errors

HTTP Code Description
404 ENTITY_NOT_FOUND A section with the specified id does not exist
403 SCOPE_DENIED Key is missing the crm scope
401 MISSING_API_KEY The X-Api-Key header was not provided

Full list of common API errors — Errors.

See also