Skip to main content
query

Retrieves a collection by its ID. A collection represents a grouping of products that merchants can display and sell as a group in their online store and other sales channels.

Use the collection query when you need to:

  • Manage collection publishing across sales channels
  • Access collection metadata and SEO information
  • Work with collection rules and product relationships

A collection can be either a custom (manual) collection where products are manually added, or a smart (automated) collection where products are automatically included based on defined rules. Each collection has associated metadata including title, description, handle, image, and metafields.

•ID!
required

The ID of the Collection to return.


Was this section helpful?

•Collection

The Collection object represents a group of products that merchants can organize to make their stores easier to browse and help customers find related products. Collections serve as the primary way to categorize and display products across online stores, sales channels, and marketing campaigns.

There are two types of collections:

The Collection object provides information to:

  • Organize products by category, season, or promotion.
  • Automate product grouping using rules (for example, by tag, type, or price).
  • Configure product sorting and display order (for example, alphabetical, best-selling, price, or manual).
  • Manage collection visibility and publication across sales channels.
  • Add rich descriptions, images, and metadata to enhance discovery.

Note

Collections are unpublished by default. To make them available to customers, use the publishablePublish mutation after creation.


Collections can be displayed in a store with Shopify's theme system through Liquid templates and can be customized with template suffixes for unique layouts. They also support advanced features like translated content, resource feedback, and contextual publication for location-based catalogs.

Learn about using metafields with smart collections.


Was this section helpful?