Endpoint (REST/GraphQL) for add more products to a custom collection

Shopify Partner
3 0 0

I can't find any endpoint / gql stuff to add more products to an existing custom collection. I can't use collectionUpdate since it throws error when I tried to add products variable to the gql schema, saying products variable can't be there when updating a collection. I've failed when using the REST API either. This is because we'll hit by "Input max size of 250" error when we try to create a new collection with 250+ products. how do I go around this?

Reply 1 (1)

Shopify Staff
1320 216 456

Hey @yuriih1


The collectionAddProductsV2 mutation should work well for this! 


Hope that helps! 


- Kyle G.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog