Got a 'How do I' question? Join 'Ask a Trainer' Monday to Friday, 11am to 4pm ET for instant help and pro tips!

Custom fileds not added.

user286192
Rookie
0 Votes
I am utilizing Constant Contact's REST API endpoint '/contacts/sign_up_form' to add or update a new contact to a list. Here is my request body:
 
{"email_address":"test@example.com","first_name":"","last_name":"","create_source":"Account","street_address":{"kind":"home","city":"
","state":"","postal_code":""},"list_memberships":["some_list_id"],"custom_fields":[{"custom_field_id":"IPADDRESS","value":null},{"custom_field_id":"LOAN _MOUNT","value":20000.0},{"custom_field_id":"LOAN_REASON","value":"Car loan"},{}]}
 
Then why I am not able to view those custom fields on my account for that contact  ?Is it necessary to create all custom fields in the account before using them in contact creation? What is the exact process of using custom fields? Or is it necessary to create a 'sign_up_form' with required custom fields before using it?
1 REPLY 1
Courtney_E
Moderator
0 Votes

Hello user286192,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

You do need to create the custom fields prior to being able to add data to them. 

 

It looks like you are using the names of the custom fields under "custom_field_id" rather than the actual IDs of the custom fields. 

 

You'd want to make a GET call to /contact_custom_fields in order to get the correct IDs of the custom fields:

 

GET custom_fields Collection

https://v3.developer.constantcontact.com/api_reference/index.html#!/Contacts_Custom_Fields/getCustom...

 

Please have a look and let us know if you have any other questions!


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up