4

I'm trying to retrieve list subscribers for a specific list with a restriction on modified date. However, it always returns all list subscribers. Are multiple filters supported in the SOAP API? Here's what I'm trying to do...

<Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <Header> <fueloauth xmlns="http://exacttarget.com">***************</fueloauth> </Header> <Body> <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"> <RetrieveRequest> <ObjectType>ListSubscriber</ObjectType> <Properties>CreatedDate</Properties> <Properties>Client.ID</Properties> <Properties>SubscriberKey</Properties> <Properties>Status</Properties> <Properties>UnsubscribedDate</Properties> <Properties>ID</Properties> <Properties>Client.PartnerClientKey</Properties> <Filter xsi:type="SimpleFilterPart"> <Property>ListID</Property> <SimpleOperator>equals</SimpleOperator> <Value>100</Value> </Filter> <Filter xsi:type="SimpleFilterPart"> <Property>ModifiedDate</Property> <SimpleOperator>between</SimpleOperator> <DateValue>2014-11-30T10:30:50.092-05:00</DateValue> <DateValue>2014-12-17T10:30:50.122-05:00</DateValue> </Filter> </RetrieveRequest> </RetrieveRequestMsg> </Body> </Envelope>

1 Answer 1

8

Yes - just slightly different than how you are doing it. Instead of two filters, you would use a complexfilterpart

<Filter xsi:type="ComplexFilterPart" >
  <LeftOperand xsi:type="SimpleFilterPart">
    <Property>ListID</Property>
    <SimpleOperator>equals</SimpleOperator>
    <Value>100</Value>
  </LeftOperand>
  <LogicalOperator>AND</LogicalOperator>
  <RightOperand xsi:type="SimpleFilterPart">
    <Property>ModifiedDate</Property>
    <SimpleOperator>between</SimpleOperator>
    <DateValue>2014-11-30T10:30:50.092-05:00</DateValue>
    <DateValue>2014-12-17T10:30:50.122-05:00</DateValue>
  </RightOperand>
</Filter>
3
  • No worries - glad I could help! Dec 18, 2014 at 16:04
  • Another quick question... can you add more than 2 filters? I want to also be able to filter by Status == 'Active'. Is that possible? Feb 18, 2015 at 16:03
  • @Kelly J Andrews, one more question!.. How can i combine 6 or more filter conditions using 'OR' LogicalOperator
    – Sfdcprgmr
    Mar 5, 2018 at 11:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .