Tag Archive for SOAP

Creating A User-Initiated Send in ExactTarget via the SOAP API in PHP

The following example shows how to create a User-Initiated Send Definition in your ExactTarget account using the SOAP API and PHP. More specifically it shows how to create a send definition with a Data Extension as opposed to List. Additional options are available for exclusion lists, but I didn’t use them in this code sample. $wsdl = ‘https://webservice.exacttarget.com/etframework.wsdl’; /* Create…

Delete Subscriber From List in ExactTarget

$wsdl = ‘https://webservice.s6.exacttarget.com/etframework.wsdl’; $client = new ExactTargetSoapClient($wsdl, array(‘trace’ => 1)); $client->username = ‘username’; $client->password = ‘password’; $sub = new ExactTarget_Subscriber(); $sub->EmailAddress = ‘bill@msn.com’; $subList = new ExactTarget_SubscriberList(); $subList->ID = 11902; $subList->Status = ExactTarget_SubscriberStatus::Active; $subList->Action = “delete”; $sub->Lists = array($subList); $object = new SoapVar($sub, SOAP_ENC_OBJECT, ‘Subscriber’, “http://exacttarget.com/wsdl/partnerAPI”); $request = new ExactTarget_UpdateRequest(); $request->Options = NULL; $request->Objects = array($object); $results = $client->Update($request);

ExactTarget SOAP API Wrapper

Although having the ability to wrap the entire SOAP API would be nice I found it nearly impossible. However, I’ve made a simplified version that allows one to act on ExactTarget objects. It allows for Create, Update, Delete, Retrieve, and Upsert of an object. Again, it is simple but it will save in writing a few lines of code. And,…

Execute A Triggered Send With Additional Attributes Via SOAP API In ExactTarget Using PHP

This is an example of how to execute a triggered send within the ExactTarget platform. $wsdl = ‘https://webservice.exacttarget.com/etframework.wsdl’; try{ //Create the Soap Client $client = new ExactTargetSoapClient($wsdl, array(‘trace’=>1)); // Set username and password here $client->username = ‘username’; $client->password = ‘password’; //Define the subscriber $subscriber = new ExactTarget_Subscriber(); $subscriber->EmailAddress = ‘test@test.com’; $subscriber->SubscriberKey = ‘test@test.com’; //Define the attribute $company = new ExactTarget_Attribute();…