// Add product 9226170532176 to collection 615709376848
curl -X POST “xxxx” -H “Content-Type: application/json” -H “X-Shopify-Access-Token: ” -d “{"query": "mutation collectionAddProducts($id: ID!, $productIds: [ID!]!) { collectionAddProducts(id: $id, productIds: $productIds) { collection { id } userErrors { field message } } }", "variables": { "id": "gid://shopify/Collection/615709376848", "productIds": ["gid://shopify/Product/9226170532176"] }}”
// Move Product 9226170532176 in Collection 615709376848 to New Position 22
curl -X POST “xxxxx” -H “Content-Type: application/json” -H “X-Shopify-Access-Token: ” -d “{"query": "mutation collectionReorderProducts($id: ID!, $moves: [MoveInput!]!) { collectionReorderProducts(id: $id, moves: $moves) { job { id } userErrors { field message } } }", "variables": { "id": "gid://shopify/Collection/615709376848", "moves": [{"id": "gid://shopify/Product/9226170532176", "newPosition": "22"}] }}”
Somehow I cannot set a new position for my products using GraphQL. The Collection is set to manual order. Thanks for the help!