For AI agents: markdown of this page — /docs-content-en/entities/delivery-services/delete.md documentation index — /llms.txt
Delete a delivery service
DELETE /v1/delivery-services/:id
Deletes a delivery service by ID from the service list if the user has permission to delete it. Deleted records cannot be restored through the API.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typeinteger | Requiredyes | DescriptionPositive safe integer ID from the delivery service list |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/delivery-services/85" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/delivery-services/85" \
-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/delivery-services/85', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
console.log(success && data === true)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/delivery-services/85', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
console.log(success && data === true)
Response fields
HTTP status: 200 OK.
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata |
Typeboolean | Descriptiontrue confirms deletion |
Response example
{
"success": true,
"data": true
}
Error response example
404 — the service with the specified ID was not found:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Entity not found"
}
}
Errors
| HTTP | error.code |
Description |
|---|---|---|
| HTTP400 | error.codeINVALID_PARAMS |
Descriptionid is not a positive safe integer |
| HTTP404 | error.codeENTITY_NOT_FOUND |
DescriptionThe service with the specified id was not found |
| HTTP422 | error.codeBITRIX_ERROR |
DescriptionBitrix24 rejected or did not confirm deletion. See error.message for the reason |
| HTTP502 | error.codeBITRIX_RESPONSE_INVALID |
DescriptionThe deletion response has an invalid structure |
| HTTP403 | error.codeBITRIX_ACCESS_DENIED |
DescriptionThe user lacks permission to delete the service, the service was created without a REST handler, or it belongs to another OAuth application |
| HTTP401 | error.codeTOKEN_MISSING |
DescriptionThe API key has no configured Bitrix24 credentials |
| HTTP403 | error.codeSCOPE_DENIED |
DescriptionThe API key lacks the delivery scope |
| HTTP403 | error.codeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe API key is in read-only mode |
For the full list of common API errors, see Errors.