collections_set_rules
Make a category fill itself, or arrange it by hand. Money is integer minor units (cents). Calling this changes nothing: it returns a preview of what would change and a confirmation link. Only the merchant, on that page, can make it happen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | manual: a shelf the merchant arranges by hand. smart: fills itself from the conditions below, evaluated live. | |
| sort | No | The order products are shown in: newest (newest first), bestselling (best selling first), price_asc (cheapest first), price_desc (dearest first), title (by name). Default newest. | |
| match | No | Whether a product must meet all the conditions or any one of them. Default all. | |
| rules | No | The conditions. REPLACES the whole list, so pass all of them. No conditions with kind smart means every active product, in the chosen order, which is what a Bestsellers category is. | |
| collection | Yes | The category, by id, handle or exact title. |