When I try to use Create/Update Leads REST API, http://developers.marketo.com/documentation/rest/createupdate-leads/
I got wrong api call results as described below:
NOTE: before the api call:
On Marketo, I already have leads with id=14 and id=15.
Request url:
https://541-KMH-410.mktorest.com/rest/v1/leads.json?access_token=86160629-baff-41c7-ad3b-d7c6adbaa739:sj
Post Request body:
{"input":[{"id":15,"lastName":"las15UNKNOWN","email":"em15ttt@np.com","firstName":"fis15Unknown"},{"id":14,"lastName":"las14UNKNOWN","email":"em14ttt@np.com","firstName":"fir14Unknown"}],"action":"createOrUpdate", "lookupField":"id”}
Response body:
{"requestId":"10a78#14736a883ab","result":[{"id":14,"status":"updated"},{"id":14,"status":"updated"}],"success":true}
NOTE: after the api call:
On Marketo, the lead with id=14 is wrongly updated by the request contents for id=15, also the lead with id=15 is not updated at all.
Expected Results:
The Response body should have both “id”:14 and “id”:15 and their status correspondingly, not two “id”:14 and “id”:14.
On Marketo, lead with id=14 and id=15 should updated with its request contents correspondingly.
Although the errors above, I tried further and I have a few more questions below:
-
If I don’t include “lookupField” in the post request body, it will create two more Leads although id=14 and id=15 already exist on Marketo. Do I have to include "lookupField":”id” to match existing lead on Marketo for createOrUpdate?
-
If I have “lookupField”:”email” in the request body but for one of the leads it doesn’t have email in the request body input, I got error response: "status":"skipped","reasons":[{"code":"611","message":"System Error”}] Do I always need to have email in request content for the lead update if I have email as lookupField?
-
Is there a limit for the number of leads I can createOrUpdate in one request above? For example, in request body, can I have 100,000 leads in one request?