IsCallable
 

IsCallable

Definition

TPSOutput IsCallable ( string username, string password, string number, Option[] options )

Description:

Checks if the telephone number is registered with the TPS, and so cannot be called for unsolicited direct marketing. If the number can be called for marketing purposes, the Callable field of the TPSOutput structure returned by the service will be set to true. Otherwise, it will be set to false. In either case, the TelephoneNumber field of the structure will be set to the same value as was supplied as the number parameter.

View all TPS 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 TPS Integr8 service
  data8.load('TPS');
}

function IsCallable(number) {
  /// <param name="number">string</param>
  var tps = new data8.tps();
  
  tps.iscallable(
    number,
    null,
    showIsCallableResult
  );
}

function showIsCallableResult(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.Callable
    //   Indicates if the telphone number is callable (i.e. not on the TPS)
    // result.TelephoneNumber
    //   Contains the original telephone number if it is callable.
  }
}

loadIntegr8();

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