Skip to main content
Anchor to collectionAddProductsV2

collectionAddProductsV2

mutation

Requires write_products access scope. Also: The user must have a permission to add products to a collection.

Adds products to a Collection asynchronously and returns a Job to track the operation's progress. This mutation handles large product sets efficiently by processing them in the background.

You can poll the returned job using the job query to monitor completion status.


Note

This mutation adds products in the order specified in the productIds argument.


ID!
required

The ID of the collection that's being updated.

[ID!]!
required

The IDs of the products that are being added to the collection. If the collection's sort order is manual, the products will be added in the order in which they are provided.


Was this section helpful?

Anchor to CollectionAddProductsV2Payload returnsCollectionAddProductsV2Payload returns

Job

The asynchronous job adding the products.

[CollectionAddProductsV2UserError!]!
non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?