Skip to main content

bulkDeleteProducts

Requires permission products:product:delete.

Soft-delete a validated set of products (explicit ids, or all-matching-filter with expectedTotal). ≤50 runs inline; larger targets run as a background job — poll productBulkOperation.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation BulkDeleteProducts($target: ProductBulkTargetInput!) {
bulkDeleteProducts(target: $target) {
id
status
type
createdAt
error
failed
failures {
id
code
name
message
sku
}
}
}

Variables:

{
"target": {}
}

Response:

{
"data": {
"bulkDeleteProducts": {
"id": "id",
"status": "COMPLETED",
"type": "PRODUCT_BULK_DELETE",
"createdAt": "2025-01-15T00:00:00Z",
"error": "string",
"failed": 0,
"failures": [
{
"id": "id",
"code": "string",
"name": "string",
"message": "string",
"sku": "string"
}
]
}
}
}
bulkDeleteProducts(
target: ProductBulkTargetInput!
): ProductBulkOperation!

Arguments​

bulkDeleteProducts.target ● ProductBulkTargetInput! non-null input​

Which products to delete.

Type​

ProductBulkOperation object​

A bulk product delete and how far it has got.