Below are the response fields w.r.t Batch Phone validation. For Single Phone validation root element will be response:
| Field | Type | Description |
|---|---|---|
| responses.id | Unique id | Optional parameter which will tag along with result when passed at the time of input. |
| responses.status | Status | Status of the response. |
| responses.phoneNumber | Result array | Result of phone validation. |
| responses.phoneNumber.callingCountryCode | String | International dialling prefix of the phone number defined in the E.164 standard. |
| responses.phoneNumber.country | String | The phone number's ISO country code. |
| responses.phoneNumber.mobileCountryCode | String | The three digit mobile country code of the carrier, used with the mobile network code to identify a mobile network operator. |
| responses.phoneNumber.mobileNetworkCode | String | The two-three digit mobile network code of the carrier, used with the mobile country code to identify a mobile network operator (only returned for mobile numbers). |
|
responses. phoneNumber.carrierName |
String | The name of the carrier; subject to change. |
|
responses.phoneNumber.phoneType |
String | The following are the possible values for the
phoneType
|
| responses.phoneNumber.nationalNumberFormat | String | The phone number in national format. |
| responses.phoneNumber.formattedPhoneNumber | String | The phone number in E.164 format, which consists of a + followed by the country code and subscriber number. |
| response.phoneNumber.validStatus | Boolean | Only valid phone numbers will return results. If you attempt to lookup a phone number which is invalid, you will receive validStatus: false in the response. |
| response.phoneNumber.validationDescription | String |
In some cases you will also receive a reason for the validation failure in the validationDescription field. The following are the possible values:
|
Phone Verification API sample response:
{
"response": {
"status": "OK",
"phoneNumber": {
"callingCountryCode": "1",
"country": "US",
"mobileCountryCode": "310",
"carrierName": "Teleport Communications America, LLC",
"phoneType": "landline",
"nationalNumberFormat": "(414) 465-4885",
"formattedPhoneNumber": "+14144654885",
"validStatus": true
}
}
}{
"responses": [
{
"status": "OK",
"id": "1",
"phoneNumber": {
"callingCountryCode": "1",
"country": "US",
"mobileCountryCode": "310",
"carrierName": "Teleport Communications America, LLC",
"phoneType": "landline",
"nationalNumberFormat": "(414) 465-4885",
"formattedPhoneNumber": "+14144654885",
"validStatus": true
}
},
{
"status": "OK",
"id": "1",
"phoneNumber": {
"nationalNumberFormat": "4144",
"formattedPhoneNumber": "14144",
"validStatus": false,
"validationDescription": "TOO_SHORT"
}
}
]
}Error Codes
| Error Code | Description |
|---|---|
| DIS-1001 | Invalid token |
| DIS-1002 | Not Authorized to access this API |
| DIS-1003 | Issue with internal services |
| DIS-PV-1001 | Batch size must not exceed 10 |
| DIS-PV-1002 | PhoneNumber can not be null or empty |
| DIS-PV-1003 | Request is not valid |
| DIS-PV-1004 | Required body is not specified |