0

I'm able to retrieve the contents of an email using SOAP.

Ex.

  <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
     <Objects xsi:type="TriggeredSend">
        <TriggeredSendDefinition>
           <CustomerKey>99999</CustomerKey>
        </TriggeredSendDefinition>
        <Subscribers>
           <EmailAddress>a@b.com</EmailAddress>
           <SubscriberKey>a@b.com</SubscriberKey>
           <Attributes>
              <Name>HTML__Body</Name>
              <Value>
              <![CDATA[
              <a href="http://www.google.com">google</a>
              ]]>
              </Value>  

           </Attributes>

        </Subscribers>
     </Objects>
  </CreateRequest>

How can I do this using the REST API. I can't find any documentation on this?

Thanks -Dan

3

This 'Get' is the equivalent REST API. You can use the appropriate REST SDK - Ruby/ Python/ PHP/ C#/ Java to invoke it depending on what language you are using.

e.g. in PHP, you would do something like this

require('ET_Client.php');
$myclient = new ET_Client();
$email = new ET_Email();
$email->authStub = $myclient;
$response = $email->get();
print_r($response);
| improve this answer | |
  • How would I do this just making a rest call? – oakleyx Jun 20 '16 at 13:36
  • So I dug into the FUEL SDK for JAVA and it uses a SOAP call to retrieve the emails. That would be ok but the SDK is out of date. It's throwing errors because there is a new EmailType called Normal and the code has not been updated in a while. – oakleyx Jun 20 '16 at 17:50

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.