Why is REST API "create or update" call blanking out existing values on lead record?

Danni_Holleran
Level 3

Why is REST API "create or update" call blanking out existing values on lead record?

There is a system that stands between our CMS and Marketo. It handles domain blocking for trials, etc. This system is using a create/update REST api call. The problem we are seeing is, while the values that are submitted on the form are updating the lead record in Marketo as they should, other fields (which we do not ask for on the form btw) are getting overwritten and being blanked out. On the form we do not ask for "address info" so we would hope that the call to Marketo wouldn't impact those fields but it is. Is there is a way for the create/update call to only update fields that actually have a value in them and to leave existing values of other fields alone?

Appreciate any insight here!

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Why is REST API "create or update" call blanking out existing values on lead record?

Upsert doesn't affect fields that aren't in the payload.

If you want to stop non-empty fields from being overwritten by empty fields in the payload, set field blocking in Admin.

P.S. Not clear why you'd need an intermediate system for domain validation, when this can be done via webhook without introducing the DoS vulnerabilities of an API layer.