tag:support.getcheddar.com,2009-06-01:/discussions/questions/24860-is-it-possible-to-search-for-customers-by-countryCheddar: Discussion 2018-02-26T21:55:01Ztag:support.getcheddar.com,2009-06-01:Comment/446005812018-01-26T00:17:58Z2018-01-26T00:17:58ZIs it possible to search for customers by country?<div><p>In the UI can I search in some way to find customers with billing address = USA, or =UK for example?</p>
<p>(In the API, I could iterate all customers to do this?)</p></div>ashley schrodertag:support.getcheddar.com,2009-06-01:Comment/446005812018-01-26T16:46:36Z2018-01-26T16:46:36ZIs it possible to search for customers by country?<div><p>Hi Ashley,</p>
<p>You're correct that you can find the billing country by using the <a href="http://docs.getcheddar.com/#customers"><code>customers/get</code> call</a> to pull all paid customers records and then search the results for <code>ccCountry</code>. That param should contain ISO country codes (note that the ISO alpha 2 code for the UK is GB).</p>
<p>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 <code>ccCountry</code>. 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!</p>
<p>Meghan</p></div>Meghan Turner