What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Get shipping destination country from order id

Solved

Get shipping destination country from order id

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
Community Manager
3108 344 895

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