Product created via Admin API "unavailable on 4 sales channels"

Ruben00001
Excursionist
20 2 3

I created a product by POST request using the Admin API. However, in the Shopify admin panel I can see that this product is "unavailable on 4 sales channels" and is only available on the "Point of Sale" channel. I want the products I create to be available on all of my sales channels by default.

 

The "published_scope" of this product is set to "global".

 

Reading other posts it seems that Shopify doesn't allow the editing of which sales channels products appear on via an API but only via the admin page. I don't want to choose which channels they appear on but have them appear on all of them by default.

Replies 6 (6)
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 104 171

Hey @Ruben00001 ,

 

There is currently no way through the Shopify API to publish a resource across all Sales Channels by default. As per our documentation, setting the attribute of published_scope=global just means that the product is published to both the Online Store channel and the Point of Sales channel. (https://shopify.dev/docs/admin-api/rest/reference/products/product). This property does not allow you to publish your product to all channels by default. 

 

There is an option to publish resources to specific channels via the Shopify GraphQL Admin API. It is through the mutations of "publishablePublish" (https://shopify.dev/docs/admin-api/graphql/reference/mutation/publishablepublish) where you can publish any resource (e.g. product or collection) to any channel you choose. However to use this mutation you need the access scope of "write_publications", which you can only get if you reach out to Shopify "Partner Specialist" Support and ask them to add it to your app. EDIT: The publishablePublish scope is currently only available to private apps installed on Shopify Plus stores. At this time we're unable to provide a timeline regarding availability for other apps, but keep an eye on our changelog as future updates will be posted there.

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

Ruben00001
Excursionist
20 2 3

Thanks @hassain.

 

Why would I need a "Partner Specialist" for this GraphQL mutation? Do you only grant access to "write_publications" to  them? If so, why?

merlandsson
New Member
2 0 0

Hi @hassain , I just wondering why my products are removed from channel "website" when they onced marked? I do sometimes add product information (pictures and product texts) and choose my sales channels BEFORE the products are in stock. And then, when it is in stock, they are automatically removed from sale channel "website" and I manually need to mark this box again. How do I solve this? 

joelajackson
New Member
1 0 0

Hi Hassain!

 

This is helpful. I want to clarify. We're building a react app outside of shopify for our store using the storefront api.

 

The products are being entered in a separate cms. Is there no way to sync them across and set the sales channel for our storefront app without shopify partner specialist support?

 

This is a decision making point as to whether we use shopify on this project. Thanks!!

piotr5
New Member
2 0 0

Hello, is it possible to mark all sales channels for a new product via API when adding it to the store?

juan3211
Shopify Partner
86 0 21

Hi, Shopify experts .... any news after lots of months and years? Thanks