ValidatePhoneNumber

The ValidatePhoneNumber service receives a phone number, validates the number, and gets network information about the number when available.

Resource URL

JSON endpoint:

https://OnDemandServer/rest/ValidatePhoneNumber/results.json

XML endpoint:

https://OnDemandServer/rest/ValidatePhoneNumber/results.xml

For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.

Example with JSON Response

The following example requests a JSON response:

https://spectrum.precisely.com/rest/ValidatePhoneNumber/results.json?Data.Country=US&Data.PhoneNumber=+1 (507) 252 3440

The JSON returned by this request would be:

            {
   "Output":[
      {
         "MCC":"310",
         "CarrierName":"Level 3 Communications, LLC",
         "PhoneType":"Landline",
         "PhoneNumberFormatted":"(507) 252-3440",
         "CountryCode":"US",
         "PhoneNumber":"+15072523440",
         "ResultCode":"100",
         "user_fields":[
            
         ]
      }
   ]
}

Example with XML Response

The following example requests a XML response:

https://spectrum.precisely.com/rest/ValidatePhoneNumber/results.xml?Data.Country=US&Data.PhoneNumber=+1 (507) 252 3440

The XML returned by this request would be:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xml.ValidatePhoneNumberResponse xmlns="http://www.pb.com/spectrum/services/ValidatePhoneNumber">
    <Output>
        <Row>
            <MCC>310</MCC>
            <CarrierName>Level 3 Communications, LLC</CarrierName>
            <PhoneType>Landline</PhoneType>
            <PhoneNumberFormatted>(507) 252-3440</PhoneNumberFormatted>
            <CountryCode>US</CountryCode>
            <PhoneNumber>+15072523440</PhoneNumber>
            <ResultCode>100</ResultCode>
            <user_fields/>
        </Row>
    </Output>
</xml.ValidatePhoneNumberResponse>