Setting published_at to null will unpublish the product from online store - the product page 404'ing is an intentional side effect of this.
If you're trying to control the visiblity of a product on a channel other than Point of Sale or Online Store, this is not possible via the API at the moment.
If I've missed the mark here, let me know if I can assist further.
We also need to control sales channels via the API.
Shopify will you add this to your API please? If not why not?
I have a custom app to list items on my Shopify and I can add all the information I want this way but can't set the visibility on sales channels other than Online and POS.
Why oh why?
Is it still NOT possible to set the visibility on sales channels other than Online and POS by API call or by any coding like liquid? This must be possible cuz bulk uploading products in csv causes a lot of pain to shop owners like me trying to add sales channels to hundresd or thousands of products one by one!