What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Making product available on all sales channels using Product API

Solved

Making product available on all sales channels using Product API

kiemi
Visitor
2 0 4

Hello!

I am trying to make the product available on all sales channels when it is created.

It worked when I create from the Store Admin but it is not working when I use the Product API.

Can anyone help me, please?

Thanks in advance.

Accepted Solution (1)

AlphaBen
Visitor
2 1 0

This is an accepted solution.

I believe per this article that this isn't currently possible via the Product API (unfortunately). 

It seems that there maybe an option using GraphQL, but I haven't confirmed that functionality myself.

https://community.shopify.com/c/Shopify-APIs-SDKs/Product-created-via-Admin-API-quot-unavailable-on-... 

View solution in original post

Replies 5 (5)

Gregarican
Shopify Partner
1033 86 292

What happens when you specify published_scope as global? As is described here --> https://shopify.dev/docs/admin-api/rest/reference/products/product#create-2020-10. If that doesn't publish to any other sales channels (besides POS and Ecom), then perhaps take a look here --> https://shopify.dev/docs/admin-api/rest/reference/sales-channels/productlisting#create-2020-10. This is assuming you are using the REST API.

kiemi
Visitor
2 0 4

Hi, Greg.

Thank you!!

I tried both but it didn't work.

I think it needs to specify something else.

Also, I would like to know how does the product listing work? Seems like there are no product listings on my store.

Zentrifuge
Shopify Partner
11 0 1

Hi, Gregarican,
I'm here with the same question as the OP.
Therefore ... can you maybe give some clarification as to intended use of this API:

1. In order to include a newly created product in the sales channel Online Store , is it necessary (and maybe even sufficient) to specifying "published_scope": "global" (in a call to API endpoint product)? Or ...
2. is it required to additionally set up a corresponding Product Listing using the product_listings endpoint? Or ..
3. is there anything else we may have missed?

Thanks in advance!

Gregarican
Shopify Partner
1033 86 292

According to the other responder on this thread, unfortunately this doesn't appear to be possible using the REST API. Maybe try looking at the GraphQL API to see if there is any documented reference of achieving this. Sorry! 

AlphaBen
Visitor
2 1 0

This is an accepted solution.

I believe per this article that this isn't currently possible via the Product API (unfortunately). 

It seems that there maybe an option using GraphQL, but I haven't confirmed that functionality myself.

https://community.shopify.com/c/Shopify-APIs-SDKs/Product-created-via-Admin-API-quot-unavailable-on-...