To connect to this service you'll need to use one of these endpoints:
JSON
Copied!
Open API
Copied!
SOAP
Description
Finds the first number from the list supplied that is callable, i.e. is not registered on the TPS. This is useful if you have more than one number for a person and want to check which number you can contact them on.
If there is a callable number in the list you provide, the TelephoneNumber field in the results will contain the first such callable number, and the Callable field will be set to true. Otherwise, the TelephoneNumber field will be blank and the Callable field will be false.
Each telephone number that needs to be searched against the TPS results in an extra charge on your account for the appropriate number of credits for a TPS search. If you supply two telephone numbers and the first one is callable, you will only be charged for one TPS lookup as we never have to look up the second one. However, if the first number is not callable you will be charged for two TPS searches as we have to search for both numbers against the TPS.
Credit Usage
Each request to this method consumes 1 TPS credit for each entry in the supplied "numbers" parameter.
Parameters
The following parameters can be supplied to this method
username
username
See the available authentication methods. If you are
using username & password authentication,
specify the username to authenticate as. If you are using
API Key authentication and you are not using
the JSON, Javascript or ADO APIs, use your API Key here with the prefix apikey-, e.g.
apikey-ABCD-1234-EFGH-5678
A list of telephone numbers to check against the TPS register in order
Advanced Options
The following options can be specified as part of the option parameter. Each option is specified
as a key/value pair. The list of available names is shown below, along with a description of the allowable values
for that name.
Common Options
Name
Description
ApplicationName
ApplicationName
Gives the name of the calling application - used to break down usage by application in the usage reports on the dashboard
Results
This method returns an object containing the following fields:
Status
Status
Indicates whether the method call was successful, or if some error occurred.
If the Success field is true, the other results described below can be used to get the results of the method.
If Success is false, some error occurred in calling the method, such as the authentication failed or the
account is out of credits. The details of the error can be obtained from the ErrorMessage field, and any other results should be ignored
Callable
Callable
Indicates if at least one of the supplied telephone numbers is callable (i.e. not on the TPS)
TelephoneNumber
TelephoneNumber
Contains the first telephone number in the supplied list that is callable
Live Demo
numbers
Sorry, this parameter type is not currently supported in Live Demo
options
Name
Value
Common Options
Credits Remaining Today:
Live Demo Results
We hope you like our service! Sign up for a free account and start using our full range of products today.
Sample Code
<!-- Import the Integr8 Ajax API --><!-- NOTE: Get your own API key to use in the following script tag from: --><!-- https://www.data-8.co.uk/ValidationAdmin/AjaxAPIKey --><scripttype="text/javascript"src="https://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key&load=TPS"></script><scripttype="text/javascript">function GetCallableNumber(numbers) {
/// <param name="numbers">string[]</param>var tps = new data8.tps();
tps.getcallablenumber(
numbers,
[
],
showGetCallableNumberResult
);
}
function showGetCallableNumberResult(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 at least one of the supplied telephone numbers is callable (i.e. not on the TPS)// result.TelephoneNumber// Contains the first telephone number in the supplied list that is callable
}
}
</script>
// NOTE: A Service Reference to the web service must be added to use this sample code.privatevoid GetCallableNumber(string[] numbers)
{
// Declare the required options.// Invoke the web service method.
TPSSoapClient proxy = new TPSSoapClient();
TPSOutput results = proxy.GetCallableNumber("your-username", "your-password", numbers, new Option[0]);
// Check that the call succeeded, and show the error message if there was a problem.if ((results.Status.Success == false))
{
MessageBox.Show(("Error: " + results.Status.ErrorMessage));
}
else
{
// TODO: Process method results here.// Results can be extracted from the following fields:// result.Callable// Indicates if at least one of the supplied telephone numbers is callable (i.e. not on the TPS)// result.TelephoneNumber// Contains the first telephone number in the supplied list that is callable
}
}
'NOTE: A Service Reference to the web service must be added to use this sample code.PrivateSub GetCallableNumber(ByVal numbers() AsString)
'Declare the required options.'Invoke the web service method.Dim proxy As TPSSoapClient = New TPSSoapClient()
Dim results As TPSOutput = proxy.GetCallableNumber("your-username", "your-password", numbers, New [Option](-1) {})
'Check that the call succeeded, and show the error message if there was a problem.If (results.Status.Success = false) Then
MessageBox.Show(("Error: " + results.Status.ErrorMessage))
Else'TODO: Process method results here.'Results can be extracted from the following fields:'result.Callable' Indicates if at least one of the supplied telephone numbers is callable (i.e. not on the TPS)'result.TelephoneNumber' Contains the first telephone number in the supplied list that is callableEndIfEndSub
// NOTE: The php_soap.dll extension must be enabled in the php.ini file.function GetCallableNumber($numbers)
{
$options = array(
"Option" => array(
)
);
$params = array(
"username" => "your-username",
"password" => "your-password",
"numbers" => $numbers,
"options" => $options
);
$client = new SoapClient("https://webservices.data-8.co.uk/TPS.asmx?WSDL");
$result = $client->GetCallableNumber($params);
if ($result->GetCallableNumberResult->Status->Success == 0)
{
echo"Error: " . $result->GetCallableNumberResult->Status->ErrorMessage;
}
else
{
// TODO: Process method results here.// Results can be extracted from the following fields:// $result->GetCallableNumberResult->Callable// Indicates if at least one of the supplied telephone numbers is callable (i.e. not on the TPS)// $result->GetCallableNumberResult->TelephoneNumber// Contains the first telephone number in the supplied list that is callable
}
}
Post the request to https://webservices.data-8.co.uk/TPS/GetCallableNumber.json?key=your-api-key
and do NOT include the username or password properties in the request JSON document.
Post the request to https://webservices.data-8.co.uk/TPS/GetCallableNumber.json
and include username and password properties in the request JSON document.
Do not use for client-side requests!
Obtain a JWT token for your user and post the request to https://webservices.data-8.co.uk/TPS/GetCallableNumber.json
Include the JWT token in the request headers as: Authorization: Bearer your-jwt-token
PublicSub GetCallableNumber(numbers AsString)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "https://webservices.data-8.co.uk/recordset.ashx?service=TPS&method=GetCallableNumberSimple" &
"&username=your-username" &
"&password=your-password" &
"&numbers=" & numbers
If rs.MoveFirst ThenIf rs.Fields(0).Name = "Success"And rs.Fields(0).Value = falseThen
MsgBox "Error: " & rs.Fields(1)
Else'TODO: Process method results here.'All the results are available in the first row in the recordset.'Results can be extracted from the following fields:'Callable' Indicates if at least one of the supplied telephone numbers is callable (i.e. not on the TPS)'TelephoneNumber' Contains the first telephone number in the supplied list that is callableEndIfEndIfEndSub
Cookie Notice
Find out more about how this website uses cookies to enhance your browsing experience.