Category — Mass Delete
Deletes a batch of categories in a single request. Pre-validates the entire batch before touching any row.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/catalog/categories/mass-delete | POST |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
indices | integer[] | yes | Category ids to delete. |
Response
200 OK:
json
{
"deleted": [12, 18],
"message": "Categories deleted successfully."
}Errors
| HTTP | Cause |
|---|---|
400 Bad Request | At least one id is a root or channel root — whole batch refused |
401 Unauthorized | Missing or invalid Bearer token |
Notes
- All-or-nothing semantics. A single non-deletable id rejects the entire batch.
- Unknown ids are silently skipped — they do not appear in
deleted.

