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 |
|---|---|---|
Parameterid |
Typenumber | DescriptionWarehouse identifier. List: GET /v1/warehouses |
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
A successful deletion returns HTTP status 204 No Content with an empty body — check success by the status code.
Response example
HTTP/1.1 204 No Content
Error response example
404 — a warehouse with this id does not exist:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "store does not exist."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
Descriptionid is not a canonical positive integer: 12.5, 12abc, 1e2, 007 are rejected before the Bitrix24 call |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the catalog scope |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionA warehouse with the specified id does not exist |
The full list of common API errors — Errors.
Known specifics
A nonexistent warehouse is 404. Deleting a warehouse by an unknown id returns 404 with code ENTITY_NOT_FOUND. Deleting an already-deleted warehouse again returns the same error.