For AI agents: markdown of this page — /docs-content-en/entities/shipment-items/delete.md documentation index — /llms.txt
Delete a shipment item
DELETE /v1/shipment-items/:id
Deletes an item from an online store order shipment by ID. A deleted shipment item cannot be restored through the API — create a new one if needed.
Where the quantity of the deleted item is returned is described in Shipment items.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id (path) |
number | yes | Shipment item ID, a non-negative integer. List: GET /v1/shipment-items |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/shipment-items/1353" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/shipment-items/1353" \
-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/shipment-items/1353', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
if (res.status === 204) {
console.log('Shipment item deleted')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/shipment-items/1353', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
if (res.status === 204) {
console.log('Shipment item deleted')
}
Response
On successful deletion, the API returns HTTP status 204 No Content with an empty body. Success is indicated by the status code, not by the body.
Response example
HTTP/1.1 204 No Content
Error response example
404 — no shipment item with this id exists, or it has already been deleted:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "shipment item is not exists"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_PARAMS |
id in the path is not a non-negative integer. Error text — id must be a non-negative integer |
| 404 | ENTITY_NOT_FOUND |
No shipment item with this id exists, or it has already been deleted. Error text — shipment item is not exists |
| 422 | BITRIX_ERROR |
Bitrix24 rejected the deletion. The reason is in message |
| 403 | BITRIX_ACCESS_DENIED |
The key's user has no permission to modify orders in Bitrix24 |
| 403 | WRITE_BLOCKED_READONLY_KEY |
The key is in read-only mode |
| 403 | SCOPE_DENIED |
The API key does not have the sale scope |
| 403 | MANAGEMENT_KEY_NO_ENTITY_ACCESS |
The request was made with a management key. Entities require an application key or a personal key with the sale scope |
| 401 | MISSING_API_KEY |
The X-Api-Key header is missing |
| 401 | INVALID_API_KEY |
The provided API key was not found |
| 401 | TOKEN_MISSING |
The API key has no configured tokens |
Full list of common API errors — Errors.