Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

Anchor to collectionAddProducts

collectionAddProducts

mutation

Requires write_products access scope. Also: The store must not be on the Starter or Retail plans and user must have a permission to add products to a collection.

Adds products to a collection.

ID!required

The ID of the collection that's being updated. This can't be a smart collection.

[ID!]!required

The IDs of the products that are being added to the collection. If any of the products is already present in the input collection, then an error is raised and no products are added.


Was this section helpful?

Anchor to CollectionAddProductsPayload returnsCollectionAddProductsPayload returns

The updated collection. Returns null if an error is raised.

The list of errors that occurred from executing the mutation.


Was this section helpful?