[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fshipments\u002Fdelete":3,"docs-tabs-entities\u002Fshipments\u002Fdelete":6},{"content":4,"lastmod":5},"## Delete a shipment\n\n`DELETE \u002Fv1\u002Fshipments\u002F:id`\n\nDeletes an online store order shipment by its ID. A deleted shipment cannot be restored via the API; create a new one if needed.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Shipment ID, a non-negative integer. List: [`GET \u002Fv1\u002Fshipments`](.\u002Flist.md) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fshipments\u002F1205\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X DELETE \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fshipments\u002F1205\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fshipments\u002F1205', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nif (res.status === 204) {\n  console.log('Shipment deleted')\n}\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fshipments\u002F1205', {\n  method: 'DELETE',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nif (res.status === 204) {\n  console.log('Shipment deleted')\n}\n```\n\n## Response\n\nOn successful deletion the API returns HTTP status `204 No Content` with an empty body. Success is indicated by the status code, not the content.\n\n## Response example\n\n```http\nHTTP\u002F1.1 204 No Content\n```\n\n## Error response example\n\n422 — the shipment has the \"shipped\" mark:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"The shipment has already been shipped. Cancel the shipment\",\n    \"b24Code\": \"SALE_SHIPMENT_EXIST_SHIPPED\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | The `id` in the path is not a non-negative integer. Error message: `id must be a non-negative integer` |\n| 404 | `ENTITY_NOT_FOUND` | No shipment with this `id` exists, or it has already been deleted. Error message: `shipment is not exists` |\n| 422 | `BITRIX_ERROR` | The shipment has the \"shipped\" mark, and `b24Code` is `SALE_SHIPMENT_EXIST_SHIPPED`. Clear the mark via [`POST \u002Fv1\u002Fshipments\u002F:id\u002Funship`](.\u002Funship.md) |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the deletion for another reason. The reason is in `message` |\n| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no permission to modify orders in Bitrix24 |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode |\n| 403 | `SCOPE_DENIED` | The API key does not have the `sale` scope |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors: [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Clear the \"shipped\" mark](.\u002Funship.md)\n- [Get a shipment](.\u002Fget.md)\n- [Create a shipment](.\u002Fcreate.md)\n- [Shipment items](\u002Fdocs\u002Fentities\u002Fshipment-items)\n- [Shipments](\u002Fdocs\u002Fentities\u002Fshipments)\n","2026-10-07",{},1795415295855]