ActiveCampaign Forum

How to update FieldValues for Contacts


#1

Hi,

I m trying to create or update custom field values using the v3 API.

  1. find out if a custom fieldvalue exsists,
  2. if it does update it
  3. if it does not, create it.

The problem is in the first step:

There is no GET /fieldValues documented, however, this endpoint does exist and returns all field values, but filter[contact] or filter[field] are not supported it seems. The only way would be to get all filedvalues for all fields and contacts and then filtering them in my client, but for 40K records, this is very inefficient.

Another option would be to do a POST and then a PUT if it returns an error. I can create a fieldValue using POST /fieldValues, but if I POST the fieldValue again, the post gets accepted (with a new id) and does not return an error. Furtermore, the value does not change in the UI.

Is there another way to do this, or can the Get /FieldValues be extended with filters on contact and field. An alternative would be to return an error if the contact/field combination alreay exists on POST.


#2

I’ve submitted your info to our technical support team, who will be in touch soon. Thanks!


#3

Was there a solution to this problem - please can you share?


#4

There is now a GET /fieldValues call available here: https://developers.activecampaign.com/v3/reference#list-all-custom-field-values-1

Hope this helps!