Partner API return Shop country

Is it possible to get the Shop country returned via the API. This data is currently available in the CSV you can download from the partner dashboard but not the API.

I don’t think so.

The Partner API is pretty limited, you have to cross reference data from the Admin API pretty frequently.

Just curious - what do you need the country field for?

This data is currently available in the CSV you can download from the partners dashboard. Completely feasible to be added to the partner API.

For the app that I run I do not have access to the Admin API.

I use the country to generate metrics based on what country your users are from. We this to create cohorts and present other metrics based on this.

Getting the shopify plan too would also be nice, for the same above reasons.

To echo what Dylan said it’s not available through the API. This is an ongoing issue with Partner Metrics (an open source app metrics project) where you can only see the country data if you import data via the CSV method.

If you absolutely need the country for a store you can access one-by-one by going to https://DOMAIN.myshopify.com/meta.json. For example, https://allbirdseu.myshopify.com/meta.json returns:

{
    "id": 20404830283,
    "name": "Allbirds EU",
    "city": "Amsterdam",
    "province": "",
    "country": "NL",
    ...
}

If you save that locally for each store you should be able to get the data you need.

2 Likes

Hi Daniel,

Thank you that was helpful! I’ll use that.

Don’t suppose there is a way to get a Shopify stores plan based on json, tag or header from the store?

Glad it helped!

I’m not aware of public any way to get the shop’s plan. At points in time there were ways to distinguish Shopify Plus/non-Shopify Plus stores based on extra features the Plus stores had but those are always subject to change. I haven’t looked at that recently so I’m not sure if there’s a marker you could use for that

Hmm, there must be a way to retrieve the plan. Mantle are successfully showing the plan of the store :thinking:

As far as I understand Mantle, you are sharing the API key for each store that installs; meaning they have full access to the admin API.

At SaaS Insights we are only using the Partner API.