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:
- GraphQL
- cURL
mutation BulkDeleteProducts($target: ProductBulkTargetInput!) {
bulkDeleteProducts(target: $target) {
id
status
type
createdAt
error
failed
failures {
id
code
name
message
sku
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation BulkDeleteProducts($target: ProductBulkTargetInput!) {\n bulkDeleteProducts(target: $target) {\n id\n status\n type\n createdAt\n error\n failed\n failures {\n id\n code\n name\n message\n sku\n }\n }\n}",
"variables": {
"target": {}
}
}
EOF
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.