Is it possible to search for customers by country?

ashley schroder's Avatar

ashley schroder

26 Jan, 2018 12:17 AM

In the UI can I search in some way to find customers with billing address = USA, or =UK for example?

(In the API, I could iterate all customers to do this?)

  1. Support Staff 1 Posted by Meghan Turner on 26 Jan, 2018 04:46 PM

    Meghan Turner's Avatar

    Hi Ashley,

    You're correct that you can find the billing country by using the customers/get call to pull all paid customers records and then search the results for ccCountry. That param should contain ISO country codes (note that the ISO alpha 2 code for the UK is GB).

    You can also use the customer search feature to get all paid customers, then view the search results as XML or JSON (see buttons on the bottom of the search page) and search for ccCountry. The JSON and XML files only display the current page of your search results. If your customer search is multiple pages, make sure to get the XML or JSON for each page of your search. Hope that helps, but let me know if you have any other questions!


  2. Meghan Turner closed this discussion on 26 Feb, 2018 09:55 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac