Forums

Answered

Retrieve People's Addresses

I'm looking to pull (among other things) the addresses for people in the system.

As best I can see there is no supported method for this in the API.

Is there something I am missing?


Best Answer

Hi Nathan, 


By default the people/getAll and people/getInfo endpoints don't get this information, but if you add the "fields" argument into your calls you can get a number of address fields. Have a look at this page for the fields you can request.


Exactly how you pass that argument depends on your language though.


In python though you can do the following as an example.

import ElvantoAPI

conn = ElvantoAPI.Connection(APIKey="XXXXXX")

people = conn._Post("people/getAll", fields=["mailing_address", "mailing_address2", "mailing_city", "mailing_state", "mailing_postcode"])

Hope this helps,

Stewart


There was something I was missing. Sorted now, can delete this thread.

Answer

Hi Nathan, 


By default the people/getAll and people/getInfo endpoints don't get this information, but if you add the "fields" argument into your calls you can get a number of address fields. Have a look at this page for the fields you can request.


Exactly how you pass that argument depends on your language though.


In python though you can do the following as an example.

import ElvantoAPI

conn = ElvantoAPI.Connection(APIKey="XXXXXX")

people = conn._Post("people/getAll", fields=["mailing_address", "mailing_address2", "mailing_city", "mailing_state", "mailing_postcode"])

Hope this helps,

Stewart


Gah! You replied just before I did!

Cheers anyway Stewart! I thought it seemed like a strange thing not to be able to do, but I couldn't for the life of me see what I was missing!... Until I stumbled across the link you posted!


Login or Signup to post a comment