1

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.

2
  • Did you get an error message when you ran this? Docs may not be up to date. Also, there are rest routes available, so if this doesn't work I can point you that direction. – Kelly J Andrews Mar 25 '14 at 11:12
  • I use the command curl -XPOST -H "Content-type: text/xml; charset=utf-8" -H "SOAPAction: Retrieve" -d @request.xml https://webservice.test.exacttarget.com/Service.asmx to execute this SOAP request and receive the response <OverallStatus>Error: Unable to find a handler for object type: Campaign. Object types are case-sensitive, check spelling.</OverallStatus>. Interestingly, if I simply change the SOAPAction to Schedule this returns a successful response (although I want to retrieve the Campaigns, not schedule them) – Eliot Harper Mar 25 '14 at 18:24
0

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

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.