Collections
Create a collection
A hand-picked collection (kind manual, with product_ids) or an automated one (kind smart, with rules: products join and leave as they match), like New collection on the Collections page. The handle is made from the title when left out.
Body
- titlestring
1–120 characters
- handlestring
The collection's address in the storefront.
up to 120 characters
- descriptionstring or null
up to 20000 characters
- image_urlstring or null
up to 1000 characters
- statusstring
One of
active,draft - kindstring
manual: product_ids. smart: rules decide.
One of
manual,smart - rulesarray of CollectionRules
up to 30 items
3 child fields
- fieldstringRequired
One of
title,vendor,product_type,category,status,tag,price,compare_at_price,inventory - opstringRequired
One of
eq,neq,contains,not_contains,starts_with,ends_with,is_set,is_not_set,gt,lt - valuestring
up to 200 characters
- rules_matchstring
One of
all,any - sort_modestring
One of
manual,alpha_asc,alpha_desc,price_asc,price_desc,created_desc,created_asc,best_selling - product_idsarray of strings
up to 2000 items
- seoobject
2 child fields
- titlestring or null
up to 120 characters
- descriptionstring or null
up to 320 characters
Returns
201 Created · The new collection. Collection
- idstring
starts with col_
- objectstring
always "collection"
- titlestring
- handlestring
- descriptionstring or null
- image_urlstring or null
- statusstring
One of
active,draft - kindstring
One of
manual,smart - rulesarray of CollectionRules
3 child fields
- fieldstringRequired
One of
title,vendor,product_type,category,status,tag,price,compare_at_price,inventory - opstringRequired
One of
eq,neq,contains,not_contains,starts_with,ends_with,is_set,is_not_set,gt,lt - valuestring
up to 200 characters
- rules_matchstring
One of
all,any - sort_modestring
- positioninteger
- product_countinteger
- seoobject
2 child fields
- titlestring or null
- descriptionstring or null
- livemodeboolean
- created_atstring
ISO 8601 date-time, UTC
- updated_atstring
ISO 8601 date-time, UTC
Errors
Every error has the same shape. This endpoint can answer with:
