Given a period of time, for example, 2 hours, I would like to retrieve subscriber keys who's unsubscribe reason is 'Spam Complaint'. I've tried using various retrieve calls which either return too much data, or too little.
1 Answer
This worked:
<par:RetrieveRequest>
<par:ObjectType>SubscriberStatusEvent</par:ObjectType>
<par:Properties>SubscriberKey</par:Properties>
<par:Properties>ReasonUnsub</par:Properties>
<par:Filter xsi:type="par:ComplexFilterPart">
<par:LeftOperand xsi:type="par:SimpleFilterPart">
<par:Property>CreatedDate</par:Property>
<par:SimpleOperator>between</par:SimpleOperator>
<par:Value>2014-02-20T00:00:00.000</par:Value>
<par:Value>2014-02-21T00:00:00.000</par:Value>
</par:LeftOperand>
<par:LogicalOperator>AND</par:LogicalOperator>
<par:RightOperand xsi:type="par:SimpleFilterPart">
<par:Property>ReasonUnsub</par:Property>
<par:SimpleOperator>equals</par:SimpleOperator>
<par:Value>Spam Complaint</par:Value>
</par:RightOperand>
</par:Filter>
</par:RetrieveRequest>
SubscriberStatusEvent
. The retrievable fields areSubscriberKey
,CreatedDate
andReasonUnsub
and the filter was between twoCreatedDate
's. This returns backSubscriberStatusEvent
's and I get theReasonUnsub
's it's not efficient as I have to do some filtering on my side to get theReasonUnsub
s.