Anchor to section titled 'undefined'

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.


Anchor to id
id
required

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

Anchor to productIds
productIds
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?

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

The list of errors that occurred from executing the mutation.


Was this section helpful?