Skip to content

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_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • titlestringrequired
  • kindenumrequired

    How a collection decides its products.

    • manual
    • smart
  • handlestring · or null

    Derived from the title when omitted.

  • description_htmlstring · or null
  • rulesobject · or null

    Required for smart collections; refused for manual ones.

  • sort_orderenum · or null

    Default: manual for manual collections, created_desc for smart ones.

    • manual
    • title_asc
    • title_desc
    • price_asc
    • price_desc
    • created_desc
    • created_asc
  • image_media_idstring · or null

    An uploaded image from the media library.

  • seoobject · or null

Returns

201 Collection created.

Errors

  • 403forbiddenMissing permission.
  • 409Handle already used.
  • 422validation_failedValidation failed.