CheckPhoneNumbers
Use the CheckPhoneNumbers
method to validate multiple phone numbers at once.
Syntax
CheckPhoneNumbers(PhoneNumbers, LicenseKey)
Request Parameters
Parameter Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
PhoneNumbers |
Phone numbers to check. |
Array of String values
|
True | (757) 544-9510, 17577698337 |
LicenseKey |
Your license key. |
String
|
True | F01d89fd-5155-5455-5585-e84ab8de8591 |
Response
Returns: Array of PhoneReturn
objects
Code Samples
// http://ws.esendex.us/phoneverify/phoneverify.asmx?wsdl was added as Web Reference and given the name WSDL
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CheckPhoneNumbers.WSDL;
namespace CheckPhoneNumbers
{
class Program
{
static void Main(string[] args)
{
WSDL.PhoneVerify PV = new WSDL.PhoneVerify();
String PhoneNumbers = "17575449510, 18009843710";
string[] PhoneNumbersArray = PhoneNumbers.Split(",");
const string LicenseKey = "YOUR LICENSE KEY";
Array Numbers = PV.CheckPhoneNumbers(PhoneNumbersArray, LicenseKey);
foreach (WSDL.PhoneReturn PR in Numbers)
{
Console.WriteLine("Company: " + (string.IsNullOrEmpty(PR.Company) ? "No Information Found" : PR.Company));
Console.WriteLine("Valid: " + PR.Valid);
Console.WriteLine("Use: " + (string.IsNullOrEmpty(PR.Use) ? "No Information Found" : PR.Use));
Console.WriteLine("State: " + (string.IsNullOrEmpty(PR.State) ? "No Information Found" : PR.State));
Console.WriteLine("Switch: " + (string.IsNullOrEmpty(PR.Switch) ? "No Information Found" : PR.Switch));
Console.WriteLine("RC: " + (string.IsNullOrEmpty(PR.RC) ? "No Information Found" : PR.RC));
Console.WriteLine("OCN: " + (string.IsNullOrEmpty(PR.OCN) ? "No Information Found" : PR.OCN));
Console.WriteLine("Original Number: " + (string.IsNullOrEmpty(PR.OriginalNumber) ? "No Information Found" : PR.OriginalNumber));
Console.WriteLine("Clean Number: " + (string.IsNullOrEmpty(PR.CleanNumber) ? "No Information Found" : PR.CleanNumber));
Console.WriteLine("Switch Name: " + (string.IsNullOrEmpty(PR.SwitchName) ? "No Information Found" : PR.SwitchName));
Console.WriteLine("Switch Type: " + (string.IsNullOrEmpty(PR.SwitchType) ? "No Information Found" : PR.SwitchType));
Console.WriteLine("Country: " + (string.IsNullOrEmpty(PR.Country) ? "No Information Found" : PR.Country));
Console.WriteLine("CLLI: " + (string.IsNullOrEmpty(PR.CLLI) ? "No Information Found" : PR.CLLI));
Console.WriteLine("Prefix Type: " + (string.IsNullOrEmpty(PR.PrefixType) ? "No Information Found" : PR.PrefixType));
Console.WriteLine("LATA: " + (string.IsNullOrEmpty(PR.LATA) ? "No Information Found" : PR.LATA));
Console.WriteLine("SMS: " + (string.IsNullOrEmpty(PR.sms) ? "No Information Found" : PR.sms));
Console.WriteLine("Date Assigned: " + (string.IsNullOrEmpty(PR.AssignDate) ? "No Information Found" : PR.AssignDate));
Console.WriteLine("Telecom City: " + (string.IsNullOrEmpty(PR.TelecomCity) ? "No Information Found" : PR.TelecomCity));
Console.WriteLine("Telecom County: " + (string.IsNullOrEmpty(PR.TelecomCounty) ? "No Information Found" : PR.TelecomCounty));
Console.WriteLine("Telecom State: " + (string.IsNullOrEmpty(PR.TelecomState) ? "No Information Found" : PR.TelecomState));
Console.WriteLine("Telecom Zip: " + (string.IsNullOrEmpty(PR.TelecomZip) ? "No Information Found" : PR.TelecomZip));
Console.WriteLine("Time Zone: " + (string.IsNullOrEmpty(PR.TimeZone) ? "No Information Found" : PR.TimeZone));
Console.WriteLine("Latitude: " + (string.IsNullOrEmpty(PR.Lat) ? "No Information Found" : PR.Lat));
Console.WriteLine("Longitude: " + (string.IsNullOrEmpty(PR.Long) ? "No Information Found" : PR.Long));
Console.WriteLine("Wireless: " + PR.Wireless + "\n\n");
}
Console.ReadLine();
}
}
}
' http://ws.esendex.us/phoneverify/phoneverify.asmx?wsdl was added as Web Reference and given the name WSDL
Imports CheckPhoneNumbers.WSDL
Module Module1
Sub Main()
Dim PV As New PhoneVerify()
Dim Numbers As Array
Dim PhoneNumbers As String = "17575449510, 18009843710"
Dim PhoneNumbersArray() = PhoneNumbers.Split(",")
Const LicenseKey = "YOUR LICENSE KEY"
Numbers = PV.CheckPhoneNumbers(PhoneNumbersArray, LicenseKey)
For Each PR As WSDL.PhoneReturn In Numbers
Console.WriteLine("Company: " & (If(String.IsNullOrEmpty(PR.Company), "No Information Found", PR.Company)))
Console.WriteLine("Valid: " & PR.Valid)
Console.WriteLine("Use: " & (If(String.IsNullOrEmpty(PR.Use), "No Information Found", PR.Use)))
Console.WriteLine("State: " & (If(String.IsNullOrEmpty(PR.State), "No Information Found", PR.State)))
Console.WriteLine("Switch: " & (If(String.IsNullOrEmpty(PR.Switch), "No Information Found", PR.Switch)))
Console.WriteLine("RC: " & (If(String.IsNullOrEmpty(PR.RC), "No Information Found", PR.RC)))
Console.WriteLine("OCN: " & (If(String.IsNullOrEmpty(PR.OCN), "No Information Found", PR.OCN)))
Console.WriteLine("Original Number: " & (If(String.IsNullOrEmpty(PR.OriginalNumber), "No Information Found", PR.OriginalNumber)))
Console.WriteLine("Clean Number: " & (If(String.IsNullOrEmpty(PR.CleanNumber), "No Information Found", PR.CleanNumber)))
Console.WriteLine("Switch Name: " & (If(String.IsNullOrEmpty(PR.SwitchName), "No Information Found", PR.SwitchName)))
Console.WriteLine("Switch Type: " & (If(String.IsNullOrEmpty(PR.SwitchType), "No Information Found", PR.SwitchType)))
Console.WriteLine("Country: " & (If(String.IsNullOrEmpty(PR.Country), "No Information Found", PR.Country)))
Console.WriteLine("CLLI: " & (If(String.IsNullOrEmpty(PR.CLLI), "No Information Found", PR.CLLI)))
Console.WriteLine("Prefix Type: " & (If(String.IsNullOrEmpty(PR.PrefixType), "No Information Found", PR.PrefixType)))
Console.WriteLine("LATA: " & (If(String.IsNullOrEmpty(PR.LATA), "No Information Found", PR.LATA)))
Console.WriteLine("SMS: " & (If(String.IsNullOrEmpty(PR.sms), "No Information Found", PR.sms)))
Console.WriteLine("Date Assigned: " & (If(String.IsNullOrEmpty(PR.AssignDate), "No Information Found", PR.AssignDate)))
Console.WriteLine("Telecom City: " & (If(String.IsNullOrEmpty(PR.TelecomCity), "No Information Found", PR.TelecomCity)))
Console.WriteLine("Telecom County: " & (If(String.IsNullOrEmpty(PR.TelecomCounty), "No Information Found", PR.TelecomCounty)))
Console.WriteLine("Telecom State: " & (If(String.IsNullOrEmpty(PR.TelecomState), "No Information Found", PR.TelecomState)))
Console.WriteLine("Telecom Zip: " & (If(String.IsNullOrEmpty(PR.TelecomZip), "No Information Found", PR.TelecomZip)))
Console.WriteLine("Time Zone: " & (If(String.IsNullOrEmpty(PR.TimeZone), "No Information Found", PR.TimeZone)))
Console.WriteLine("Latitude: " & (If(String.IsNullOrEmpty(PR.Lat), "No Information Found", PR.Lat)))
Console.WriteLine("Longitude: " & (If(String.IsNullOrEmpty(PR.Long), "No Information Found", PR.Long)))
Console.WriteLine("Wireless: " & PR.Wireless & Environment.NewLine & Environment.NewLine)
Next
Console.ReadLine()
End Sub
End Module
Dim request, oXMLHttp, url
url = "http://ws.esendex.us/phoneverify/phoneverify.asmx"
request = "<?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>" & _
"<CheckPhoneNumbers xmlns=""http://ws.esendex.us/PhoneVerify/query"">" & _
"<PhoneNumbers>" & _
"<string >17575449510</string>" & _
"<string>18009843710</string>" & _
"</PhoneNumbers>" & _
"<LicenseKey>YOUR LICENSE KEY</LicenseKey>" & _
"</CheckPhoneNumbers>" & _
"</soap:Body>" & _
"</soap:Envelope>"
Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
oXMLHttp.open "POST", url, False
oXMLHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
oXMLHttp.send request
response = oXMLHttp.responseText
MsgBox oXMLHttp.responseText
<?php
// Create a new SOAP client
$client = new SoapClient(' https://ws.esendex.us/phoneverify/phoneverify.asmx?wsdl');
// Specify required info to send a text message
$param = array(
'PhoneNumbers' => array('17575449510', '18009843710'),
'LicenseKey' => 'YOUR LICENSE KEY'
);
$result = $client->CheckPhoneNumbers($param);
// View the response from CDYNE
print_r($result);
?>
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
public class CheckPhoneNumbers {
public static void main(String[] args) {
try {
URL url = new URL("http://ws.esendex.us/phoneverify/phoneverify.asmx/CheckPhoneNumbers?"
+ "PhoneNumbers=17575449510"
+ "&PhoneNumbers=18009843710"
+ "&LicenseKey=YOUR LICENSE KEY");
try {
InputStream in = url.openStream();
StreamSource source = new StreamSource(in);
printResult(source);
} catch (java.io.IOException e) {
e.printStackTrace();
}
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
private static void printResult(Source source) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult sr = new StreamResult(bos);
Transformer trans = TransformerFactory.newInstance().newTransformer();
Properties oprops = new Properties();
oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
trans.setOutputProperties(oprops);
trans.transform(source, sr);
System.out.println("**** Response ******");
System.out.println(bos.toString());
bos.close();
System.out.println();
} catch (Exception e) {
}
}
}
GET /phoneverify/phoneverify.asmx/CheckPhoneNumbers?PhoneNumbers=string&PhoneNumbers=string&LicenseKey=string HTTP/1.1
Host: ws.esendex.us
POST /phoneverify/phoneverify.asmx/CheckPhoneNumbers HTTP/1.1
Host: ws.esendex.us
Content-Type: application/x-www-form-urlencoded
Content-Length: length
PhoneNumbers=string&PhoneNumbers=string&LicenseKey=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfPhoneReturn xmlns="http://ws.esendex.us/PhoneVerify/query">
<PhoneReturn>
<Company>LEVEL 3 COMMUNICATIONS. LLC - </Company>
<Valid>true</Valid>
<Use>Assigned to a code holder for normal use.</Use>
<State>VA</State>
<RC>PARKSLEY</RC>
<OCN>8825</OCN>
<OriginalNumber>(757) 544-9510</OriginalNumber>
<CleanNumber>7575449510</CleanNumber>
<SwitchName>NORFOLK</SwitchName>
<SwitchType />
<Country>United States</Country>
<CLLI>CHSKVAAYDS0</CLLI>
<PrefixType>CLEC - (Competitive Local Exchange Carrier)</PrefixType>
<LATA>252</LATA>
<sms>CLEC - (Competitive Local Exchange Carrier)</sms>
<Email />
<AssignDate>23/10/2005</AssignDate>
<TelecomCity>Chesapeake</TelecomCity>
<TelecomCounty />
<TelecomState>VA</TelecomState>
<TelecomZip>23324</TelecomZip>
<TimeZone>EST</TimeZone>
<Lat />
<Long />
<Wireless>false</Wireless>
<LRN>7576559199</LRN>
</PhoneReturn>
<PhoneReturn>
<Company>ONVOY. LLC VA</Company>
<Valid>true</Valid>
<Use>Assigned to a code holder for normal use.</Use>
<State>VA</State>
<RC>NRFOLKZON1</RC>
<OCN>138E</OCN>
<OriginalNumber>17577698337</OriginalNumber>
<CleanNumber>7577698337</CleanNumber>
<SwitchName />
<SwitchType />
<Country>United States</Country>
<CLLI>NOCLLIKNOWN</CLLI>
<PrefixType>CLEC - (Competitive Local Exchange Carrier)</PrefixType>
<LATA>252</LATA>
<sms>CLEC - (Competitive Local Exchange Carrier)</sms>
<Email />
<AssignDate>27/01/2020</AssignDate>
<TelecomCity />
<TelecomCounty />
<TelecomState>VA</TelecomState>
<TelecomZip>00000</TelecomZip>
<TimeZone />
<Lat />
<Long />
<Wireless>false</Wireless>
<LRN>7575200993</LRN>
</PhoneReturn>
</ArrayOfPhoneReturn>
POST /phoneverify/phoneverify.asmx HTTP/1.1
Host: ws.esendex.us
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ws.esendex.us/PhoneVerify/query/CheckPhoneNumbers"
<?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>
<CheckPhoneNumbers xmlns="http://ws.esendex.us/PhoneVerify/query">
<PhoneNumbers>
<string>(757) 544-9510</string>
<string>17577698337</string>
</PhoneNumbers>
<LicenseKey>F01d89fd-5155-5455-5585-e84ab8de8591</LicenseKey>
</CheckPhoneNumbers>
</soap:Body>
</soap:Envelope>
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>
<CheckPhoneNumbersResponse xmlns="http://ws.esendex.us/PhoneVerify/query">
<CheckPhoneNumbersResult>
<PhoneReturn>
<Company>LEVEL 3 COMMUNICATIONS. LLC - </Company>
<Valid>true</Valid>
<Use>Assigned to a code holder for normal use.</Use>
<State>VA</State>
<RC>PARKSLEY</RC>
<OCN>8825</OCN>
<OriginalNumber>(757) 544-9510</OriginalNumber>
<CleanNumber>7575449510</CleanNumber>
<SwitchName>NORFOLK</SwitchName>
<SwitchType />
<Country>United States</Country>
<CLLI>CHSKVAAYDS0</CLLI>
<PrefixType>CLEC - (Competitive Local Exchange Carrier)</PrefixType>
<LATA>252</LATA>
<sms>CLEC - (Competitive Local Exchange Carrier)</sms>
<Email />
<AssignDate>23/10/2005</AssignDate>
<TelecomCity>Chesapeake</TelecomCity>
<TelecomCounty />
<TelecomState>VA</TelecomState>
<TelecomZip>23324</TelecomZip>
<TimeZone>EST</TimeZone>
<Lat />
<Long />
<Wireless>false</Wireless>
<LRN>7576559199</LRN>
</PhoneReturn>
<PhoneReturn>
<Company>ONVOY. LLC VA</Company>
<Valid>true</Valid>
<Use>Assigned to a code holder for normal use.</Use>
<State>VA</State>
<RC>NRFOLKZON1</RC>
<OCN>138E</OCN>
<OriginalNumber>17577698337</OriginalNumber>
<CleanNumber>7577698337</CleanNumber>
<SwitchName />
<SwitchType />
<Country>United States</Country>
<CLLI>NOCLLIKNOWN</CLLI>
<PrefixType>CLEC - (Competitive Local Exchange Carrier)</PrefixType>
<LATA>252</LATA>
<sms>CLEC - (Competitive Local Exchange Carrier)</sms>
<Email />
<AssignDate>27/01/2020</AssignDate>
<TelecomCity />
<TelecomCounty />
<TelecomState>VA</TelecomState>
<TelecomZip>00000</TelecomZip>
<TimeZone />
<Lat />
<Long />
<Wireless>false</Wireless>
<LRN>7575200993</LRN>
</PhoneReturn>
</CheckPhoneNumbersResult>
</CheckPhoneNumbersResponse>
</soap:Body>
</soap:Envelope>
OST /phoneverify/phoneverify.asmx HTTP/1.1
Host: ws.esendex.us
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>
<CheckPhoneNumbers xmlns="http://ws.esendex.us/PhoneVerify/query">
<PhoneNumbers>
<string>(757) 544-9510</string>
<string>17577698337</string>
</PhoneNumbers>
<LicenseKey>F01d89fd-5155-5455-5585-e84ab8de8591</LicenseKey>
</CheckPhoneNumbers>
</soap12:Body>
</soap12:Envelope>
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>
<CheckPhoneNumbersResponse xmlns="http://ws.esendex.us/PhoneVerify/query">
<CheckPhoneNumbersResult>
<PhoneReturn>
<Company>LEVEL 3 COMMUNICATIONS. LLC - </Company>
<Valid>true</Valid>
<Use>Assigned to a code holder for normal use.</Use>
<State>VA</State>
<RC>PARKSLEY</RC>
<OCN>8825</OCN>
<OriginalNumber>(757) 544-9510</OriginalNumber>
<CleanNumber>7575449510</CleanNumber>
<SwitchName>NORFOLK</SwitchName>
<SwitchType />
<Country>United States</Country>
<CLLI>CHSKVAAYDS0</CLLI>
<PrefixType>CLEC - (Competitive Local Exchange Carrier)</PrefixType>
<LATA>252</LATA>
<sms>CLEC - (Competitive Local Exchange Carrier)</sms>
<Email />
<AssignDate>23/10/2005</AssignDate>
<TelecomCity>Chesapeake</TelecomCity>
<TelecomCounty />
<TelecomState>VA</TelecomState>
<TelecomZip>23324</TelecomZip>
<TimeZone>EST</TimeZone>
<Lat />
<Long />
<Wireless>false</Wireless>
<LRN>7576559199</LRN>
</PhoneReturn>
<PhoneReturn>
<Company>ONVOY. LLC VA</Company>
<Valid>true</Valid>
<Use>Assigned to a code holder for normal use.</Use>
<State>VA</State>
<RC>NRFOLKZON1</RC>
<OCN>138E</OCN>
<OriginalNumber>17577698337</OriginalNumber>
<CleanNumber>7577698337</CleanNumber>
<SwitchName />
<SwitchType />
<Country>United States</Country>
<CLLI>NOCLLIKNOWN</CLLI>
<PrefixType>CLEC - (Competitive Local Exchange Carrier)</PrefixType>
<LATA>252</LATA>
<sms>CLEC - (Competitive Local Exchange Carrier)</sms>
<Email />
<AssignDate>27/01/2020</AssignDate>
<TelecomCity />
<TelecomCounty />
<TelecomState>VA</TelecomState>
<TelecomZip>00000</TelecomZip>
<TimeZone />
<Lat />
<Long />
<Wireless>false</Wireless>
<LRN>7575200993</LRN>
</PhoneReturn>
</CheckPhoneNumbersResult>
</CheckPhoneNumbersResponse>
</soap12:Body>
</soap12:Envelope>