Is it possible to add and remove markets in specific products via the API?
Topic summary
Topic: Whether product availability can be managed per Market via the API.
- Initial question: Add/remove Markets for specific products through the API? An image was attached but is not essential to the solution.
- Core guidance: Yes—use the Admin GraphQL publishablePublish and publishableUnpublish mutations (under the Shop object) to manage availability via API. Official docs were linked for both mutations.
- Clarification request: A follow-up asked how these mutations—commonly used for Sales Channels—apply to Markets, and requested examples.
- Latest update: Shopify support provided a link to a separate community post containing concrete GraphQL examples on restricting a product’s Market.
Outcome and status:
- Actionable path provided (use publishablePublish/publishableUnpublish) with reference docs and example implementations via the linked thread.
- No code samples appear directly in this thread; examples are external. The discussion appears effectively resolved pending implementation using the shared examples.
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.
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!
Hey @hassanashas ,
I’ve just shared some examples here: https://community.shopify.com/post/2535780
Cheers,
Kyle G.
