A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hello,
I am trying to get available shipping rates for my store. I have setup couple of products and created two zones - USA and Canada as below -
When I tried to fetch availableShippingRates using calculatedDraftOrder GraphQL API, it returns rates properly for US address as below -
But when I use a Canadian address it returns empty array for availableShippingRates --
I have same products, same configuration for both zones. So wondering what I am missing here?
Could you please help?
Thanks,
-Meraj
Solved! Go to the solution
This is an accepted solution.
Hi @Meraj,
I wasn't able to replicate this behaviour on my test store, but have you checked to see if Canada is in the same market as the United States, and if not, how is the shipping is configured for the Canadian market?
If the discrepancy is due to a market specific shipping configuration I would also recommend explicitly setting the DraftOrderInput.marketRegionCountryCode and returning the marketName and marketRegionCountryCode fields to troubleshoot.
Hope that helps.
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
This is an accepted solution.
Hi @Meraj,
I wasn't able to replicate this behaviour on my test store, but have you checked to see if Canada is in the same market as the United States, and if not, how is the shipping is configured for the Canadian market?
If the discrepancy is due to a market specific shipping configuration I would also recommend explicitly setting the DraftOrderInput.marketRegionCountryCode and returning the marketName and marketRegionCountryCode fields to troubleshoot.
Hope that helps.
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
Thanks for reply and pointing to the right direction. This did solve the problem. It looks like my primary market was "US" but Canada was in international market which was not active. I created a new Canada specific market and also activated international market. Now shipping rates are returned for any country properly.
Thanks for help!