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!

    Meghan

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

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? 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

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM