Skip to content

Category — Mass Delete

Deletes a batch of categories in a single request. Pre-validates the entire batch before touching any row.

Endpoint

EndpointMethod
/api/admin/catalog/categories/mass-deletePOST

Request body

FieldTypeRequiredNotes
indicesinteger[]yesCategory ids to delete.

Response

200 OK:

json
{
  "deleted": [12, 18],
  "message": "Categories deleted successfully."
}

Errors

HTTPCause
400 Bad RequestAt least one id is a root or channel root — whole batch refused
401 UnauthorizedMissing 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.

Released under the MIT License.