1

I have created a program in ET to send e-mails from a particular list. I am populating this list named Test, which is located in a Folder named 2016, using the FuelSDK API. I haven't found a way to delete the subscriber from the list without deleting him from the AllSubscribers List.

Am I missing something? It's strange that there is a functionality to retrieve subscribers in List but not to delete them only from that particular list.

I think this can be done using SOAP. How do I translate the xml into python SOAP? I think one can delete the list object, deleting the subscribers without deleting the actual list and delete them from the subscribers table.

I found the following example:

https://help.marketingcloud.com/en/technical_library/web_service_guide/technical_articles/managing_subscribers_on_lists/

2
  • Anyone can help me do this? Also found out it can be done using SOAP. How do I translate the xml into python SOAP? I think one can delete the list object, deleting the subscribers without deleting the actual list and delete them from the subscribers table. [salesforce.stackexchange.com/questions/72097/… or [nickholdren.com/2013/12/24/… Aug 8, 2016 at 13:36
  • Ok, so actually you can do this by using the SOAP API like so: Check question It's a shame no one is here to help. If this can be done using the FuelSDK, please let me know Aug 9, 2016 at 13:54

1 Answer 1

0

Can be done with SOAP like so:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">    <Header>
      <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <UsernameToken>
            <Username>USERNAME</Username>
            <Password>PASSWORD</Password>
         </UsernameToken>
      </Security>    
</Header>    
<Body>
      <DeleteRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Objects xsi:type="Subscriber">
            <PartnerKey xsi:nil="true"/>
            <ObjectID xsi:nil="true"/>
             <SubscriberKey>{{ subscriber_key }}</SubscriberKey>
             <EmailAddress>{{ subscriber_key }}</EmailAddress>
             <Lists>
                 <PartnerKey xsi:nil="true"/>
                 <ObjectID xsi:nil="true"/>
                 <ID>{{ list_id }}</ID>
             </Lists>
         </Objects>
      </DeleteRequest>
</Body>
</Envelope>

Then do a post like so with action as delete:

def post(self, action, request):
    """
    POST a soap request

    :param action: A SOAP action, e.g. 'Create`
    :param request: The POST body as a unicode string
    """
    connection = httplib.HTTPSConnection("webservice-sha2.s4.exacttarget.com")
    connection.request('POST', '/Service.asmx', request.encode('utf-8'), {
        'Content-Type': 'text/xml;charset=UTF-8',
        'User-Agent': 'TEST',
        'SOAPAction': action
    })
    response = connection.getresponse()

You must log in to answer this question.

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