AnsweredAssumed Answered

Push leads to Marketo via REST API - help with structuring the URL?

Question asked by 16bb5463a0143aab4780ee36e5906dbc8ff65d81 on Apr 5, 2017
Latest reply on Apr 6, 2017 by 16bb5463a0143aab4780ee36e5906dbc8ff65d81

Hello fine members of Marketo Nation!

 

I am once again in need of your help. I'm trying to help a 3rd party push leads to our Marketo instance via the REST API, and I'm struggling to get it to work. Thing is, in the past, we got it to work with another company, and they provided a clip of the string they used, so I thought "hey we can totally use that in this instance too" since this client is trying to do the same thing. Ha! If only it were so easy!

 

Anyway, here's what they're sending to us:

 

https://[exampleEndpoint].mktorest.com/rest/v1/leads/push.json?access_token=[ourToken]&[customField]=value&firstName=John&lastName=Smith&postUrl=https://350-yae-212.mktorest.com/rest/v1/leads.json&emailAddress=test@test.com&clientId=[clientId]&tokenUrl=https://[exampleEndpoint].mktorest.com/identity/oauth/token&secretKey=[secretKey]&grant_type=client_credentials&action=createOnly

And here is the error that's returned:

{"requestId":"[insert numbers here]","success":false,"errors":[{"code":"1001","message":"For input string: \"push\" failed to convert to a number"}]}

 

Okay, so, I looked that error code up, and my impression is that it's assigning a bad field type somehow. (trying to convert a string to an integer? or am I totally off base here?) I've got no idea where to even start here, though, since I'm not sure what it looks like on their side to push the lead to us to begin with. Am I forming the URL incorrectly? If there's no way for me to test it in my side (though I can return the same error if I just click on the link in my browser), is there a direction I can point them in for doing it correctly?

 

Uggh databases, amirite?

Til next time,

-Alex

Outcomes