For AI agents: markdown of this page — /docs-content-en/entities/catalog-documents/delete.md documentation index — /llms.txt
Delete an inventory document
DELETE /v1/catalog-documents/:id
Deletes an inventory document that is not conducted. A deleted document cannot be restored through the API — create a new one if needed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id (path) |
number | yes | Document ID. List: GET /v1/catalog-documents |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-documents/301" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-documents/301" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-documents/301', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
if (res.status === 204) {
console.log('Document deleted')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-documents/301', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
if (res.status === 204) {
console.log('Document deleted')
}
Response
On successful deletion, HTTP status 204 No Content is returned with an empty body. Success is indicated by the status code, not the body.
Response example
HTTP/1.1 204 No Content
Error response example
404 — no document with this id:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Document not found."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 404 | ENTITY_NOT_FOUND |
No document with this id, including when the document has already been deleted |
| 422 | BITRIX_ERROR |
The document is conducted — message A conducted document cannot be deleted. Cancel conducting first |
| 400 | INVALID_PARAMS |
id in the path is not a non-negative integer |
| 403 | WRITE_BLOCKED_READONLY_KEY |
The key works in read-only mode |
| 403 | SCOPE_DENIED |
The API key does not have the catalog scope |
| 401 | TOKEN_MISSING |
The API key has no configured tokens |
| 401 | MISSING_API_KEY |
The X-Api-Key header is not passed |
| 401 | INVALID_API_KEY |
The passed API key is not found |
Full list of common API errors — Errors.