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

Solved
Highlighted
Excursionist
20 2 1

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.

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 102 115

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.

 

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

1 Like
Highlighted
Excursionist
20 2 1

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?

0 Likes
Highlighted

Success.

Shopify Staff (Retired)
Shopify Staff (Retired)
624 102 115

To phrase it another way, in order for your app to be able to run that mutation your app needs the "write_publications" access scope. Unlike typical access scopes like 'read_products' or 'write_customers', not all apps can use this access scope by default. You can submit a request through the support form in your Partners dashboard to get approved for this access scope

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

1 Like