SOAP API: why getMultipleLeads request doesnt return anything?

Anonymous
Not applicable

SOAP API: why getMultipleLeads request doesnt return anything?

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
Tags (1)
5 REPLIES 5
Anonymous
Not applicable

Re: SOAP API: why getMultipleLeads request doesnt return anything?

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>
Anonymous
Not applicable

Re: SOAP API: why getMultipleLeads request doesnt return anything?

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.
Anonymous
Not applicable

Re: SOAP API: why getMultipleLeads request doesnt return anything?

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.
Anonymous
Not applicable

Re: SOAP API: why getMultipleLeads request doesnt return anything?

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/


Anonymous
Not applicable

Re: SOAP API: why getMultipleLeads request doesnt return anything?

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