cancel
Showing results for 
Search instead for 
Did you mean: 
Constant Contact wants to help you succeed! We’re celebrating our professional service programs on the Constant Contact Community this month and you have a chance to try one of the services for free! Learn more.

C# Wrapper for V2 API - GetContact not returning Addresses

SOLVED
Advisor

C# Wrapper for V2 API - GetContact not returning Addresses

The subject pretty much asks my question. But here is a repeat of the question. How can I get V2 API using C# wrapper to return the Addresses. My code looks like this...

 

public static CTCT.ConstantContact api = new CTCT.ConstantContact();

.

.

.

Contact c = api.GetContact(contactId);

 

//c.Addresses.Count is zero even though the contact has address information.

 

2 REPLIES 2
Honored Contributor

Re: C# Wrapper for V2 API - GetContact not returning Addresses

Hi Mike,

 

Based on what you've provided, I strongly suspect that the issue you're running into has to do with Address Types. With the current version of our API we currently support only two address types in the UI/API:

  1. Home / PERSONAL
  2. Work / BUSINESS 

Based on what you're seeing, I strongly suggest that your test contact has the address stored as the type Other or Vacation, which are not returned in the API. In order to resolve the issue you will want to create your addresses under one of the two supported types. Existing contacts can be editing the UI to change the type so that you can see it in the API.

 

If you continue to have trouble after changing the address type or haave any question, please let me know!

 

Sincerely,

Elijah G.
API Support Engineer
Advisor

Re: C# Wrapper for V2 API - GetContact not returning Addresses

Thank Elijah. That explains it.