New Shopify Certification now available: Liquid Storefronts for Theme Developers

Get shipping destination country from order id

Solved
mwolfeu_pi3g
Shopify Partner
5 1 1

I would like to modify a query like:

{
"query": "query { order(id: \"gid://shopify/Order/12345\") { agreements(first: 10) { edges { node { id happenedAt sales(first: 30) { edges { node { actionType lineType quantity totalAmount { shopMoney { amount } } ... on ProductSale { lineItem { id name sku } } } } } } } } } }"
}

 

To return the destination country for the order as well.  Any help appreciated.

Thanks!

 

Accepted Solution (1)
mwolfeu_pi3g
Shopify Partner
5 1 1

This is an accepted solution.

It was actually pretty easy.  I just had to add shippingAddress { countryCodeV2 }.

View solution in original post

Replies 2 (2)
mwolfeu_pi3g
Shopify Partner
5 1 1

This is an accepted solution.

It was actually pretty easy.  I just had to add shippingAddress { countryCodeV2 }.

Liam
Shopify Staff
Shopify Staff
1898 202 577

Great to hear you figured this out and thanks for coming back to post the solution!

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