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.

Re: Determine which market created an order?

Solved

Determine which market created an order?

garyrgilbert
Shopify Partner
433 41 191

Hi All,

 

Is it possible to determine which market created an order via the APIs?  I have a plus merchant who wants to do specific things with an order for the different markets.  Currently I do not see any field that relates to which specific market the order was placed, only the presentment currency gives any hint but its not enough to determine which specific market the order "belongs" to.

 

Its obvious this data is maintained somewhere otherwise you wouldnt be able to see the sales statistics for the markets. I just don't see its availability in the APIs but maybe I missed it.

 

Anybody know where I might find this information for a specific order?

 

Cheers,

Gary

 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Accepted Solution (1)

evaldas_92
Shopify Partner
62 2 28

This is an accepted solution.

Shipping (or billing, in case there's no shipping needed) country determines the market.

 

Since a country can belong to only one market, you could look it up that way.

View solution in original post

Replies 3 (3)

evaldas_92
Shopify Partner
62 2 28

This is an accepted solution.

Shipping (or billing, in case there's no shipping needed) country determines the market.

 

Since a country can belong to only one market, you could look it up that way.

garyrgilbert
Shopify Partner
433 41 191

Hi Evaldas, 

 

Hey thanks for the tip, I guess I was kinda hoping for an easier method but ce la vie 🙂

 

I'll have to use the graphql query to get the markets and check which are active (since there is no query param to reduce the result to only active markets) and check on the fly, decompose the results to something for faster lookup and cache it for a while.

 

Thanks again for the info!

 

Cheers,

 

Gary

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
internetperson1
Shopify Partner
2 0 1

Hello,

 

Let's say we use "Billing  address" then that wouldn't in this scenario: I could be viewing a Japanese Market based product where my billing address is UK and I want it shipped to a friend there in Japan. In this case, the billing and the Market do not match.

 

I think having an order attributed to the Market (similar to how Products are tied to a Market) helps with the data integrity on top of Gary's response with it needing to be unnecessary complex to get that data by the region.