1

I am very new to APIs and eager to learn (especially as I have just uncovered that the only way to delete members from the All Subscribers List is with a SOAP Call).

I have installed Postman and following the instructions here: http://blog.getpostman.com/2014/08/22/making-soap-requests-using-postman/

Issue is I am not sure what to pass in the xml (i.e what parameters to use for the name space tags).

So far, this is the code I am using:

<?xml version="1.0" encoding="utf-8"?> 
<s:Envelope xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
        <a:Action s:mustUnderstand="1">Delete</a:Action>
        <a:MessageID>urn:uuid:12345</a:MessageID>
        <ActivityId CorrelationId="12345" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">123456</ActivityId>
        <a:ReplyTo>
            <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
        </a:ReplyTo>
        <a:To s:mustUnderstand="1">https://webservice.exacttarget.com/Service.asmx</a:To> 
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 
    <o:UsernameToken u:Id="uuid-XXXXXXXX"> 
        <o:Username>XXXX</o:Username> 
        <o:Password>XXXX</o:Password> 
    </o:UsernameToken> 
</o:Security> 
    </s:Header>
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <DeleteRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <Options></Options>
            <Objects xmlns:q1="http://exacttarget.com/wsdl/partnerAPI" xsi:type="q1:List">
                <q1:ID>12345</q1:ID>
                <q1:ObjectID xsi:nil="true"></q1:ObjectID>
            </Objects>
        </DeleteRequest>
    </s:Body>

I already figured out how to call the Token, but need help figuring out where to pass the parameters.

0

I highly recommend downloading the postman calls for marketing cloud: https://github.com/salesforce-marketingcloud/postman

Your request should be as follow

<?xml version="1.0" encoding="UTF-8"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
    <a:Action s:mustUnderstand="1">Create</a:Action>
    <a:MessageID>urn:uuid:7e0cca04-57bd-4481-864c-6ea8039d2ea0</a:MessageID>
    <a:ReplyTo>
        <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
    </a:ReplyTo>
    <a:To s:mustUnderstand="1">{{soapEndPoint}}</a:To>
    <o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
        <o:UsernameToken>
            <o:Username>{{soapUsername}}</o:Username>
            <o:Password>{{soapPassword}}</o:Password>
        </o:UsernameToken>
    </o:Security>
</s:Header>
 <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <DeleteRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
           <Objects xsi:type="Subscriber">
                <PartnerKey xsi:nil="true"/>
                <ObjectID xsi:nil="true"/>
                <EmailAddress>your_address@salesforce.com</EmailAddress>
                <SubscriberKey>your sub key here</SubscriberKey>
           </Objects>
      </DeleteRequest>
 </s:Body>

  • Thanks for your answer. Postman is giving me nightmares as I cant figure it out. Yesterday managed to download the token but couldnt make the call. Why does your action say create? I am trying to wipe the list. what is the urn: uuid? Will update my question to show current progress. – Samuel Dare Dec 28 '16 at 19:41
  • Can't seem to grasp the SOAP envelope structure. I am trying to delete all the records off the All Subscriber List., but it looks like that call might delete just one. Also not sure where my Auth Token goes. Thanks – Samuel Dare Dec 28 '16 at 19:51
  • I am using the call you recomended but getting a 400 bad request. – Samuel Dare Dec 28 '16 at 20:40

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.