Collection
Requires access scope.
Represents a group of products that can be displayed in online stores and other sales channels in categories, which makes it easy for customers to find them. For example, an athletics store might create different collections for running attire, shoes, and accessories.
Collections can be defined by conditions, such as whether they match certain product tags. These are called smart or automated collections.
Collections can also be created for a custom group of products. These are called custom or manual collections.
Anchor to Fields and connectionsFields and connections
- Anchor to availablePublicationsCountavailable•
Publications Count The number of publications that a resource is published to, without feedback errors.
- Anchor to descriptiondescription•String!non-null
A single-line, text-only description of the collection, stripped of any HTML tags and formatting that were included in the description.
- Anchor to descriptionHtmldescription•
Html HTML!non-null The description of the collection, including any HTML tags and formatting. This content is typically displayed to customers, such as on an online store, depending on the theme.
- Anchor to eventsevents•Event
Connection! non-null The paginated list of events associated with the host subject.
- Anchor to feedbackfeedback•
Information about the collection that's provided through resource feedback.
- Anchor to handlehandle•String!non-null
A unique string that identifies the collection. If a handle isn't specified when a collection is created, it's automatically generated from the collection's original title, and typically includes words from the title separated by hyphens. For example, a collection that was created with the title
Summer Catalog 2022
might have the handlesummer-catalog-2022
.If the title is changed, the handle doesn't automatically change.
The handle can be used in themes by the Liquid templating language to refer to the collection, but using the ID is preferred because it never changes.
- Anchor to hasProducthas•
Product Boolean!non-null Whether the collection includes the specified product.
- •ID!non-null
A globally-unique ID.
- Anchor to imageimage•
The image associated with the collection.
- Anchor to legacyResourceIdlegacy•
Resource Id UnsignedInt64! non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to metafieldmetafield•
A custom field, including its
namespace
andkey
, that's associated with a Shopify resource for the purposes of adding and storing additional information.- Anchor to metafieldsmetafields•Metafield
Connection! non-null A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to productsproducts•Product
Connection! non-null The products that are included in the collection.
- Anchor to productsCountproducts•
Count The number of products in the collection.
- Anchor to publishedOnCurrentPublicationpublished•
On Current Publication Boolean!non-null Whether the resource is published to the app's publication. For example, the resource might be published to the app's online store channel.
- Anchor to publishedOnPublicationpublished•
On Publication Boolean!non-null Whether the resource is published to a specified publication.
- Anchor to resourcePublicationsresource•
Publications ResourcePublication non-nullConnection! The list of resources that are published to a publication.
- Anchor to resourcePublicationsCountresource•
Publications Count The number of publications that a resource is published to, without feedback errors.
- Anchor to resourcePublicationsV2resource•
Publications V2 ResourcePublication non-nullV2Connection! The list of resources that are either published or staged to be published to a publication.
- Anchor to ruleSetrule•
Set For a smart (automated) collection, specifies the rules that determine whether a product is included.
- •SEO!non-null
If the default SEO fields for page title and description have been modified, contains the modified information.
- Anchor to sortOrdersort•
Order CollectionSort non-nullOrder! The order in which the products in the collection are displayed by default in the Shopify admin and in sales channels, such as an online store.
- Anchor to templateSuffixtemplate•
Suffix The suffix of the Liquid template being used to show the collection in an online store. For example, if the value is
custom
, then the collection is using thecollection.custom.liquid
template. If the value isnull
, then the collection is using the defaultcollection.liquid
template.- Anchor to titletitle•String!non-null
The name of the collection. It's displayed in the Shopify admin and is typically displayed in sales channels, such as an online store.
- Anchor to translationstranslations•[Translation!]!non-null
The published translations associated with the resource.
- Anchor to unpublishedPublicationsunpublished•
Publications PublicationConnection! non-null The list of publications that the resource isn't published to.
- Anchor to updatedAtupdated•
At DateTime! non-null The date and time (ISO 8601 format) when the collection was last modified.
Map
Fields and connections with this object
- Channel.collections
- CollectionConnection.nodes
- CollectionEdge.node
- CollectionPublication.collection
- DiscountCollections.collections
- PriceRuleItemEntitlements.collections
- PriceRuleLineItemPrerequisites.collections
- Product.collections
- Publication.collections
Possible type in
Anchor to QueriesQueries
- •query
Returns a Collection resource by ID.
- •query
Returns a list of collections.
- •queryDeprecated
Return a collection by its handle. Use
instead.
Collection Queries
Queried by
Anchor to MutationsMutations
- •mutation
Adds products to a collection.
- •mutation
Creates a collection.
- •mutation
Updates a collection.
Collection Mutations
Anchor to InterfacesInterfaces
- •interface
- •interface
- •interface
- •interface