0

I need to add subscribers to a suppression list , but the soap envelopes in the documentation don't seem to work I've tried several variations in the past days

here is the main one I am using

https://code.exacttarget.com/apis-sdks/soap-api/interacting-with-auto-suppression-lists-via-the-soap-api.html

the one at the very end "Add a Subscriber to an Auto-Suppression List"

that one gives me an error saying that "Unable to retrieve Data Extension using CustomerKey" I've tried the name , customer Key and ID , I found odd that the object type in the envelope says Data Extension so I also tried changing this to SupressionListDefinition but get an error saying "Exception occurred during [Create] ErrorID: 564380645"

I've also tried the envelope on this link

https://code.exacttarget.com/apis-sdks/soap-api/removing-a-subscriber-from-a-suppression-list.html

I figured I could just change the action to create but that doesnt work , the response does come back as OK which is odd , also the delete action is not removing the subscriber and is also coming back as OK

can you provide the correct envelope to use to add a subscriber to a specific supression list?

Thanks.

Update 11/2/2015

Hi , this doesn’t seem to work , while I am able to make it work with some changes to the soap envelope and get a response the response says the subscriber (me) its already on the list but that is not the case

I also tried different SOAP Action , Create, Update , UpdateAdd , the Update actually responds as if it worked but when I go and check the suppression list I am not there. UpdateAdd gives me a http:500 error .

My guess is that even though I am indicating a list id is checking a different one, maybe the main subscribers list?

Here is the response I get and also a screen shot to validate that I am not there and the list id

Create Response

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="url://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="url://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="url://www.w3.org/2001/XMLSchema" xmlns:wsa="url://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="url://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="url://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soap:Header><wsa:Action>CreateResponse</wsa:Action><wsa:MessageID>urn:uuid:1d74d90d-05bc-4279-978e-c4e2d92aea29</wsa:MessageID><wsa:RelatesTo>urn:uuid:623d6172-b359-44b1-85e8-51dfad13ce20</wsa:RelatesTo><wsa:To>url://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp wsu:Id="Timestamp-6adc625b-a59f-4bbc-baba-2373aa0eb261"><wsu:Created>2015-11-02T19:26:18Z</wsu:Created><wsu:Expires>2015-11-02T19:31:18Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><CreateResponse xmlns="url://exacttarget.com/wsdl/partnerAPI"><Results><StatusCode>Error</StatusCode><StatusMessage>The subscriber is already on the list</StatusMessage><OrdinalID>0</OrdinalID><ErrorCode>12014</ErrorCode><NewID>0</NewID><Object xsi:type="Subscriber"><PartnerKey xsi:nil="true" /><ObjectID xsi:nil="true" /><EmailAddress>[email protected]</EmailAddress><SubscriberKey>[email protected]</SubscriberKey><Lists><PartnerKey xsi:nil="true" /><ID>9169</ID><ObjectID xsi:nil="true" /></Lists></Object></Results><RequestID>2a536ff8-8303-465f-bd69-bc1a8f38ec9a</RequestID><OverallStatus>Error</OverallStatus></CreateResponse></soap:Body></soap:Envelope>

Update Response

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="url://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="url://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="url://www.w3.org/2001/XMLSchema" xmlns:wsa="url://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="url://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="url://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soap:Header><wsa:Action>UpdateResponse</wsa:Action><wsa:MessageID>urn:uuid:bb52b334-1964-4ee8-864a-1c968a0b2c56</wsa:MessageID><wsa:RelatesTo>urn:uuid:e7acfe31-f9cf-40c9-883d-429e2268da63</wsa:RelatesTo><wsa:To>url://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp wsu:Id="Timestamp-b88d1b22-a0fb-444e-a53f-e590051b1fb3"><wsu:Created>2015-11-02T19:30:03Z</wsu:Created><wsu:Expires>2015-11-02T19:35:03Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><UpdateResponse xmlns="url://exacttarget.com/wsdl/partnerAPI"><RequestID>860be2a7-df70-43b7-952b-c6759837062d</RequestID><OverallStatus>OK</OverallStatus></UpdateResponse></soap:Body></soap:Envelope>
1
  • Forgot to mentioned , per Exact Target suggestion , I am already doing calls using SOAP envelopes (since response time is faster) , so I would rather keep doing that , I know that using the SDK is possible and have successfully done so in the past but response time takes too long for the other action I am doing (trigger sends, about 30 seconds ) Sep 21, 2015 at 19:16

