API version: unstable
API version: 2021-07 Release candidate
API version: 2021-04 Latest
API version: 2021-01
API version: 2020-10
API version: 2020-07
API version: 2020-04
API version: 2020-01 Unsupported
API version: 2019-10 Unsupported

collectionCreate mutation

Version unstable

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2021-07 (Release candidate)

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2021-04 (Latest)

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2021-01

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2020-10

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2020-07

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2020-04 (Unsupported)

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2020-01 (Unsupported)

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2019-10 (Unsupported)

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2019-07 (Unsupported)

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.

Version 2019-04 (Unsupported)

Creates a collection.

Required access

write_products access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
input ( CollectionInput! ) required

The properties to use when creating the collection.

CollectionInput fields

  • descriptionHtml (String)

    The description of the collection, in HTML format.

  • handle (String)

    A unique human-friendly string for the collection. Automatically generated from the collection's title.

  • id (ID)

    Specifies the collection to update or create a new collection if absent.

  • image (ImageInput)

    The image associated with the collection.

  • metafields ([MetafieldInput!])

    The metafields to associate with this collection.

  • privateMetafields ([PrivateMetafieldInput!])

    The private metafields to associated with this product.

  • products ([ID!])

    Initial list of collection products. Only valid with productCreate and without rules.

  • Initial list of collection publications. Only valid with productCreate. This argument is deprecated: Use PublishablePublish instead.

  • redirectNewHandle (Boolean)

    Indicates whether a redirect is required after a new handle has been provided. If true, then the old handle is redirected to the new one automatically.

  • The rules used to assign products to the collection.

  • seo (SEOInput)

    SEO information for the collection.

  • sortOrder (CollectionSortOrder)

    The order in which the collection's products are sorted.

  • templateSuffix (String)

    The theme template used when viewing the collection in a store.

  • title (String)

    Required for creating a new collection.

Return fields

  • collection (Collection)

    The collection that has been created.

  • userErrors ([UserError!]!)

    List of errors that occurred executing the mutation.