IsMailable
 

IsMailable

Definition

bool IsMailable ( string username, string password, InputRecord record, Option[] options )

Description:

Checks if the person given in the input record is registered with the MPS, and so does not wish to receive marketing by direct mail. If they are willing to receive direct mail, the service returns true. If not, the service returns false.

View all MPS Methods

Code Samples

Language:

<!-- Import the Integr8 Ajax API -->
<!-- NOTE: Get your own API key to use in the following script tag from: -->
<!-- http://www.data-8.co.uk/integr8/Admin/Ajax.aspx -->
<script src="http://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key" type="text/javascript">
</script>

<script type="text/javascript">

function loadIntegr8() {
  // Load the MPS Integr8 service
  data8.load('MPS');
}

function IsMailable(record) {
  /// <param name="record">data8.inputrecord. Set up the Name, Address properties before calling this method.</param>
  var mps = new data8.mps();
  
  mps.ismailable(
    record,
    null,
    showIsMailableResult
  );
}

function showIsMailableResult(result) {
  // Check that the call succeeded, and show the error message if there was a problem.
  if (!result.Status.Success) {
    alert('Error: ' + result.Status.ErrorMessage);
  }
  else {
    // TODO: Process method results here.
    // Results can be extracted from the following fields:
    // result.Mailable
    //   Indicates if the person has been found to be on the MPS.
  }
}

loadIntegr8();

</script>
Skip Navigation Links
Request handled by server S2 for client 38.107.179.217 at 08/02/2012 03:13:27