cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Fields ## not returned via API calls

All Star

Custom Fields ## not returned via API calls

Hi All,

I'm trying to get contact information for an integration project and i cant seem to get the list of custom fields to show up in the response body. I  created "Custom Field 1" and "Custom Field 2" using the GUI and added some data. I tried both my code and the API tester in mashery.com but the JSON response body doesn't have any custom fields.

 

Any assistance will be greatly appreciated. 

4 REPLIES
Moderator

Re: Custom Fields ## not returned via API calls

Hi @RonK7,

 

 

Thank you for reaching out to Constant Contact's API Support.

 

You were correct in naming the custom fields with a number; however it actually has to be named very specifically. custom_field_n

 

You used custom field 1 and needed to use custom_field_1 so the API could read it. Just an fyi we are working on a v3 of our API where the naming convention will be different. Once that is released this will be much easier to use.


Regards,
Jimmy D.
Tier II API Support Engineer
All Star

Re: Custom Fields ## not returned via API calls

Thanks Jimmy. I just tried it and it works. It also works as "customfield1" without spaces. I created 3 custom fields and i delete them using the GUI for both operations. Now i get an error when i try to re-create them. The API call still shows the list empty and the GUI has no custom fields. 

 

Any ideas?

 

Moderator

Re: Custom Fields ## not returned via API calls

Hi @RonK7,

 

I would try using the API and POSTing or PUTting to a contact using the custom field name that you deleted. I'm thinking that the name might still be "in use" in our system with an ID attached to is so when you go to create it again you are receiving an error. If you just assume the field is already created and you enter data in that field using the API (which doesn't really care to much if the field has been created or not as long as the name is correct) then it should work hopefully.

 

Let me know how that goes and if you still have problems feel free to email us at webservices@constantcontact.com so we can do some troubleshooting.


Regards,
Jimmy D.
Tier II API Support Engineer
Highlighted
All Star

Re: Custom Fields ## not returned via API calls

Hi Jimmy,

 

It appears that manipulating them via the API works.

 

Thanks

 

Still need help?
You can post a new message in the Community or find us on Twitter Mon-Fri 8am - 8pm ET. We've got real people waiting to help you out. Click below to start a conversation!