I am currently pulling back all contact info per list, and most fields are coming through fine, but Address Line 2, and any custom fields are coming over blank in the JSON data. Is this a known issue?
I do not believe that we've seen this issue before. Open issues are posted here:
Can you send me the call you're making (method and endpoint), along with the response payload? Send me a PM with that if you can.
It's possible I'm missing something here, but it looks like the URI you're making a call to is to get the lists in an account (https://api.constantcontact.com/v2/lists/). Our lists don't have custom fields OR addresses. Only contacts do. See the valid properties when making calls to lists/ here.. The properties are listed near the bottom of the page.
Partner API Support Engineer
Thanks- yes, it appears you are missing the actual call url here, as I am passing in the specific list id as well to get the contacts within a given list grouping:
Dim ccAuth = objListCall.ProcessJSONHTTPRequest("https://api.constantcontact.com/v2/lists/" & strList & "/contacts?api_key=xxx", Nothing, "text/json", "GET", Session("ConstantContactAuthToken"),"Bearer")
Thanks, that makes sense. You're getting the contacts in a list. I just tried to reproduce the problem you're having by doing a GET to .../lists/list-id/contacts, but my contacts that have address line 2 and custom fields as part of their contact information are showing with both of those values in the contact list members data.
I make a PUT call directly to https://api.constantcontact.com/v2/contacts/contact-id to add addresses and custom fields to contact records. How are you adding those fields to your contacts? Perhaps that would shed some light on why you're not seeing these values, but I am in the list membership.
Partner API Support Engineer
I went in and manually added the custom fields and address line 2 to some test contacts directly in the CC UI. Are they not included unless creaed via API, or?
hi, any additional thoughts on this? I am still not getting custom fields or address 2 passed back via API, so I am at a standstill.
I have been digging into this and doing some testing today. After looking through the UI and performing a series of tests, I was able to retrieve both Address Line 1 and 2, and also Custom Field 2. In the case of the Address Lines, I would likely need to see the specific contact that you are working with. Would it be possible to PM me the username of the Constant Contact account you are testing in and the email address of your test contact(s)?
For the custom field, I expect that it is likely an issue with naming. There is currently a limitation that the API can only access custom fields which are explicitly names "Custom Field NN" where NN is a number between 1 and 15. For example: "Custom Field 4" or "Custom Field 13". I tested this with a custom field that matches this naming convention and it was returned properly through the API as well.
As I mentioned above, if your experience does not match this information, please PM me with some additional information so that I can check the data that you are using.