Happy Turkey Day! In recognition of Thanksgiving our Support office will be closed Thursday (11/23). We will be open Friday (11/24) for limited hours (10:00am - 6pm ET) and will be back to normal hours on Monday (11/27).
Using, https://api.constantcontact.com/v2/contacts, I'm getting a properly formed response, but the custom_fields structure is empty (and there is a (right now literally ONE, which does appear in the UI) custom field associated with this contact)..
The contact id is: "id":"1145136430",
Is this by design? I need that custom_field to return as it's my primary key in my databases.
Solved! Go to Solution.
Thank you for reaching out to the Constant Contact Community. It's my pleasure to assist you today.
Here is an article about using custom fields in the advanced editor, it should help with your issue. If it doesn't can you please email social_support(at)constantcontact(dot)com with a reference to this post, the name of the email you are creating, the contact with the custom field you mentioned as well as many details as you can provide us so we can have our advanced technical support take a look? Please also feel free to reach out to us here or via one of our other support channels. Thank you and have a great weekend.
This has nothing to do with the UI and everything to do with the APIs. Once I dug around and found out that the APIs will not return a custom_filed unless it follows the naming convention CustomFieldn (n=1-15) this resolved. It's very frustrating that this isn't explicitly called out in the documentation...especially when uploading a contact list on the front end.
If you check our documentation for contacts when doing a GET, POST, or PUT you will notice that in the sections for structure they all mention the custom_fields and how they need to be formatted.
Here is what the documentation states.
- custom_fields array You can create up to 15 custom fields for a contact. 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. label string (50) This read-only field displays the custom_field name entered using the product GUI, the value is displayed only if it matches the custom_field_n (n=1-15) format. name string You must name each custom field custom_field_1, custom_field_2,...custom_field_15. Only custom fields with values are shown in response to a GET call. value string (50) Content of the custom field
I can completely understand the frustration this can cause. Please know this has been changed with our v3 API which is under development and will be released soon. I do not yet have a release date though.
The behavior is fine, i mean it's not ideal but it is what it is...but it would be good to know that on the front end side when uploading a list. Good to know this will be implemented in v3 though, thanks for the tip Jimmy!