API : retrieve list column names

SOLVED
Go to solution
Regular Participant

API : retrieve list column names

Hi,

 

I am using the getList method to retrieve a list information. However, I don't see the column names of the list in the results. Does a method exist to do so?

 

Thanks for your help

1 ACCEPTED SOLUTION

The custom fields are defined ahead of time as CustomField1 through CustomField15.  They won't change on a per account basis and there is no customization supported today in the API for custom naming.

Dave Berard
Senior Product Manager, Constant Contact

View solution in original post

6 REPLIES 6
Regular Participant

No response from support by email, no response here.

 

Thank you, great service.

Please see the response in this thread: https://community.constantcontact.com/t5/Developer-Support-ask-questions/API-get-the-list-id-in-Cons...

Dave Berard
Senior Product Manager, Constant Contact
Regular Participant

The link does not answer my question actually.

 

What I am reffering to is the result returned by the getList method

 

The result returned with this method is:

[id]
[name]
[status]
[contact_count]

 

I am looking for a way to also retrieve the columns / fields name of the list, how can I do that? That would be the default column names and also the custom / user created column names.

 

Does a function exist to do so? Thank you

Sorry for the confusion there.  What do you mean by column names, are you talking about Contact information like First Name, Last Name, etc?  If so, there is no method for that as the column names are shared across the entire product and can be found in the Contact documentation here: http://developer.constantcontact.com/docs/contacts-api/contacts-resource.html

Dave Berard
Senior Product Manager, Constant Contact
Regular Participant

Thank you,

 

however, if I have a list that contains custom columns names (such as "customfield-1" and "customfield-2" for example), would that mean I have to retrieve the first contact in the list to retrieve these custom columns names

 

(supposing there is something in those columns for the first contact since "Only custom_fields that have content are displayed in the output")

The custom fields are defined ahead of time as CustomField1 through CustomField15.  They won't change on a per account basis and there is no customization supported today in the API for custom naming.

Dave Berard
Senior Product Manager, Constant Contact

View solution in original post

Developer Portal

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

Visit Page