For AI agents: markdown of this page — /docs-content-en/entities/warehouses/delete.md documentation index — /llms.txt
Delete a warehouse
DELETE /v1/warehouses/:id
Deletes a warehouse by identifier.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id |
number | Warehouse identifier |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/warehouses/1" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/warehouses/1" \
-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/warehouses/1', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
console.log(res.status) // 204
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/warehouses/1', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
console.log(res.status) // 204
Response fields
On success — status 204 No Content, with an empty response body.
Response example
HTTP/1.1 204 No Content
There is no response body.
Error response example
422 — a warehouse with this id does not exist:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "store does not exist."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_PARAMS |
id is not a positive integer |
| 401 | TOKEN_MISSING |
The API key has no configured tokens |
| 403 | SCOPE_DENIED |
The API key does not have the catalog scope |
| 422 | BITRIX_ERROR |
A warehouse with the specified id does not exist |
The full list of common API errors — Errors.
Known specifics
A nonexistent warehouse is 422, not 404. Deleting a warehouse by an unknown id returns 422 with code BITRIX_ERROR. Deleting an already-deleted warehouse again returns the same error.