We have tested that when using the REST API to update a lead with the conditions:
action: "updateOnly",
lookupField: "id",
If the id is not found, a new lead is created with a new id. Why does this happen? If I am specifying updateOnly, shouldn't this prohibit any create actions?
Solved! Go to Solution.
The property is simply ignored for Push Lead. It would be better if we had JSON schema validation to discard the request immediately, but c’est la vie.
@jessica_swoogo - As Sandy mentioned, there is no action parameter in "push" lead endpoint.
If you want to update leads using REST APIs, then you should use this endpoint - "POST /rest/v1/leads.json" - This enpoint will respect the action parameter and will not create new record in to the system if you are using "updateOnly" as action.
Here is the marketo doc link.
Thanks,
Saurabh
@jessica_swoogo - As Sandy mentioned, there is no action parameter in "push" lead endpoint.
If you want to update leads using REST APIs, then you should use this endpoint - "POST /rest/v1/leads.json" - This enpoint will respect the action parameter and will not create new record in to the system if you are using "updateOnly" as action.
Here is the marketo doc link.
Thanks,
Saurabh
N.B. You’d need to call Push Lead or Sync Program Member after seeing the result of of Sync Lead.