REST API not returning anonymous leads

Anonymous
Not applicable

REST API not returning anonymous leads

Hi there,

We've run into an issue with the REST API. We know that if we send a request to get a lead by cookie in the SOAP API, it returns a Lead ID. However, whilst we expected the same thing from the REST API - we're getting empty objects back if those leads are not known.

Has anyone encountered this before? Is there an alternitve (other than rewriting that part of our application to use SOAP)?

This might be a question for Murtza Manzur...
Tags (1)
5 REPLIES 5
Anonymous
Not applicable

Re: REST API not returning anonymous leads

Heya,

We've found the same problem - it would be super-handy if this worked.

So +1 for this issue!

Cheers,

Dan.
Anonymous
Not applicable

Re: REST API not returning anonymous leads

Sorry about the slow reply here. I was on PTO for the past two weeks.

This is the expected behavior for the REST API. As you mentioned, the SOAP API would be the workaround here. If it is known lead, you can query by cookie id using the REST API:
http://developers.marketo.com/blog/get-a-visitors-cookie-id-and-then-query-associated-lead-data/
Anonymous
Not applicable

Re: REST API not returning anonymous leads

Thanks Murtza,

That's a shame; We're already fully commited to the REST API, so implementing the SOAP API alongside is a lot of extra effort just to be able to use one API method.

Do you know if this request will ever be made to work properly in future?

Cheers,

Dan.

 
Anonymous
Not applicable

Re: REST API not returning anonymous leads

Hi Murtza,

We had already rewritten for SOAP in absence of a reply - as I expected this to be the answer. However, I didn't see that documented anywhere and this is not what I would call 'expected behaviour' with the information on hand. I know it's impossible to document everything, but this cost us time/money (and will cost Dan the same) - which obviously isn't a great outcome for your customers.

I know you'll keep working on this, and I look forward to a more comprehensive REST API in future.

Thanks,
Brody
Anonymous
Not applicable

Re: REST API not returning anonymous leads

This is the expected behavior for the REST API. As you mentioned, the SOAP API would be the workaround here. If it is known lead, you can query by cookie id using the REST API:

I was under the impression that Marketo is dedicated to REST API for the future, http://developers.marketo.com/blog/marketo-rest-vs-soap-apis-faq/, So I was trying to update our integration code from SOAP to REST, but this so called, 'expected behavior' is almost a deal breaker.

Even the suggestion to use SOAP along side REST as a workaround seems pretty irresponsible to me. SOAP API allows the developer being able to update the anonymous lead's fields even it's not associated as a known one yet, but REST just doesn't allow to do the same task since you can't search it by _mkto_tkr cookie. I'm wondering whether this limitation is what exactly Marketo developer wants ... If that's the case, just being honest in the API documentation would be better.

In my humble opinion, it's a BUG, not an EXPECTED BEHAVIOR.