Overview
Returns phone owner information like First Name, Last Name, Address with latitude and Longitude, Associated People etc. This service should only be used for US and Canada mobile numbers.
Syntax
C#
[OperationContractAttribute()] SBT.API.DataContracts.Common.WSReversePhoneResponse ReversePhoneLookup( string securityToken, string phone string orgCode )
WSDL
Production: https://ui.solutionsbytext.com/Sbt.App.SetUp/wsservices/GeneralWSService.svc?singlewsdl
Staging: https://test.solutionsbytext.com/SBT.App.SetUp/wsservices/GeneralWSService.svc?singlewsdl
Parameters
securityToken
- String[1000] (Required) - Security Token to authenticate the user
phone
- string[20] (Required) - Phone number to be checked for owner details.
orgCode
- String[20] (Required) - Organization Code for the group, division or organization.
Return Value
WSCarrierPhoneResponse
Name | Type | Description |
---|---|---|
Result | bool | True/False whether the call was successful or not. |
ErrorCode | int | For Success/Failure it returns an error number. |
Message | string | Message related to error code. |
Response |
Id:Phone number id. phone_number: Phone for which reverse lookup done is_valid: Checking for Valid phone number. Result is True/False/NULL. If false, this is an invalid phone number. Reasons include invalid or missing area code, invalid country code, too short or too long number. country_calling_code: Calling code of the country. line_type:
carrier: For carrier lookup please refer to carrier lookup API is_prepaid: Carrier plan information. Value can be true/false is_commercial: If true, phone number is associated to a business. Possible values are true, false, null. |
|
<a:belongs_to> |
name: Phone owner Name firstname: Phone owner First Name lastname: Phone owner Last Name age_range: Phone owner Age Range type: Phone Owner type. Business or Person |
|
<a:current_addresses> |
location_type: Part of “current_addresses” string indicating the type of address returned as associated with the phone owner. The most precise address information available will be provided with levels decreasing in precision in the following order: Address, ZipPlus4, CityPostalCode, PostalCode, City, State, Country. street_line_1:Street line 1 of the current address city: City of the current address, person or business is associated with. postal_code: Postal code of the current address, person or business is associated with. zip4: zip4 of the current address, person or business is associated with. state_code: 2 digit state code of the current address, person or business is associated with. country_code: Alpha-2 country code of the current address, person or business is associated with. <a:lat_long> latitude: Latitude of the Address longitude: Latitude of the Address accuracy: Accuracy point of the Address. E.g. RoofTop, Street, PostalCode, Neighborhood, City, State, Country. </a:lat_long> is_active: Indicates if the address is currently receiving mail. Possible values are true, false, or null. delivery_point: Indicates delivery point for the address. Possible values:
link_to_person_start_date: String with ISO format date when address got linked to person or business. |
|
<a:historical_addresses/> <a:associated_people> <a:WSReversePhone AssociatedPeople> |
A list of related and associated people to person or business in belongs_to array. Each object in the array will include: id: Id of the associated person. name: Full name of the associated person. relation:Relation of the associated person to phone owner.
|
|
<a:alternate_phones> | String: This will include an array of alternate phone numbers for people and businesses in belongs_to array. | |
Warnings: An array of strings with validation warnings. Possible values are
|
Example
C#
lblError.Text = ""; GroupClient generalService = new GroupClient("ReportWSServiceHttpEndpoint2"); string securityToken = txtSecurityToken.Text.Trim(); string orgCode = txtOrgCode.Text.Trim(); string phone = txtPhone.Text.Trim(); WSReversePhoneResponse wSReversePhoneResponse = generalService.ReversePhoneLookup (securityToken, orgCode, phone); if (!wSReversePhoneResponse.Result) { //handle error lblError.Text = wSReversePhoneResponse.Message; } else { //handle success lblError.Text = wSReversePhoneResponse.Message; }
SOAP
Soap Request <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/"> <soapenv:Header/> <soapenv:Body> <ser:ReversePhoneLookup> <!--Required:--> <ser:securityToken>Security Token<ser:securityToken> <!--Required:--> <ser:orgCode>Organization Code</ser:orgCode> <!--Required:--> <ser:phone>Phone Number</ser:phone> </ser:ReversePhoneLookup> </soapenv:Body> </soapenv:Envelope> Soap Response <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <ReversePhoneLookupResponse xmlns="http://SBTService/ServiceContracts/"> <ReversePhoneLookupResult xmlns:a="http://SBTAPIService/DataContract/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:ResponseCode>1539</a:ResponseCode> <a:Message>Reverse Phone Lookup executed successfully</a:Message> <a:Result>true</a:Result> <a:Response> <a:id>Phone ID</a:id> <a:phone_number>Owner Phone number</a:phone_number> <a:is_valid>true</a:is_valid> <a:country_calling_code>1</a:country_calling_code> <a:line_type>A</a:line_type> <a:carrier>Please refer to carrier lookup API</a:carrier> <a:is_commercial>false</a:is_commercial> <a:belongs_to> <a:WSResversePhoneOwnerName> <a:name>Full name of phone owner</a:name> <a:firstname> First name of phone owner </a:firstname> <a:lastname> Last name of phone owner </a:lastname> <a:age_range>Age Range of phone owner</a:age_range> <a:type>Person</a:type> </a:WSResversePhoneOwnerName> </a:belongs_to> <a:current_addresses> <a:WSReversePhoneOwnerAddress> <a:location_type>Address</a:location_type> <a:street_line_1>Line 1 of phone owner address</a:street_line_1> <a:city>City</a:city> <a:postal_code>5 digit postal code of city</a:postal_code> <a:zip4>Zip4 of city</a:zip4> <a:state_code>two character state code</a:state_code> <a:country_code>Country Code</a:country_code> <a:lat_long> <a:latitude>Latitude of the address</a:latitude> <a:longitude> Longitude of the address </a:longitude> <a:accuracy>Accuracy of address. E.g.RoofTop</a:accuracy> </a:lat_long> <a:is_active>true</a:is_active> <a:delivery_point>SingleUnit</a:delivery_point> <a:link_to_person_start_date>2002-03-01</a:link_to_person_start_date> </a:WSReversePhoneOwnerAddress> </a:current_addresses> <a:historical_addresses/> <a:associated_people> <a:WSReversePhoneAssociatedPeople> <a:id>ID of the associated person </a:id> <a:name>Full name of associated person</a:name> <a:relation>Relation to owner</a:relation> </a:WSReversePhoneAssociatedPeople> <a:alternate_phones xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <b:string>Alternative phone number of owner</b:string> </a:alternate_phones> <a:warnings xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> </a:Response> </ReversePhoneLookupResult> </ReversePhoneLookupResponse> </s:Body> </s:Envelope>
REST
Method: GET
Response:
The response will be in JSON format like below: { "ReversePhoneLookupResult": { "ResponseCode": 1539, "Message": "Reverse Phone Lookup executed successfully", "Result": true, "Response": { "WSPhoneOwner response – Name, Phone and Address details with longitude and Latitude, Alternative phone numbers, Alternative Addresses and Associated People will display here in JSON format" } }}