2

I'm trying to retrieve emails on a Suppression List using the SOAP API

Here is my SOAP Envelope

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    ...
  </soap:Header>
  <soap:Body>
    <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI" xmlns:ns2="urn:fault.partner.exacttarget.com">
      <RetrieveRequest>
        <ObjectType>ListSubscriber</ObjectType>
        <Properties>SubscriberKey</Properties>
        <Properties>ListID</Properties>
        <Properties>Status</Properties>
        <Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ComplexFilterPart">
          <LeftOperand xsi:type="SimpleFilterPart">
            <Property>ListID</Property>
            <SimpleOperator>equals</SimpleOperator>
            <Value>1234</Value>
          </LeftOperand>
          <LogicalOperator>AND</LogicalOperator>
          <RightOperand xsi:type="ComplexFilterPart">
            <LeftOperand xsi:type="SimpleFilterPart">
              <Property>CreatedDate</Property>
              <SimpleOperator>greaterThanOrEqual</SimpleOperator>
              <Value>2018-04-15T15:49:21.707</Value>
            </LeftOperand>
            <LogicalOperator>AND</LogicalOperator>
            <RightOperand xsi:type="SimpleFilterPart">
              <Property>CreatedDate</Property>
              <SimpleOperator>lessThanOrEqual</SimpleOperator>
              <Value>2019-04-15T15:49:36.913</Value>
            </RightOperand>
          </RightOperand>
        </Filter>
      </RetrieveRequest>
    </RetrieveRequestMsg>
  </soap:Body>
</soap:Envelope>

This query works for other types of Lists, but not for Suppression Lists.

My query looks similar to the example on https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/retrieving_all_subscribers_on_a_list.htm What am I doing wrong?

0

The subscribers on the suppression list can be queried like this as the suppression list is created as a data extension and not as a list. The external key can be found in the Auto-Suppression Configuration under Send Management in Email studio.

  <soapenv:Body>
  <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
     <RetrieveRequest>
        <ObjectType>DataExtensionObject[External Key]</ObjectType>
        <Properties>Email Address</Properties>
        <Properties>Date Added</Properties>
        <Filter xmlns:q1="http://exacttarget.com/wsdl/partnerAPI" xsi:type="q1:SimpleFilterPart">
           <q1:Property>Date Added</q1:Property>
           <q1:SimpleOperator>greaterThanOrEqual</q1:SimpleOperator>
           <q1:Value>2018-04-15T15:49:21.707</q1:Value>
        </Filter>
     </RetrieveRequest>
  </RetrieveRequestMsg>

Best, Mischel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.