I need a structure on custom collections which allows me to change the products of the collection using the product_type, so when the product type changes, ALL the products of the collection needs to be changed. I figured i can add multiple products using the /custom_collections PUT endpoint like the following:
{
"custom_collection": {
"collects": [
{
"product_id": 1234
},
{
"product_id": 1235
}
]
}
}
but that only adds products to the collection, doesn’t remove them, so if i use it like this:
{
"custom_collection": {
"collects": []
}
}
it doesnt remove the old products. how can i remove/change all the products at once? is it possible?