collection Delete
Requires access scope. Also: The store must not be on the Starter or Retail plans and user must have a permission to delete collection.
Deletes a collection and removes it permanently from the store. This operation cannot be undone and will remove the collection from all sales channels where it was published.
For example, when merchants discontinue seasonal promotions or reorganize their catalog structure, they can delete outdated collections like "Back to School 2023" to keep their store organized.
Use to:
- Remove outdated or unused collections from stores
- Clean up collection structures during catalog reorganization
- Implement collection management tools with deletion capabilities
Products within the deleted collection remain in the store but are no longer grouped under that collection.
Learn more about collection management.
Arguments
- Anchor to inputinput•Collection
Delete Input! required The collection to delete.
- Anchor to deletedCollectionIddeleted•ID
Collection Id The ID of the collection that was deleted. Returns
null
if the collection doesn't exist.- Anchor to shopshop•Shop!non-null
The shop associated with the collection.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.