Skip to main content
Version: 202607

Asynchronously update smart collection rules

PATCH 

/openapi/2026-07/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

    id stringrequired

    Collection ID

Bodyrequired

    match_rules object

    Smart collection match rules

    disjunctiveboolean

    Logical relationship between rule modules:

    • true: any rule module matched is sufficient (OR)
    • false: all rule modules must be matched (AND, default)
    rule_modules object[]

    List of rule modules

  • Array [
  • disjunctiveboolean

    Logical relationship between rules in this module:

    • true: any rule matched is sufficient (OR)
    • false: all rules must be matched (AND, default)
    rules object[]

    List of rules in this module

  • Array [
  • columnstring

    Target field to apply the rule on. Supported values:

    • title: product title
    • product_status: product status
    • tags: product tags
    • vendor: vendor / supplier
    • variant_price: SKU price
    • variant_weight: SKU weight
    • inventory_quantity: inventory quantity
    • product_note: product note
    • sales: sales volume
    • real_sales: actual sales volume
    • views: view count
    • add_to_cart_count: add-to-cart count
    • created_at: product creation time
    • spu: SPU identifier
    • spus_match: SPU match status
    • published_at: publish time
    • category_id: category ID
    • brand: brand
    relationstring

    Comparison operator used for matching. Supported values:

    • equals: equals
    • not_equals: not equals
    • starts_with: starts with
    • ends_with: ends with
    • contains: contains
    • not_contains: does not contain
    • greater_than: greater than
    • less_than: less than
    • top: top N results (usually used with sortable fields)
    conditionstring

    Condition value for the rule

    • Text fields: plain string.
    • Numeric fields: string convertible to a number.
    • Time fields: timestamp or agreed time format.
    • top relation: represents the value of N.
  • ]
  • ]

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    async_task_idstring

    Async task ID. Use GetCollectionAsyncTask to poll for completion

    collection object

    Collection

    idstring

    Collection ID

    titlestring

    Title

    descriptionstring

    Description

    handlestring

    URL-friendly identifier (handle)

    smartboolean

    Smart

    image object

    Image

    srcstring

    The source URL of the image

    widthint32

    The width of the image in pixels

    heightint32

    The height of the image in pixels

    altstring

    Alt text for the image

    seo_titlestring

    SEO title

    seo_keywordsstring[]

    SEO keywords

    seo_descriptionstring

    SEO description

    sort_orderstring

    Sort order

    created_atstring

    Creation timestamp, in ISO-8601 format

    updated_atstring

    Last update timestamp, in ISO-8601 format

    match_rules object

    Smart collection match rules

    disjunctiveboolean

    Whether conditions are disjunctive (OR)

    rule_modules object[]

    List of rule modules

  • Array [
  • disjunctiveboolean

    Whether conditions are disjunctive (OR)

    rules object[]

    List of rules in this module

  • Array [
  • columnstring

    Column

    relationstring

    Relation

    conditionstring

    Condition

  • ]
  • ]
  • tagsstring[]

    List of tags for the collection

    product_countint64

    Number of products in the collection