Re: Is it possible to set markets using the API?

Is it possible to set markets using the API?

Volodya_pr
Shopify Partner
3 0 0

Is it possible to add and remove markets in specific products via the API?

Volodya_pr_0-1712955388382.png

 

 

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1453 238 509

Hey @Volodya_pr

 

This is possible through the publishablePublish and publishableUnpublish mutations. 

 

These are under the Shop object. 

 

These docs should help 🙂 

 

- https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/publishablePublish

- https://shopify.dev/docs/api/admin-graphql/2024-04/mutations/publishableUnpublish

 

Hope that helps! 

 

- Kyle G.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

hassanashas
Shopify Partner
10 0 1

Hi @ShopifyDevSup 

 

This mutation can be used to update the Sales Channels against the Product. How can we use it to update the Markets? 

Is there any example available for this? That would be really helpful and I would really appreciate if you can provide that.

Thanks a lot in advance! 

ShopifyDevSup
Shopify Staff
1453 238 509

Hey @hassanashas

 

I've just shared some examples here: https://community.shopify.com/c/graphql-basics-and/how-can-i-restrict-the-market-of-the-product-usin... 

 

Cheers, 

 

Kyle G.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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