Skip to main content

PublicCollection

A Collection is a group of products, what may often be referred to as a "Category Page" of some variety. In reality, a collection is far more flexible and can be used to represent any product grouping, and the collectionType can help differentiate between them.

type PublicCollection {
collectionId: ID!
collectionType: String!
content: CollectionContent
demandHqId: ID!
description: String
descriptionOrExcerpt(
numberOfCharacters: Int
): String
featuredProductIds: [ID]
primaryImageUrl: String
products(
after: String
before: String
first: Int
last: Int
manufacturer: [StringFilterInput]
msrp: FloatRangeFilterInput
numberOfTermAggregations: ProductNumberOfTermAggregationsInput
price: FloatRangeFilterInput
query: String
slugs: [String]
sortOrder: [ProductSortInput]
standardizedColor: [ProductStandardizedColorFilterInput]
tagPrefixes: [StringFilterInput]
tags: [StringFilterInput]
vendor: StringFilterInput
): PublicProductConnectionWithSearch!
publishedAt: Date
secondaryImageUrl: String
seoDescription: String
seoTitle: String
slug: String!
subtitle: String
tags: CollectionTags
taxonomyBranches(
after: String
before: String
first: Int
last: Int
taxonomyTree: String!
): PublicTaxonomyBranchConnection!
tertiaryImageUrl: String
title: String!
}

Fields

PublicCollection.collectionId ● ID! non-null scalar

PublicCollection.collectionType ● String! non-null scalar

Any string to declare a category of this collection, can be used to filter collections, limit 128 characters.

PublicCollection.content ● CollectionContent object

Get the content of the collection.

PublicCollection.demandHqId ● ID! non-null scalar

PublicCollection.description ● String scalar

A short description of the collection, limit 1000 characters.

PublicCollection.descriptionOrExcerpt ● String scalar

Get the description if it exists, or fallback to the excerpt of content for the collection.

PublicCollection.descriptionOrExcerpt.numberOfCharacters ● Int scalar

The number of characters to return, defaults to 200.

PublicCollection.featuredProductIds ● [ID] list scalar

This can be used to pin certain products to the top of a collection when using certain sorts. Max number of products is 20.

PublicCollection.primaryImageUrl ● String scalar

A primary image url for this collection, can be generated from a Collection ContentItem.

PublicCollection.products ● PublicProductConnectionWithSearch! non-null object

Paginate through products in a collection.

Requires the publicproduct/read scope.

PublicCollection.products.after ● String scalar

Returns the elements in the list that come after the specified cursor.

PublicCollection.products.before ● String scalar

Returns the elements in the list that come before the specified cursor.

PublicCollection.products.first ● Int scalar

Returns the first n elements from the list.

PublicCollection.products.last ● Int scalar

Returns the last n elements from the list.

PublicCollection.products.manufacturer ● [StringFilterInput] list input

Optionally filter by manufacturer.

PublicCollection.products.msrp ● FloatRangeFilterInput input

Optionally filter by msrp.

PublicCollection.products.numberOfTermAggregations ● ProductNumberOfTermAggregationsInput input

The number of results to return for each term aggregation. Defaults to 0 for each.

PublicCollection.products.price ● FloatRangeFilterInput input

Optionally filter by price.

PublicCollection.products.query ● String scalar

Query products for certain terms. Searches several fields, including product.tags, product.title, product.vendor, productLocales.description, productLocales.featureBullets, variant.barcode, variant.mpn, variant.sku

PublicCollection.products.slugs ● [String] list scalar

Filter Products using slugs

PublicCollection.products.sortOrder ● [ProductSortInput] list input

Sort Products by a series of fields and directions, defaults to CREATED_AT/ASC.

PublicCollection.products.standardizedColor ● [ProductStandardizedColorFilterInput] list input

Optionally filter by standardized color.

PublicCollection.products.tagPrefixes ● [StringFilterInput] list input

Filter Products using Tag Prefixes (starts with).

PublicCollection.products.tags ● [StringFilterInput] list input

Filter Products using Tags.

PublicCollection.products.vendor ● StringFilterInput input

Optionally filter by vendor.

PublicCollection.publishedAt ● Date scalar

ISO format date when the collection was published. Note that ensuing updates with status set to PUBLISHED will republish and re-set this date.

PublicCollection.secondaryImageUrl ● String scalar

A secondary image url for this collection, often a logo or related item.

PublicCollection.seoDescription ● String scalar

Description specific for SEO purposes, limit 170 characters.

PublicCollection.seoTitle ● String scalar

Title specific for SEO purposes, limit 256 characters.

PublicCollection.slug ● String! non-null scalar

Slug for the URL for this collection. Limit 128 characters.

PublicCollection.subtitle ● String scalar

The subtitle of the collection, limit 256 characters.

PublicCollection.tags ● CollectionTags object

Get the tags of the collection.

PublicCollection.taxonomyBranches ● PublicTaxonomyBranchConnection! non-null object

List TaxonomyBranches for a Collection. This is very highly likely to only return a single TaxonomyBranch, unless this is an unusual use case.

Requires the publictaxonomybranch/read permission.

PublicCollection.taxonomyBranches.after ● String scalar

Returns the elements in the list that come after the specified cursor.

PublicCollection.taxonomyBranches.before ● String scalar

Returns the elements in the list that come before the specified cursor.

PublicCollection.taxonomyBranches.first ● Int scalar

Returns the first n elements from the list.

PublicCollection.taxonomyBranches.last ● Int scalar

Returns the last n elements from the list.

PublicCollection.taxonomyBranches.taxonomyTree ● String! non-null scalar

PublicCollection.tertiaryImageUrl ● String scalar

A tertiary image url for this collection, not often used.

PublicCollection.title ● String! non-null scalar

The title of the collection, limit 256 characters.

Returned by

collection query

Member of

PublicCollectionConnectionWithSearch object ● PublicCollectionEdge object ● PublicTaxonomyBranch object