Version 2020-01

A collection is a grouping of products that merchants can create to make their stores easier to browse. For example, a merchant might create a collection for a specific type of product that they sell, such as Footwear. Merchants can create collections by selecting products individually or by defining rules that automatically determine whether products are included.

Shopify stores start with a single collection, called Frontpage. This is a collection of products that are shown on the front page of the online store.

There are two different types of collection:

  • Custom collections, which contain products that are manually added to a collection by a merchant. For more information, see the CustomCollection resource.
  • Smart collections, which contain products that are automatically added based on selection conditions that a merchant chooses. For more information, see the SmartCollection resource.

The Collect resource is used to connect a product to a custom collection.

What you can do with Collection

The Shopify API lets you do the following with the Collection resource. More detailed versions of these general actions may be available:

Collection properties

"body_html": "<p>The best selling iPods ever</p>"

A description of the collection, complete with HTML markup. Many templates display this on their collection pages.

"handle": "ipods"

A unique, human-readable string for the collection automatically generated from its title. This is used in themes by the Liquid templating language to refer to the collection. (limit: 255 characters)

"image": {
  "src": "",
  "alt": "iPods",
  "width": 500,
  "height": 488,
  "created_at": "2018-04-19T09:34:47-04:00"

Image associated with the collection. Valid values are:

  • attachment: An image attached to a collection returned as Base64-encoded binary data.
  • src: The source URL that specifies the location of the image.
  • alt: The alternative text that describes the collection image.
  • created_at: The time and date (ISO 8601 format) when the image was added to the collection.
  • width: The width of the image in pixels.
  • height: The height of the image in pixels.

"id": 841564295

The ID for the collection.