For AI agents: markdown of this page — /docs-content-en/entities/order-statuses/delete.md documentation index — /llms.txt
Delete order status
DELETE /v1/order-statuses/:id
Deletes an order or delivery status by character code. A deleted status cannot be restored through the API — create a new one if needed.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
id (path) |
string | yes | Status character code |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/order-statuses/DT" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/order-statuses/DT" \
-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/order-statuses/DT', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
if (res.status === 204) {
console.log('Status deleted')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/order-statuses/DT', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
if (res.status === 204) {
console.log('Status deleted')
}
Response
On successful deletion, HTTP status 204 No Content is returned with an empty body — success is checked by the status.
Response example
HTTP/1.1 204 No Content
Error response example
422 — status not found:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "status is not exists"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 422 | BITRIX_ERROR |
A status with this id was not found or already deleted |
| 403 | SCOPE_DENIED |
The API key does not have the sale scope |
| 401 | TOKEN_MISSING |
The API key has no configured tokens |
Full list of general API errors — Errors.
Known specifics
Orders referencing a deleted status keep working. When a status is deleted, orders with this statusId do not change — the orders.statusId field keeps the old value. In the Bitrix24 account interface such an order is shown with an empty status name. To migrate — before deleting the status, run PATCH /v1/orders/:id for all affected orders.
Standard statuses are deleted by the same request. Default statuses (N, P, F, D and others) are not system statuses for Bitrix24 — you can delete them with the same DELETE /v1/order-statuses/:id as custom ones. Before deleting, make sure they are not used in existing orders.