UpdateContact

The UpdateContact method attempts to update an already subscribed contact of a specified list with the provided profile data and external events. This method is designed for transactional use. It allows users to update individual contacts on their lists and trigger external events for that specific contact. For non-transactional usage and high volume updates, use the BulkLoadContacts(WithOptions) and ConductorBulkLoadAndTriggerContacts(WithOptions) methods.

The UpdateContact method takes in a WSContact object containing the contact’s email address, ListID, profile data (as a list of AttributeID and Value pairs), a profile update type (NotDefined, Update, Append, Overwrite), and a comma-delimited list of ExternalEventIDs. The AttributeIDs, ExternalEventIDs, and ListIDs can be found in the application’s “API ID Information” page under the “Support & Information” tab.

If the specified email address is already subscribed to the provided ListID, that contact’s profile information is updated/appended/overwritten as requested, and the specified external events (if any) are raised for that contact. If the contact is not already subscribed to the provided ListID, no action is taken.

The UpdateContact method returns one of the following results: FailedContactBanned, FailedContactSuppressed, FailedContactUnSubscribed, FailedContactInvalidEmailAddress, ContactAlreadySubscribedProfileUpdated, ContactNotSubscribedProfileNotUpdated.

<< Back to Method List

SOAP 1.1 Request

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /v31/IntegrationService.asmx HTTP/1.1
Host: webservices.listrak.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://webservices.listrak.com/v31/UpdateContact"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <WSUser xmlns="http://webservices.listrak.com/v31/">
      <UserName>string</UserName>
      <Password>string</Password>
    </WSUser>
  </soap:Header>
  <soap:Body>
    <UpdateContact xmlns="http://webservices.listrak.com/v31/">
      <WSContact>
        <EmailAddress>string</EmailAddress>
        <ListID>int</ListID>
        <ContactProfileAttribute>
          <AttributeID>int</AttributeID>
          <Value>string</Value>
        </ContactProfileAttribute>
        <ContactProfileAttribute>
          <AttributeID>int</AttributeID>
          <Value>string</Value>
        </ContactProfileAttribute>
      </WSContact>
      <ProfileUpdateType>NotDefined or Update or Append or Overwrite</ProfileUpdateType>
      <ExternalEventIDs>string</ExternalEventIDs>
    </UpdateContact>
  </soap:Body>
</soap:Envelope>

SOAP 1.1 Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <UpdateContactResponse xmlns="http://webservices.listrak.com/v31/">
      <UpdateContactResult>SuccessContactSubscribed or FailedContactBanned or FailedContactSuppressed or FailedContactAlreadySubscribed or FailedContactUnSubscribed or FailedContactPendingConfirmation or FailedContactRequiresConfirmation or FailedContactInvalidEmailAddress or ContactAlreadySubscribedProfileUpdated or FailedContactNotSubscribedProfileNotUpdated</UpdateContactResult>
    </UpdateContactResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2 Request

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /v31/IntegrationService.asmx HTTP/1.1
Host: webservices.listrak.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Header>
    <WSUser xmlns="http://webservices.listrak.com/v31/">
      <UserName>string</UserName>
      <Password>string</Password>
    </WSUser>
  </soap12:Header>
  <soap12:Body>
    <UpdateContact xmlns="http://webservices.listrak.com/v31/">
      <WSContact>
        <EmailAddress>string</EmailAddress>
        <ListID>int</ListID>
        <ContactProfileAttribute>
          <AttributeID>int</AttributeID>
          <Value>string</Value>
        </ContactProfileAttribute>
        <ContactProfileAttribute>
          <AttributeID>int</AttributeID>
          <Value>string</Value>
        </ContactProfileAttribute>
      </WSContact>
      <ProfileUpdateType>NotDefined or Update or Append or Overwrite</ProfileUpdateType>
      <ExternalEventIDs>string</ExternalEventIDs>
    </UpdateContact>
  </soap12:Body>
</soap12:Envelope>

SOAP 1.2 Response

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <UpdateContactResponse xmlns="http://webservices.listrak.com/v31/">
      <UpdateContactResult>SuccessContactSubscribed or FailedContactBanned or FailedContactSuppressed or FailedContactAlreadySubscribed or FailedContactUnSubscribed or FailedContactPendingConfirmation or FailedContactRequiresConfirmation or FailedContactInvalidEmailAddress or ContactAlreadySubscribedProfileUpdated or FailedContactNotSubscribedProfileNotUpdated</UpdateContactResult>
    </UpdateContactResponse>
  </soap12:Body>
</soap12:Envelope>