SOAP API: why getMultipleLeads request doesnt return anything? | Community
Skip to main content
December 2, 2014
Question

SOAP API: why getMultipleLeads request doesnt return anything?

  • December 2, 2014
  • 5 replies
  • 1194 views
Hello all.

I want to retrieve the leads from a specific list. I'm sending the following query to the API:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mkt="http://www.marketo.com/mktows/">
   <soapenv:Header>
      <mkt:AuthenticationHeader>
         <mktowsUserId>*****</mktowsUserId>
         <requestSignature>*****</requestSignature>
         <requestTimestamp>2014-12-02T14:37:24+01:00</requestTimestamp>
      </mkt:AuthenticationHeader>
   </soapenv:Header>
   <soapenv:Body>
   
      <mkt:paramsGetMultipleLeads>
         <!--Optional:-->
        <StaticListSelector>
            <leadSelector xsi:type="ns1:StaticListSelector">
                <staticListName>MyProgram.MyList</staticListName>
          </leadSelector>
      </StaticListSelector>
      <batchSize>20</batchSize>
      </mkt:paramsGetMultipleLeads>
   </soapenv:Body>
</soapenv:Envelope>

But for some reasons it doesnt work. I get this as a result:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.marketo.com/mktows/">
   <SOAP-ENV:Body>
      <ns1:successGetMultipleLeads>
         <result>
            <returnCount>0</returnCount>
            <remainingCount>0</remainingCount>
            <newStreamPosition>id:0:ts:1417527490:os:0:rc:0</newStreamPosition>
            <leadRecordList/>
         </result>
      </ns1:successGetMultipleLeads>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

For information I'm sure my list contains some leads (more than 5000)

Thank you very much for your help
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

December 2, 2014
Can you try replacing <staticListId>MyProgram.MyList</staticListId> with the Id of your list
To find your list Id open it up in Marketo and the URL it should look something like:

https://app-XYZ.marketo.com/#ST3889A1
#ST stands for static list and
3889 is the list Id in this case.

<staticListId>3889</staticListId>
December 2, 2014
Thank you Cathal for helping me.

I've tried with the following code (my list URL is https://app-abq.marketo.com/#ST29654B2LA1) :

        <StaticListSelector>
            <leadSelector xsi:type="ns1:StaticListSelector">
                <staticListId>29654</staticListId>
          </leadSelector>
      </StaticListSelector>

But the results is the same. I'm using 2.7 API Endpoint.
December 2, 2014
By the way I have edited my first post because I'm using the <staticListName> tag when I call the API with the list name. It was a typo.
December 3, 2014
I am not sure what the error is. As an alternate solution, you could use the REST API for this use case. We have sample code for getting multiple leads with a list id: http://developers.marketo.com/documentation/rest/get-multiple-leads-by-list-id/


December 4, 2014
Thank you Murtza.

I made it works using the Java SDK wrapper so basically I'm happy with that. But just to know it the error is from my side or not, did you reproduce the error ? or is it working for you ?

PS: The REST API works perfectly