Phone Validation
Validate a phone number and receive phone details on return.
PhoneMatch5.0.Validate
POST
https://production.idresponse.com/process/comprehensive/gateway
Make an HTTPS POST request with the following body parameters to find out if the target has provided a valid number and other details about the number. You will receive a synchronous response in 2-3 seconds with a result object that includes an action, detail and issues object.
Request Body
Name | Type | Description |
---|---|---|
user | string | Your account's API username |
pass | string | Your Account's API password |
service | string | The service name (PhoneMatch5.0.Validate) |
reference | string | A unique identifier for your customer |
target | object | The individual being sent for verification |
phone | string | The target's phone number (see formats below) |
invalid_phonelinetypes | array | Set which line types should FAIL the check (see below for input values) |
Sample Request Body
How should the number be formatted?
The number should be a string with the country code followed by the number.
US Example
International Example
If you send the number with any characters that is fine. They will be stripped out. So, 1 (201) 510-6000
is also valid.
Invalid Phone Number Types
On input you can set which line types should return a FAIL
- PHONE TYPE CHECK FAILED
. For example, the above would fail if the number was detected as voip. Use any of the line types described below in the output data section.
Action and Detail Responses
The following are all values that will be returned in the result object of the response.
Action | Detail | Description |
FAIL | PHONE CHECK FAILED | The phone number is not valid |
FAIL | PHONE TYPE CHECK FAILED | The phone number type is in the exclusion list |
PASS | ALL CHECKS PASSED | The phone number is valid and the type is not excluded |
Output Data
The phone validation returns information to your application about the number. Below are the return values.
Parameter | Description |
countrycode | The ISO-3166 alpha-2 country code of the address. |
countrycallingcode | The country code of the phone number. |
country | The country name of the location associated to the phone number. |
phonelinetype | The line type of the phone number.
|
carrier | The company that provides voice and/or data services for the phone number. Carriers are returned at the MVNO level. |
phonenumber | The phone number in E.164 or local format. The default country calling code is +1 (USA). |
Rules
PhoneMatch+Validate will process with the default base ruleset. Here are the rules:
The base ruleset will return a PASS when:
The phone number is valid
The phone number type is not on the exclusion list
The base ruleset will return a FAIL when:
The phone number is not valid
The phone number type is on the exclusion list
API Processing Error Returns
Error ReturnsLast updated