published_scope web is not listing product on Online Store

Ashu24
New Member
5 0 0

Hi Team,

As Per Shopify Docs, 

Whether the product is published to the Point of Sale channel. Valid values:

  • web: The product is published to the Online Store channel but not published to the Point of Sale channel.
  • global: The product is published to both the Online Store channel and the Point of Sale channel.

I am using REST API to update the published_scope of a product. It is not working as expected. I am passing the value as published_scope: 'web' but it does not list the product for Online Store on Shopify.

In below example, I used PUT request "/api/2021-07/products/632910392.json" to update the product with the below params.

{"product"=>{"id"=>6930626281668, "title"=>"Women Fossil watch",  "published_scope"=>"web" } }

But it does not update the product on Shopify.

Screenshot 2021-10-21 at 5.54.53 PM.png

Although on fetching the product details using Get Product API, the API returns below response (where published scope is mentioned as web) :

{"product"=>{"id"=>6930626281668, "title"=>"Women Fossil watch", "vendor"=>"My Ind Store", "product_type"=>"", "created_at"=>"2021-10-21T17:11:57+05:30", "handle"=>"women-fossil-watch", "updated_at"=>"2021-10-21T17:42:31+05:30", "published_at"=>nil, "template_suffix"=>"", "status"=>"active", "published_scope"=>"web", "tags"=>"", "admin_graphql_api_id"=>"gid://shopify/Product/6930626281668", "variants"=>[{"id"=>40807257866436, "product_id"=>6930626281668, "title"=>"Default Title", "price"=>"50000.00", "sku"=>"Women Fossil watch", "position"=>1, "inventory_policy"=>"deny", "compare_at_price"=>"70000.00", "fulfillment_service"=>"manual", "inventory_management"=>nil, "option1"=>"Default Title", "option2"=>nil, "option3"=>nil, "created_at"=>"2021-10-21T17:11:57+05:30", "updated_at"=>"2021-10-21T17:17:57+05:30", "taxable"=>true, "barcode"=>"", "grams"=>100, "image_id"=>nil, "weight"=>0.1, "weight_unit"=>"kg", "inventory_item_id"=>42903835279556, "inventory_quantity"=>61, "old_inventory_quantity"=>61, "requires_shipping"=>true, "admin_graphql_api_id"=>"gid://shopify/ProductVariant/40807257866436"}], "options"=>[{"id"=>8876097437892, "product_id"=>6930626281668, "name"=>"Title", "position"=>1, "values"=>["Default Title"]}], "images"=>[{"id"=>30050785296580, "product_id"=>6930626281668, "position"=>1, "created_at"=>"2021-10-21T17:12:00+05:30", "updated_at"=>"2021-10-21T17:12:00+05:30", "alt"=>nil, "width"=>658, "height"=>734, "src"=>"https://cdn.shopify.com/s/files/1/0580/9861/4468/products/Default-1634816337-img1.jpg?v=1634816520", "variant_ids"=>[], "admin_graphql_api_id"=>"gid://shopify/ProductImage/30050785296580"}], "image"=>{"id"=>30050785296580, "product_id"=>6930626281668, "position"=>1, "created_at"=>"2021-10-21T17:12:00+05:30", "updated_at"=>"2021-10-21T17:12:00+05:30", "alt"=>nil, "width"=>658, "height"=>734, "src"=>"https://cdn.shopify.com/s/files/1/0580/9861/4468/products/Default-1634816337-img1.jpg?v=1634816520", "variant_ids"=>[], "admin_graphql_api_id"=>"gid://shopify/ProductImage/30050785296580"}}}

But this is what i see on Shopify.

Screenshot 2021-10-21 at 5.57.48 PM.png

Altough If I use Update Product API to update the published_scope as global, it updates for POS and  but again not for Online Store.

{"product"=>{"id"=>6930626281668, "published_scope"=>"global" }}

Screenshot 2021-10-21 at 6.06.25 PM.png

Screenshot 2021-10-21 at 6.06.55 PM.png

 

Please let me know what am I doing wrong here. 

Replies 2 (2)
Ashu24
New Member
5 0 0

Hi @Shopify Team,

Can anybody give an update on this?

GrahamS
Shopify Staff
156 25 32

Hello @Ashu24 ,

 

Thanks for bringing this to our attention. Some quick replications attempts on my end show the same behaviour that you are seeing.

It looks like you'll need to pass  ' "published": true ' as part of your payload body in order to get any given publication scope to apply to the online store. I'm going to approach our documentation team to have this revised for future clarity improvements.

 

Best,

Graham S | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog