1

Trying to make an "execute" request to use the LogUnsubEvent API call. Can't seem to make a successful call. I have followed the Exacttarget documentation: http://help.exacttarget.com/en/technical_library/web_service_guide/technical_articles/unsubscribing_and_logging_an_unsubevent_with_a_logunsubevent_execute_call/

Always returns

{ [Error: Soap Error]
  requestId: '97300bab-103f-4d2f-8bb3-1db7f1d2e4f2',
  results:
   [ { StatusCode: 'Error',
   StatusMessage: 'Object reference not set to an instance of an object.' } ],
  errorPropagatedFrom: 'ExecuteResponseMsg' }

Setup

var FuelSoap = require("fuel-soap");

var etConnectOptions = {
  auth: {clientId: "someid", clientSecret: "somepass"},
  soapEndpoint: "https://webservice.exacttarget.com/Service.asmx"
};

var SoapClient = new FuelSoap(etConnectOptions);

Building the request

SoapClient.execute("LogUnsubEvent", [
    {name: "SubscriberID", value: "12345678788"},
    {name: "SubscriberKey", value: "[email protected]"},
    {name: "EmailAddress", value: "[email protected]"},
    {name: "JobID", value: "854755857"},
    {name: "ListID", value: "4455656"},
    {name: "BatchID", value: ""},
    {name: "Reason", value: ""}
], function(err, response) {
    if(err) {
        console.log(err);
        return;
    }
    console.log(response.body);
});

XML Envelope:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <fueloauth xmlns="http://exacttarget.com">secret</fueloauth>
  </Header>
  <Body>
    <ExecuteRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <Requests>
        <Name>LogUnsubEvent</Name>
        <Parameters>
          <name>SubscriberID</name>
          <value>12345678788</value>
        </Parameters>
        <Parameters>
          <name>SubscriberKey</name>
          <value>[email protected]</value>
        </Parameters>
        <Parameters>
          <name>EmailAddress</name>
          <value>[email protected]</value>
        </Parameters>
        <Parameters>
          <name>JobID</name>
          <value>854755857</value>
        </Parameters>
        <Parameters>
          <name>ListID</name>
          <value>4455656</value>
        </Parameters>
        <Parameters>
          <name>BatchID</name>
          <value/>
        </Parameters>
        <Parameters>
          <name>Reason</name>
          <value/>
        </Parameters>
      </Requests>
    </ExecuteRequestMsg>
  </Body>
</Envelope>

1 Answer 1

1

I was able to get this working by changing the xmlns to https://webservice.exacttarget.com/etframework.wsdl just for the ExecuteRequestMsg call.

Commit with code change.

You must log in to answer this question.

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