Skip to main content
Level 1
Mar 25, 2024 8:22 PM UTC
Solved

Using REST API Push Lead to update leads with "updateOnly" created a new lead

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?

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Mar 25, 2024 8:50 PM UTC

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.

3 replies

SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Mar 25, 2024 8:50 PM UTC

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.

Translate
SaurabhGoyal_GN
Level 4
Mar 26, 2024 8:50 AM UTC

@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

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Mar 26, 2024 8:50 PM UTC

N.B. You’d need to call Push Lead or Sync Program Member after seeing the result of of Sync Lead.

Translate