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

Delete a service

DELETE /v1/catalog-services/:id

Deletes a catalog service by ID. A deleted service cannot be restored through the API — create a new one if needed.

Parameters

Parameter Type Required Description
id (path) number yes Service ID. List: GET /v1/catalog-services

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-services/7235" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-services/7235" \
  -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/catalog-services/7235', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

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

JavaScript — OAuth application

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

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

Response

A successful deletion returns HTTP status 204 No Content with an empty body — check the status code to confirm success.

Response example

http
HTTP/1.1 204 No Content

Error response example

404 — no service with the given id:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "service does not exist."
  }
}

Errors

HTTP Code Description
404 ENTITY_NOT_FOUND No record with the given id exists, including on a repeated deletion, or the record is not a service — for example, a regular catalog product (service does not exist.). The record is not deleted in that case
403 SCOPE_DENIED The key does not have the catalog scope
401 MISSING_API_KEY The X-Api-Key header was not passed

Full list of common API errors — Errors.

See also