For AI agents: markdown of this page — /docs-content-en/entities/catalog-measures/delete.md documentation index — /llms.txt
Delete a unit of measure
DELETE /v1/catalog-measures/:id
Deletes a commercial catalog unit of measure by its identifier. A deleted record cannot be restored through the API. Create a new one if needed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id (path) |
number | yes | Unit of measure identifier, a non-negative integer. List: GET /v1/catalog-measures |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-measures/17" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-measures/17" \
-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-measures/17', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
if (res.status === 204) {
console.log('Unit of measure deleted')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-measures/17', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
if (res.status === 204) {
console.log('Unit of measure deleted')
}
Response
A successful deletion returns HTTP status 204 No Content 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 unit of measure with this id exists, for example when the same unit is deleted twice:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "measure does not exist."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 404 | ENTITY_NOT_FOUND |
No unit of measure with this id exists on the Bitrix24 account, including one already deleted |
| 400 | INVALID_PARAMS |
id is not a non-negative integer, for example abc. The request is rejected before execution, and no data on the Bitrix24 account changes |
| 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 missing |
Full list of common API errors — Errors.