Catalog Products — Mass Delete
Deletes a batch of catalog products in a single call. Mirrors Catalog → Products → Mass Delete in the Bagisto admin panel.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/catalog/products/mass-delete | POST |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
indices | int[] | yes | Non-empty array of product IDs. Non-existent IDs are silently skipped. |
Response
200 OK
| Field | Type | Notes |
|---|---|---|
id | integer | Always 1. This is an action result, not a record — ignore it. |
deleted | int[] | The ids that were actually removed. |
message | string | Translated confirmation. |
deleted is not an echo of indices. Ids that do not exist are dropped silently, so sending [1403, 999999] returns deleted: [1403]. Compare the two lists to find out what was skipped — nothing else reports it.
Behaviour
- Best effort, no transaction. The batch does not roll back if one id fails partway through; ids processed before the failure stay deleted.
- Configurable variants cascade with their parent, so a parent id can remove more rows than you listed.
- Order history is unaffected — order items keep their product snapshot.
Errors
| HTTP | Detail |
|---|---|
400 | The indices field is required and must be a non-empty array. |
401 | Unauthenticated. |
403 | You do not have permission to manage products. — token lacks catalog.products.delete |
Note the validation failures here are 400, not the 422 used by the single-product create and update endpoints.