1 Answer 1

1

SOAP for adding Subscribers to Suppression Lists look the same as adding them to a regular list. Examples can be found at: https://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/adding_subscribers_to_a_list/

Auto-Suppression Lists are a different type of object, not the same as regular Suppression Lists.

Example Creating a new subscriber and adding them to a list

POST https://webservice.exacttarget.com/Service.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "Create"
Content-Length: 1401
Host: webservice.exacttarget.com
Connection: Keep-Alive

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <soap:Header>
      <wsse:Security soap:mustUnderstand="1">
         <wsse:UsernameToken wsu:Id="SecurityToken-d19fb7b0-ec6d-49a8-8fd3-796819ec7306">
            <wsse:Username>ccc</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ccc</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Objects xsi:type="Subscriber">
            <PartnerKey xsi:nil="true"/>
            <ObjectID xsi:nil="true"/>
            <EmailAddress>[email protected]</EmailAddress>
            <SubscriberKey>[email protected]</SubscriberKey>
            <Lists>
               <ID>1761736</ID>
            </Lists>
         </Objects>
      </CreateRequest>
   </soap:Body>
</soap:Envelope>

Example Updating an existing subscriber to associate them to a list

POST https://webservice.exacttarget.com/Service.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "Update"
Content-Length: 1401
Host: webservice.exacttarget.com
Connection: Keep-Alive

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <soap:Header>
      <wsse:Security soap:mustUnderstand="1">
         <wsse:UsernameToken wsu:Id="SecurityToken-d19fb7b0-ec6d-49a8-8fd3-796819ec7306">
            <wsse:Username>ccc</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ccc</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Objects xsi:type="Subscriber">
            <PartnerKey xsi:nil="true"/>
            <ObjectID xsi:nil="true"/>
            <EmailAddress>[email protected]</EmailAddress>
            <SubscriberKey>[email protected]</SubscriberKey>
            <Lists>
               <ID>1761736</ID>
            </Lists>
         </Objects>
      </UpdateRequest>
   </soap:Body>
</soap:Envelope>

Example Upsert Subscriber and associate to a list - If a subscriber record doesn't exist, it will be created and associated to the list. If a subscriber does exist, the existing record will be associated to the list.

POST https://webservice.exacttarget.com/Service.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "Create"
Content-Length: 1660
Host: webservice.exacttarget.com
Connection: Keep-Alive


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <soap:Header>
      <wsse:Security soap:mustUnderstand="1">
         <wsse:UsernameToken wsu:Id="SecurityToken-d19fb7b0-ec6d-49a8-8fd3-796819ec7306">
            <wsse:Username>ccc</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ccc</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Options>
            <SaveOptions>
               <SaveOption>
                  <PropertyName>*</PropertyName>
                  <SaveAction>UpdateAdd</SaveAction>
               </SaveOption>
            </SaveOptions>
         </Options>
         <Objects xsi:type="Subscriber">
            <PartnerKey xsi:nil="true"/>
            <ObjectID xsi:nil="true"/>
            <EmailAddress>[email protected]</EmailAddress>
            <SubscriberKey>[email protected]</SubscriberKey>
            <Lists>
               <ID>1761736</ID>
            </Lists>
         </Objects>
      </CreateRequest>
   </soap:Body>
</soap:Envelope>

You must log in to answer this question.

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