retrieve custom fields list

SOLVED
Go to solution
Occasional Participant

retrieve custom fields list

Hello,

is there a way to get list of custom fields associated with the account using API? I want to use it for initial import of some of the fields into my application and for further contacts update.

Also there seems to be a problem getting list of custom fileds associated with a contact. I requested an individual contact and a set of contacts from a list, in both cases the "custom_fields" array is empty, although I have several custom fields and they are filled in for the contacts I tried to retrieve.

I used PHP API wrapper and https://constantcontact.mashery.com/io-docs form. I think it's somehow related to this restriction

The API currently only supports the custom field format described here. If the account uses the new contact management system, it is possible to create custom fields with varying formats. The API ignores custom fields not using the format below.

but I'm not sure how to set these field names correctly. I created one custom field on manual list import, another in 'my settings'.

thanks.

1 ACCEPTED SOLUTION

Hello,

 

You do understand correctly what is needed to use custom fields when you are adding/updating a contact. At present, there is an additional limitation that the API cannot currently display custom fields other than 'Custom Field NN'. This limitation exists because the underlying back-end system that the API uses to connect is still in the process of being updated to handle custom fields that do not match the older pattern. Once these updates are available, we expect to be able to begin developing functionality to support all custom fields with our API.

 

Best Regards,

Elijah G.
API Support Engineer

View solution in original post

6 REPLIES 6
Member

Hello,

 

In this case, what you are running into is a known limitation of the API. At present, the API is only able to manage a fixed set of 15 Custom Fields: 'Custom Field 1' through 'Custom Field 15'. This limitation is in place because there are some important back-end updates that are in-progress to expose within the API the new system for managing custom fields and the creation of custom fields with customized names. While we are working to expose this new functionality to our APIs, I unfortunately cannot say when this is expected to be available.

 

With this limitation in place, the simplest solution is to intentionally create a set of Custom Fields named Custom Field 1 - Custom Field 15 for the immediate term, and use those fields with the API.

 

Best Regards,

Elijah G.
API Support Engineer
Occasional Participant

Hello Elijah, thanks for the response.

it's more or less clear that I can use the predefined array of custom fields when I update or create a new contact. I'm developing an integration wizard and I was planning to get actual field names, e.g. 'mobile', 'currency' etc for display, but it's not a huge deal.

what concerns me the most is that when I get a set of contacts from a certain list (/lists/listId/contacts call) or get a certain contact by its ID (/contacts/contactId call), which I guess use the same structure as a response, the custom_fields property is empty, even though these contacts certainly have custom fields set. I read there is a certain limitation for the custom fields structure in the API docs, but I'm not sure I understood it correctly. could you please show me the right direction there? thanks.

 

Hello,

 

You do understand correctly what is needed to use custom fields when you are adding/updating a contact. At present, there is an additional limitation that the API cannot currently display custom fields other than 'Custom Field NN'. This limitation exists because the underlying back-end system that the API uses to connect is still in the process of being updated to handle custom fields that do not match the older pattern. Once these updates are available, we expect to be able to begin developing functionality to support all custom fields with our API.

 

Best Regards,

Elijah G.
API Support Engineer

View solution in original post

Occasional Participant

Hello Elijah,

thanks a lot, I finally understood it. yes, this is very restrictive and confusing for end users. I hope it will be fully supported soon. once again, thanks for the explanation.

This appears to still be an issue.  I read the part about using custom fields named "Custom Field 1" to "Custom Field 15", but is there a way to get *existing* custom field data out of the API?  I've looked for a way to rename custom fields (e.g. 'Industry') to 'Custom Field 1' etc, but I haven't found anything so far... 

Hi @DeborahK742,

 

Our current v2 API cannot access the data from a custom field that does not follow the naming rules of custom_field_n. However; we are developing our v3 API and we are hoping to release the first stages of that soon which will include the ability to use those custom fields that you have already created using the website UI.

 

Keep an eye on the developer page at https://developer.constantcontact.com/ and you should also see messaging in your account when we release the v3 API.


Regards,
Jimmy D.
Tier II API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page