Skip to main content
query

Requires read_products access scope.

Deprecated. Use collectionByIdentifier instead.

Retrieves a collection by its unique handle identifier. Handles provide a URL-friendly way to reference collections and are commonly used in storefront URLs and navigation.

For example, a collection with the title "Summer Sale" might have the handle summer-sale, allowing you to fetch it directly without knowing the internal ID.

Use CollectionByHandle to:

  • Fetch collections for storefront display and navigation
  • Build collection-based URLs and routing systems
  • Validate collection existence before displaying content

Handles are automatically generated from collection titles but can be customized by merchants for SEO and branding purposes.

Learn more about collections.

•String!
required

The handle of the collection.


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?