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

Delete an inventory document item

DELETE /v1/catalog-document-elements/:id

Deletes an item from an inventory document by its ID. A deleted item cannot be restored through the API — create a new one if needed.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionItem ID. List: GET /v1/catalog-document-elements

Examples

curl — personal key

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

curl — OAuth application

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

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

JavaScript — OAuth application

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

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

Response

On successful deletion the API returns HTTP status 204 No Content with an empty body. Success is indicated by the status code, not by the content.

Response example

http
HTTP/1.1 204 No Content

Error response example

404 — no item with the given id:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Document not found"
  }
}

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo item with the given id, including on a repeated deletion. Message — Document not found
HTTP422 CodeBITRIX_ERROR DescriptionThe item's document is conducted. Message Conducted document, b24Code — ERROR_DOCUMENT_STATUS. First cancel conducting
HTTP400 CodeINVALID_PARAMS Descriptionid in the path is not a non-negative integer
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key works in read-only mode
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the catalog scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was not passed
HTTP401 CodeINVALID_API_KEY DescriptionThe passed API key was not found

Full list of common API errors — Errors.

See also