First_name, last_name becomes blank on adding custom fields V3 API

edivodev
Campaign Expert
0 Votes

Hi There,

We are trying to update custom fields for existing contacts

 

Expected behavior: Just update custom fields

Problem: when remaining fields are not passed example first_name, last_name they become blank

 

Url: https://api.cc.email/v3/contacts/3f426c9a-0518-11ea-b1b6-d4ae5292c36f

Payload: {"email_address":{"address":"developer@edivo.io"},"update_source":"Account","custom_fields":[{"custom_field_id":"5c7df5ec-305e-11ea-9b52-d4ae527547e4","value":"https:\/\/www.google.com"}]}

 

Before Updating:

{"id":"3f426c9a-0518-11ea-b1b6-d4ae5292c36f","email":"developer@edivo.io","first_name":Developer,"last_name":Edivo,"custom_fields":[]}


After Updating:

{"id":"3f426c9a-0518-11ea-b1b6-d4ae5292c36f","email":"arun@sociosquares.com","first_name":null,"last_name":null,"custom_fields":[{"custom_field_id":"5c7df5ec-305e-11ea-9b52-d4ae527547e4","value":"https:\/\/www.google.com}]}

 

1 REPLY 1
Jimmy_D
Employee
0 Votes

Hello @edivodev,

 

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

 

We do have this mentioned on the API Reference page for making a PUT to a contact. It is in the paragraph at the top of that section. However; I do think we can do a better job of pointing this out and I'll work with our website/documentation folks to see what we can do about that.

https://v3.developer.constantcontact.com/api_reference/index.html#!/Contacts/putContact

 

Basically if it is not a sub-resource and the field is not included it will be set to a null value.


Regards,
Jimmy D.
Tier II API Support Engineer
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