Community
Showing results for 
Search instead for 
Do you mean 
Reply

Updating contact and company customFields via API fails to update

New Member
Posts: 1
Country: United_Kingdom

Updating contact and company customFields via API fails to update

We're experiencing a strange issue with the API in relation to customFields for contacts and companies.

 

Whilst all other fields update as expected, the object's customFields appear to be ignored. No error is thrown, but the result returned doesn't contain the updated data.

 

For example, sending a PATCH request, with the ID "f4d32791-29bf-4d04-8260-aa4ef93ff77f" and the following data:

 

 

{
  "id": "f4d32791-29bf-4d04-8260-aa4ef93ff77f",
  "contactType": "Contact",
  "firstName": "xxxxxx",
  "lastName": "xxxxxx",
  "jobTitle": "xxxxxx",
  "emailAddress": "xxxxxx",
  "businessAddress": {
    "line1": "xxxxxx",
    "line2": "xxxxxx",
    "line3": null,
    "city": "xxxxxx",
    "state": "xxxxxx",
    "postalCode": "xxxxxx",
    "country": null
  },
  "customFields": {
    "title1": "Mrs",
    "no mailing": "False",
  }
}

 

...would return the updated contact object as expected, however "title1" and "no mailing" - the "customFields" fields, would come back in their original state, empty or "Mr" instead of "Mrs" perhaps.

 

The additional complication is, if, instead of allowing our code to make the request, and instead get it to spit out the data in JSON format, and then copy/paste this into Act's Swagger, these fields do update.


So we're left wondering whether these 'special' fields have special permissions that restrict updating via the API? Perhaps only allowing updating from a specific predefined IP?

 

 

Administrator
Posts: 1,372
Country: United_Kingdom

Re: Updating contact and company customFields via API fails to update

One thing about the above request I noticed is that there is an invalid comma at the end of the customFields object, trailing the "no mailing" object.

Though when I've tested that, it appears the request worked successfully anyway.

I've been unable to replicate the issue you're seeing even using the same fields names etc. Are you on the latest version of the Act! Web API? You can download the latest version for the server here: https://developer.act.com/

Just to clarify, the rest of the object IS updated correctly, but the changes within the customFields object don't get applied?
And you're using the PATCH method to the "/api/contacts/{id}" endpoint?