handle (like summer-sale). Membership can be
manual (you pick the products, in an order you control) or smart (you write rules and
matching products join automatically). Readers can’t tell the two apart — a collection just has
products.
Collections ride the product scope, since they’re product merchandising.
Reading collections
Only published, in-window collections are returned — drafts and scheduled-out collections are invisible to the API.product_count and the products list are availability-filtered — they reflect what a storefront
would actually show (active, in their publish window), not raw membership.
A manual collection
Create the collection, then add products to it.handle is derived from the name when you omit it. Remove products with DELETE on the same path
({ "products": [...] }), and set an explicit order with
PUT /v1/collections/{handle}/products/order:
sort_order: MANUAL is what makes your hand-ordered positions show; the other sort orders
(TITLE_ASC, CREATED_DESC, STOCK_DESC, …) compute the order for you.
A smart collection
Setmembership_type: SMART and a rules object. Products that match the rules join
automatically — and stay current as products change — so you never manage membership by hand.
matchisANY(an OR) orALL(an AND) across up to 10 conditions.fieldis one oftag,category,type,inventory,title,price.tagandcategorytake an id as thevalue;typeandtitletake a string;inventoryandpricetake a number (price in minor units of your default currency).opdepends on the field —eq/neqfor tag/category/type, the comparisons (gt/gte/lt/lte/eq) for inventory/price, andcontains/not_contains/eqfor title.
product_count: 0
for a moment before it catches up.
Preview before you commit
POST /v1/collections/preview-rules tells you how many products a rule set would match, without
creating anything:
Updating & deleting
PUT /v1/collections/{handle} edits a collection; you can even flip membership_type between
MANUAL and SMART and the members are reconciled for you. Writes reach drafts too (a
collection needn’t be published to be edited). DELETE /v1/collections/{handle} removes the
collection — the products in it are not deleted, only the grouping.
Good to know
- Reads are storefront-shaped. The API only ever returns published, in-window collections and,
within them, buyable products. If you published a collection but it’s missing from the list, check
its
publish_at/unpublish_at. - Private details stay private. The read shape never exposes a smart collection’s
rulesor how its membership is decided — to a reader, smart and manual collections are identical. - Manual membership is manual only. Adding/removing/reordering products applies to
MANUALcollections; aSMARTcollection’s membership is owned by its rules.

