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 |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionShipment 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 |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
Descriptionid in the path is not a non-negative integer. Error text — id must be a non-negative integer |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionNo shipment item with this id exists, or it has already been deleted. Error text — shipment item is not exists |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 rejected the deletion. The reason is in message |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionThe key's user has no permission to modify orders in Bitrix24 |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is in read-only mode |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the sale scope |
| HTTP403 | CodeMANAGEMENT_KEY_NO_ENTITY_ACCESS |
DescriptionThe request was made with a management key. Entities require an application key or a personal key with the sale scope |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is missing |
| HTTP401 | CodeINVALID_API_KEY |
DescriptionThe provided API key was not found |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
Full list of common API errors — Errors.