Let’s say you want to find leads that were updated on specific dates via the Marketo API. This is possible with the getMultipleLeads SOAP API. This method will return any leads with a data value change or new activity in Marketo for the date range you request.
For the leadSelector, you would specify LastUpdateAtSelector. Then, you would define the date ranges with oldestUpdatedAt and latestUpdatedAt time bounds. Please see the sample Request XML below, which shows you how to find leads that were updated between 12am PST on June 6, 2014 and 12am PST on June 7, 2014.
Note: the date range must not exceed 30 days.
Sample Request XML to Find Leads Updated by Date
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mkt="http://www.marketo.com/mktows/"> <soapenv:Header> <mkt:AuthenticationHeader> <mktowsUserId>REPLACE</mktowsUserId> <requestSignature>REPLACE</requestSignature> <requestTimestamp>2014-10-23T12:19:51-07:00</requestTimestamp> </mkt:AuthenticationHeader> </soapenv:Header> <soapenv:Body> <mkt:paramsGetMultipleLeads> <leadSelector xsi:type="mkt:LastUpdateAtSelector"> <oldestUpdatedAt>2014-06-06T00:00:00-08:00</oldestUpdatedAt> <latestUpdatedAt>2014-06-07T00:00:00-08:00</latestUpdatedAt> </leadSelector> </mkt:paramsGetMultipleLeads> </soapenv:Body> </soapenv:Envelope> |