+ Start a Discussion
Sarah Ron 4Sarah Ron 4 

apex rest api code

Hi There, I am very new to this and am setting up an apex rest api to where I want to check the data from our 3rd party database against a custom object and match it based on an email address to a lead and either update the matched lead, or if there is no match create the lead.

Can someone help me out with what that would look like?
DimondDimond
I think just an insert then use a trigger to do the processing would work. 
Aman PathakAman Pathak
hi Sarah,

you can do it the Rest API Class itself just, using wrapper class and then Processing based on your requirement.
there are tons of example on that.
Naren9Naren9
Hi Sarah,
Requirement is not clear to me. From 3rd party application, are you going to Search the Lead in Salesforce based on email Address and if it finds update record otherwise insert the lead. is this correct?. If yes, you are looking for a Apex Rest Api code to call from 3rd party application?.

Thanks,
Naren