0 Replies Latest reply on May 3, 2016 10:51 PM by de4f7da810976578033a1bc0df2d1edec024246a

    SOAP API not returning newStreamPosition

      Hello,

      I'm working on a SOAP integration and I'm seeing some strange behavior.  I'm making a call to the getMultipleLeads endpoint that looks like this:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:ns1="http://www.marketo.com/mktows/"
         xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

        <SOAP-ENV:Header>

        <ns1:AuthenticationHeader>

        <mktowsUserId>...</mktowsUserId>

        <requestSignature>...</requestSignature>

        <requestTimestamp>2016-05-03T23:38:49-06:00</requestTimestamp>

        </ns1:AuthenticationHeader>

        </SOAP-ENV:Header>

        <SOAP-ENV:Body>

        <ns1:paramsGetMultipleLeads>

        <leadSelector xsi:type="ns1:LeadKeySelector">

        <keyType>EMAIL</keyType>

        <keyValues>

        <stringItem>email1@test.com</stringItem>

        <stringItem>email2@test.com</stringItem>

        <stringItem>email3@test.com</stringItem>

        <stringItem>email4@test.com</stringItem>

        </keyValues>

        </leadSelector>

        <batchSize>2</batchSize>

        </ns1:paramsGetMultipleLeads>

        </SOAP-ENV:Body>

      </SOAP-ENV:Envelope>

       

      As you can see, I'm setting a very small batch size in order to test the newStreamPosition behavior.  The response I'm getting looks like this:

       

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.marketo.com/mktows/">

        <SOAP-ENV:Body>

        <ns1:successGetMultipleLeads>

        <result>

        <returnCount>2</returnCount>

        <remainingCount>3</remainingCount>

        <newStreamPosition/>

        <leadRecordList>

        ...

        </leadRecordList>

        </result>

        </ns1:successGetMultipleLeads>

        </SOAP-ENV:Body>

      </SOAP-ENV:Envelope>

       

      The strange thing is that the remainingCount says 3, which is correct based on the data I have, but the newStreamPosition is empty.  Therefore I don't have a way to make another call to get the next batch of 2 documents.

       

      This exact use case is documented on Marketo's own site - http://developers.marketo.com/blog/retrieving-customer-and-prospect-information-from-marketo-using-the-api/.

       

      It's not working for me.  Is this a bug?