productBulkOperation
Requires permission products:product:delete.
Poll a bulk delete operation's progress; terminal statuses are COMPLETED / COMPLETED_WITH_ERRORS / FAILED.
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
query ProductBulkOperation($id: ID!) {
productBulkOperation(id: $id) {
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": "query ProductBulkOperation($id: ID!) {\n productBulkOperation(id: $id) {\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": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"productBulkOperation": {
"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"
}
]
}
}
}
productBulkOperation(
id: ID!
): ProductBulkOperation
Arguments
productBulkOperation.id ● ID! non-null scalar
The ID of the bulk product operation.
Type
ProductBulkOperation object
A bulk product delete and how far it has got.