1

We want to unsubscribe a user from a list using the SOAP API. Deleting the user works, but setting the status unsubscribed does not.

here is what we tried:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
  <ns1:fueloauth xmlns:ns1="http://exacttarget.com">{{token}}</ns1:fueloauth>
</soapenv:Header>
<soapenv:Body>
    <UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <Objects xsi:type="Subscriber">
             <EmailAddress>xxx@gmails.com</EmailAddress>
             <SubscriberKey>xxx@gmails.com</SubscriberKey>  
             <Lists>
                <ID>42</ID>
                <Action>Unsubscribed</Action>
             </Lists>
        </Objects>
    </UpdateRequest>
</soapenv:Body>
</soapenv:Envelope>

Is it simply changing the action or is there more involved? Cant really find it in the docs.

  • Thinking out loud... What about updating the List and the Subscriber, not just the list? – Timothy Oct 27 '14 at 16:50
0

Please try adding SaveOptions with SaveAction of 'UpdateAdd' and PropertyName of * (star)

See link [http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/updating_an_existing_subscriber_using_the_create_method_with_updateadd/][1]

Try this & let us know if this works.

So sample SOAP

<soapenv:Body>
    <Options>  
                <SaveOptions>  
                    <SaveOption>  
                        <PropertyName>*</PropertyName>  
                        <SaveAction>UpdateAdd</SaveAction>  
                    </SaveOption>  
                </SaveOptions>  
            </Options>  
    <UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <Objects xsi:type="Subscriber">
             <EmailAddress>xxx@gmails.com</EmailAddress>
             <SubscriberKey>xxx@gmails.com</SubscriberKey>  
             <Lists>
                <ID>42</ID>
                <Action>Unsubscribed</Action>
             </Lists>
        </Objects>
    </UpdateRequest>
</soapenv:Body>
| improve this answer | |
  • Above did not worked but forced me to dig deeper. In the end it was solved by adding a status to the list. – Danler Oct 28 '14 at 8:40
  • oh yes.. The field should have been <status> opposed to <action>. Didn't even notice that. Glad it's resolved. – Arvind Raman Oct 28 '14 at 20:01
0

Adding a simple Status solved this question.

<UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
    <Objects xsi:type="Subscriber">
         <EmailAddress>xxx@gmail.com</EmailAddress>
         <SubscriberKey>xxx@gmail.com</SubscriberKey>  
         <Lists>
            <ID>42</ID>
            <Status>Unsubscribed</Status>
            <Action>update</Action>
         </Lists>
    </Objects>
</UpdateRequest>
| improve this answer | |

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.