0

I am trying to update my Subscriber status in the All Subscribers list using SOAP.

I am using the following payload, you can see within my code I am using two different variations to try and update the Status (at different times, merged in this code for post purpose):

<?xml version="1.0" encoding="utf-8"?>
<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>
      <fueloauth xmlns="http://exacttarget.com">insertAccessTokenHere</fueloauth>
   </soapenv:Header>
   <soapenv:Body>
    <UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Options>
            <SaveOptions>
               <SaveOption>
                  <PropertyName>*</PropertyName>
                  <SaveAction>UpdateOnly</SaveAction>
               </SaveOption>
            </SaveOptions>
         </Options>
         <Objects xsi:type="Subscriber">
            <PartnerKey xsi:nil="true" />
            <ObjectID xsi:nil="true" />
            <!-- variation 1 start -->
            <Status>Active</Status>
            <Lists>
                <PartnerKey xsi:nil="true" />
               <ID>51</ID>
            </Lists>
            <!-- variation 1 end -->
            <!-- variation 2 start -->
            <Attributes>
                <Name>Status</Name>
                <Value>Active</Value>
            </Attributes>
            <Lists>
                <PartnerKey xsi:nil="true" />
               <ID>51</ID>
            </Lists>
            <!-- variation 2 end -->
            <SubscriberKey>mysubkey</SubscriberKey>
         </Objects>
      </UpdateRequest>
   </soapenv:Body>
</soapenv:Envelope>

Both payloads return a success message, but nothing actually happens. The status is still whatever it was before the update.

Can anyone advise?

Edit: This is the most recent variation of the code I am using but still am not seeing any results.

<?xml version="1.0" encoding="UTF-8"?>
<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>
      <fueloauth xmlns="http://exacttarget.com">mykeygoeshere</fueloauth>
   </soapenv:Header>
   <soapenv:Body>
      <UpdateRequest 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" />
            <Status>Active</Status>
            <EmailAddress>[email protected]</EmailAddress>
            <SubscriberKey>11223344556677</SubscriberKey>
         </Objects>
      </UpdateRequest>
   </soapenv:Body>
</soapenv:Envelope>

1 Answer 1

1

This call works for me

<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>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-32259181" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>XXXXXXX</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXXXXXX</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Options>
            <SaveOptions>
               <SaveOption>
                  <PropertyName>*</PropertyName>
                  <SaveAction>UpdateAdd</SaveAction>
               </SaveOption>
            </SaveOptions>
         </Options>
         <Objects xsi:type="Subscriber">
            <Client>
               <ID>XXXXXX</ID>
               <!--This is the client member ID if using a top level agency login-->
            </Client>
            <PartnerKey xsi:nil="true"/>
            <ObjectID xsi:nil="true"/>
            <Status>Active</Status>
            <EmailAddress>[email protected]</EmailAddress>
            <SubscriberKey>[email protected]</SubscriberKey>
           <!-- <Lists>
               <PartnerKey xsi:nil="true"/>
               <ID>XXXXX</ID>
               <ObjectID xsi:nil="true"/>
            </Lists>
            Lists tag is optional. If not included they will be added to All Subscribers only-->
         </Objects>
      </CreateRequest>
   </soapenv:Body>
</soapenv:Envelope>
1
  • So do I need to include the email address in the payload to get it working? Commented Aug 20, 2021 at 1:56

You must log in to answer this question.

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