Is there any way to check or uncheck the markets information of a product (via API)?

Solved

Is there any way to check or uncheck the markets information of a product (via API)?

pquy1008
Shopify Partner
4 0 0

Is there any way to check or uncheck the markets information of a product (via API)?
Thank you very much

Accepted Solution (1)
Liam
Shopify Staff
2862 313 813

This is an accepted solution.

From looking into this, it should be possible to manage these via the publishablePublish and publishableUnpublish mutations. Markets should all have a catalog, and that catalog has a publication . You can query that to get a publication ID with any other publication mutations or queries.

Liam | Developer Advocate @ 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

View solution in original post

Replies 7 (7)

Liam
Shopify Staff
2862 313 813

Hi Pquy1008,

 

Is this a value within the Shopify admin?

Liam | Developer Advocate @ 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

pquy1008
Shopify Partner
4 0 0

No, it is a list of checkboxes

pquy1008
Shopify Partner
4 0 0

Yes, it is a list of checkboxes and can be modified through Shopify Admin

Liam
Shopify Staff
2862 313 813

Is this the area you'd like to control via API: 

 

Liam | Developer Advocate @ 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

Liam
Shopify Staff
2862 313 813

This is an accepted solution.

From looking into this, it should be possible to manage these via the publishablePublish and publishableUnpublish mutations. Markets should all have a catalog, and that catalog has a publication . You can query that to get a publication ID with any other publication mutations or queries.

Liam | Developer Advocate @ 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

pquy1008
Shopify Partner
4 0 0

Thank you very much, exactly what I need.

Ibou416
Shopify Partner
1 0 0

Hi @Liam , It's not working for me because my Markets don't have catalog. Do I need to add a catalog to my markets manually or it's something automatic? 

Also, when I query the publications, I'm only getting the channels (Online Store, Point of Sale, etc...), I'm not seeing the markets.

 

Hi @pquy1008, have you been able to make it work?