Find your content:

Search form

You are here

Retrieve operation not available for Campaign object using ExactTarget SOAP API

 
Share

I simply need to retrieve an array of available campaign names and descriptions using the ExactTarget API, just like you can do for Data Extensions. For example, something like:

  <?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>
        <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>user</wsse:Username>
              <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
           </wsse:UsernameToken>
        </wsse:Security>
     </soapenv:Header>
     <soapenv:Body>
        <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
           <RetrieveRequest>
              <ObjectType>Campaign</ObjectType>
              <Properties>ID</Properties>
              <Properties>Name</Properties>
              <Properties>Description</Properties>
           </RetrieveRequest>
        </RetrieveRequestMsg>
     </soapenv:Body>
  </soapenv:Envelope>

However, the Retrieve operation does not appear to be available for the Campaign object according to this list of supported operations. Is this an oversight or is there a workaround for this? I would consider this to be a pretty essential request and cannot understand why it would not be supported.


Attribution to: Eliot Harper

Possible Suggestion/Solution #1

Ok - slightly confusing here - The Campaigns object in the SOAP API refer to what we used to call "Programs".

What you actually need to use here is the REST API.

All of the documentation lives here.

The route is https://www.exacttargetapis.com/hub/v1/campaigns

You will then be able to retrieve all campaigns using the following:

GET https://www.exacttargetapis.com/hub/v1/campaigns?$page=1&$pageSize=2&$orderBy=Name ASC

Attribution to: Kelly J Andrews
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/30854

My Block Status

My Block Content