Skip to main content

bulkDeleteBrands

Requires permission products:brand:delete.

Deletes several brands at once, up to 500. Each brand follows the same rule as deleting it on its own: a brand that still has products is skipped and reported, and so is an ID that is not in your organization. The rest are deleted. Needs the brands delete permission.

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 BulkDeleteBrands($ids: [ID!]!) {
bulkDeleteBrands(ids: $ids) {
deleted
deletedIds
requested
failures {
id
code
name
reason
}
}
}

Variables:

{
"ids": [
"id"
]
}

Response:

{
"data": {
"bulkDeleteBrands": {
"deleted": 0,
"deletedIds": [
"id"
],
"requested": 0,
"failures": [
{
"id": "id",
"code": "string",
"name": "string",
"reason": "string"
}
]
}
}
}
bulkDeleteBrands(
ids: [ID!]!
): CatalogBulkDeleteResult!

Arguments​

bulkDeleteBrands.ids ● [ID!]! non-null scalar​

The IDs of the brands to delete, at most 500. Duplicates count once.

Type​

CatalogBulkDeleteResult object​

The outcome of a bulk delete of brands or categories: what was deleted and what was refused.