Requires write_products
access scope. Also: The app must have access to the input fields used to update the collection. Further, the store must not be on the Starter or Retail plans and user must have a permission to update collection.
Updates a collection, modifying its properties, products, or publication settings. Collections help organize products together in the online store and other sales channels.
Use the collectionUpdate
mutation to programmatically modify collections in scenarios such as:
There are two types of collections with different update capabilities:
job
object that you can use to track the progress of the update.To publish or unpublish collections to specific sales channels, use the dedicated publishablePublish
and publishableUnpublish
mutations.
Learn more about using metafields with smart collections.
The updated properties for the collection.
The asynchronous job updating the products based on the new rule set.
The list of errors that occurred from executing the mutation.
mutation updateCollectionRules($input: CollectionInput!) { collectionUpdate(input: $input) { collection { id title description handle ruleSet { rules { column relation condition } appliedDisjunctively } } userErrors { field message } } }
curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-07/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation updateCollectionRules($input: CollectionInput!) { collectionUpdate(input: $input) { collection { id title description handle ruleSet { rules { column relation condition } appliedDisjunctively } } userErrors { field message } } }", "variables": { "input": { "id": "gid://shopify/Collection/442946009", "ruleSet": { "rules": [ { "column": "IS_PRICE_REDUCED", "relation": "IS_NOT_SET", "condition": "" } ], "appliedDisjunctively": true } } } }'
const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation updateCollectionRules($input: CollectionInput!) { collectionUpdate(input: $input) { collection { id title description handle ruleSet { rules { column relation condition } appliedDisjunctively } } userErrors { field message } } }`, { variables: { "input": { "id": "gid://shopify/Collection/442946009", "ruleSet": { "rules": [ { "column": "IS_PRICE_REDUCED", "relation": "IS_NOT_SET", "condition": "" } ], "appliedDisjunctively": true } } }, }, ); const data = await response.json();
const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation updateCollectionRules($input: CollectionInput!) { collectionUpdate(input: $input) { collection { id title description handle ruleSet { rules { column relation condition } appliedDisjunctively } } userErrors { field message } } }`, "variables": { "input": { "id": "gid://shopify/Collection/442946009", "ruleSet": { "rules": [ { "column": "IS_PRICE_REDUCED", "relation": "IS_NOT_SET", "condition": "" } ], "appliedDisjunctively": true } } }, }, });
session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation updateCollectionRules($input: CollectionInput!) { collectionUpdate(input: $input) { collection { id title description handle ruleSet { rules { column relation condition } appliedDisjunctively } } userErrors { field message } } } QUERY variables = { "input": { "id": "gid://shopify/Collection/442946009", "ruleSet": { "rules": [ { "column": "IS_PRICE_REDUCED", "relation": "IS_NOT_SET", "condition": "" } ], "appliedDisjunctively": true } } } response = client.query(query: query, variables: variables)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4