Skip to content

Catalog Products — Mass Delete

Equivalent to POST /api/admin/catalog/products/mass-delete.

Operation

OperationType
createAdminCatalogProductMassDeleteMutation

Input

FieldTypeRequiredNotes
indicesIterableYesNon-empty list of product ids.

Payload Fields

FieldTypeDescription
_idIntAlways 1. This is an action result, not a record — ignore it.
deletedIterableThe ids that were actually removed.
messageStringTranslated 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.

Select _id, not id. This is a routeless action result, so its id is not a queryable path.

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

MessageCause
The indices field is required and must be a non-empty array.Missing or empty indices
You do not have permission to manage products.Token lacks catalog.products.delete

Released under the MIT License.