Create collection
POST
/ admin/ v1/ stores/ {store_id}/ collections- products:write
- Idempotency-Key supported
Create a manual collection (optionally with its first products) or a smart one with rules.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
titlestringrequiredkindenumrequiredHow a collection decides its products.
- manual
- smart
handlestring · or nullDerived from the title when omitted.
description_htmlstring · or nullrulesobject · or nullRequired for smart collections; refused for manual ones.
sort_orderenum · or nullDefault:
manualfor manual collections,created_descfor smart ones.- manual
- title_asc
- title_desc
- price_asc
- price_desc
- created_desc
- created_asc
image_media_idstring · or nullAn uploaded image from the media library.
seoobject · or null
Returns
201 Collection created.
Errors
- 403
forbiddenMissing permission. - 409Handle already used.
- 422
validation_failedValidation failed.