---
title: "collectionByHandle"
description: "Retrieves a Collection using its handle."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/queries/collection-by-handle'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/queries/collection-by-handle.md'
---
# collectionByHandle

Retrieves a Collection using its handle.

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`Collection`

## Arguments

* `handle`

  [String!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The collection's handle

## Returns

* `banner`

  [Image](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/image.md)

  The banner associated with the collection.

* `descriptionHtml`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The collection's description, which includes any tags of HTML and formatting. The content of description is typically shown to customers according to the theme.

* `handle`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  A unique string used to identify the collection. If the handle is not specified during the collection creation process, it will be automatically generated based on the collection's title.

* `hasProduct`

  [Boolean](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/boolean.md)

  Whether the specified product is bound to the current collection.

* `id`

  [ID](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  Globally unique collection ID.

* `image`

  [Image](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/image.md)

  The cover image for collection

* `products`

  [ProductConnection](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/product-connection.md)

  The list of products in the current collection.

* `productsCount`

  [Int](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/int.md)

  The number of products in the collection.

* `resourcePublicationsV2`

  [ResourcePublicationV2Connection](https://developer.shopline.com/docs/admin-graph-ql-api/apps/objects/resource-publication-v2-connection.md)

  The resources that have been published or are ready to be published. Currently, querying the collection ResoursePublicationV2 is not supported.

* `ruleSet`

  [CollectionRuleSet](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/objects/collection-rule-set.md)

  The rules that specify whether a product is included in a smart collection.

* `seo`

  [Seo](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/seo.md)

  Seo information of the collection.

* `sortOrder`

  [CollectionSortOrder](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/enums/collection-sort-order.md)

  By default, the display order of products within the category in the SHOPLINE backend and sales channels like online stores.

* `templateSuffix`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The theme template used for viewing collection in the store.

* `title`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The collection's name, which is showed in the Shopline backend and typically shown in sales channels, for example, online stores.

* `updatedAt`

  [Date](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/date.md)

  The collection's modification time in ISO 8601 format.

## Code Example

```graphql
 {
	collectionByHandle(handle ) 
		 {
			# Collection fields
		}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

