Asynchronously update smart collection rules
PATCH/openapi/2026-01/collections/:id/smart-rule/async
Initiates an asynchronous update of a smart collection's match rules. Returns an async task ID immediately; use GetCollectionAsyncTask to poll the result.
Request
Path Parameters
Collection ID
- application/json
- Body
- Example
Bodyrequired
true: any rule module matched is sufficient (OR)false: all rule modules must be matched (AND, default)- Array [
true: any rule matched is sufficient (OR)false: all rules must be matched (AND, default)- Array [
title: product titleproduct_status: product statustags: product tagsvendor: vendor / suppliervariant_price: SKU pricevariant_weight: SKU weightinventory_quantity: inventory quantityproduct_note: product notesales: sales volumereal_sales: actual sales volumeviews: view countadd_to_cart_count: add-to-cart countcreated_at: product creation timespu: SPU identifierspus_match: SPU match statuspublished_at: publish timecategory_id: category IDbrand: brandequals: equalsnot_equals: not equalsstarts_with: starts withends_with: ends withcontains: containsnot_contains: does not containgreater_than: greater thanless_than: less thantop: top N results (usually used with sortable fields)- Text fields: plain string.
- Numeric fields: string convertible to a number.
- Time fields: timestamp or agreed time format.
toprelation: represents the value of N.- ]
- ]
match_rules object
Smart collection match rules
Logical relationship between rule modules:
rule_modules object[]
List of rule modules
Logical relationship between rules in this module:
rules object[]
List of rules in this module
Target field to apply the rule on. Supported values:
Comparison operator used for matching. Supported values:
Condition value for the rule
{
"match_rules": {
"disjunctive": true,
"rule_modules": [
{
"disjunctive": true,
"rules": [
{
"column": "string",
"relation": "string",
"condition": "string"
}
]
}
]
}
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
- Array [
- Array [
- ]
- ]
error code
error message
data object
Async task ID. Use GetCollectionAsyncTask to poll for completion
collection object
Collection
Collection ID
Title
Description
URL-friendly identifier (handle)
Smart
image object
Image
The source URL of the image
The width of the image in pixels
The height of the image in pixels
Alt text for the image
SEO title
SEO keywords
SEO description
Sort order
Creation timestamp, in ISO-8601 format
Last update timestamp, in ISO-8601 format
match_rules object
Smart collection match rules
Whether conditions are disjunctive (OR)
rule_modules object[]
List of rule modules
Whether conditions are disjunctive (OR)
rules object[]
List of rules in this module
Column
Relation
Condition
List of tags for the collection
Number of products in the collection
{
"code": "string",
"message": "string",
"data": {
"async_task_id": "string",
"collection": {
"id": "string",
"title": "string",
"description": "string",
"handle": "string",
"smart": true,
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string"
},
"seo_title": "string",
"seo_keywords": [
"string"
],
"seo_description": "string",
"sort_order": "string",
"created_at": "string",
"updated_at": "string",
"match_rules": {
"disjunctive": true,
"rule_modules": [
{
"disjunctive": true,
"rules": [
{
"column": "string",
"relation": "string",
"condition": "string"
}
]
}
]
},
"tags": [
"string"
],
"product_count": 0
}
}
}