Skip to content

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

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

Request body

FieldTypeRequiredNotes
indicesint[]yesNon-empty array of product IDs. Non-existent IDs are silently skipped.

Response

200 OK

FieldTypeNotes
deletedint[]IDs that were processed (echoes the request — non-existent IDs are still listed)
messagestringTranslated confirmation

Errors

HTTPCause
400 Bad RequestEmpty / malformed indices
401 UnauthorizedMissing or invalid admin Bearer token
403 ForbiddenAdmin role lacks catalog.products.delete
500 Internal Server ErrorUnderlying delete threw — matches monolith best-effort behaviour

Notes

  • Mirrors the monolith best-effort semantics — the call does not short-circuit on a missing or invalid ID.
  • For configurable products, variants cascade automatically through the core repository.

Released under the MIT License.