# Understanding Phone Data

## Phone Validation JSON Payload

Below is the explanation for the response of Phone Validation.&#x20;

#### countryCode

Any country code associated with the supplied phone number (e.g. '+61', '+64', '+44').

#### areaCode

Any area code associated with the supplied (non-mobile) phone number (e.g. '02').

#### localNumber

The local part of the supplied number (e.g. '12345678')

#### operatorName

The mobile operator associated with the supplied number (e.g. 'Vodafone Australia')

{% hint style="info" %}

* Phone numbers marked with a 'connected|Network confirmed connection' phoneStatus will display the actual provider name (e.g. 'Vodafone Australia') under the 'operatorName' field.
* Phone numbers marked with a 'disconnected|Network confirmed disconnection' phoneStatus will display 'Unknown' under the 'operatorName' field.
* Phone numbers with an 'indeterminate' status will not display any 'operatorName' in the JSON response.
  {% endhint %}

#### phoneStatus

The current status of the mobile phone with the supplied number (e.g. 'connected|Network confirmed connection', 'disconnected|Network confirmed disconnection', 'indeterminate').

#### exception

An exception message outlining the errors that occurred during validation will be shown for phone numbers with following status.

{% hint style="info" %}

* Phone numbers with 'indeterminate' phone status. (e.g. 'Number prefix missing', 'Network is forbidden', 'Invalid destination address.').
* Phone numbers with the 'connected|Network confirmed connection' status are validated in the default countries 'AU' or 'NZ' but may be validated as another country (e.g., 'Validated as another country - IN'). For further insight into the importance of the default country, please refer the '[Default Country for Phone Validation](https://docs.mastersoftgroup.com/harmony-suite/user-guides/version-3.0.0/email-and-phone-validation/guides/pages/zBufTxbNhNqUWPoVrLfR#id-2.-default-country-for-phone-validation)' section.
  {% endhint %}

JSON Representations for connected, disconnected and indeterminate phone status.

```json
    //connected|Network confirmed connection
    
    {
    "ciqPartyDocument": {
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "phone": {
            "countryCode": "61",
            "numberType": "61",
            "localNumber": "0412345678",
            "phoneQuality": 7,
            "extraAttributes": {
                "MediaType": "61",
                "phoneStatus": "connected|Network confirmed connection",
                "operatorName": "Vodafone Australia"
            }
        },
        "locationInParties": 0,
        "containedInParties": false
    }
}
    
    
```

```json
//connected|Network confirmed connection validated as another country
{
    "ciqPartyDocument": {
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "phone": {
            "countryCode": "44",
            "localNumber": "1234567878",
            "phoneQuality": 7,
            "extraAttributes": {
                "exception": "Validated as another country - GB",
                "phoneStatus": "connected|Network confirmed connection",
                "operatorName": "MNO - 3 (Hutchison 3G UK Ltd)"
            }
        },
        "locationInParties": 0,
        "containedInParties": false
    }
}
```

```json
// disconnected|Network confirmed disconnection
{
    "ciqPartyDocument": {
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "phone": {
            "numberType": "61",
            "localNumber": "0412222222",
            "phoneQuality": 5,
            "extraAttributes": {
                "MediaType": "61",
                "phoneStatus": "disconnected|Network confirmed disconnection",
                "operatorName": "Unknown"
            }
        },
        "locationInParties": 0,
        "containedInParties": false
    }
}
```

```json
// indeterminate
{
    "ciqPartyDocument": {
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "phone": {
            "localNumber": "441112223333",
            "phoneQuality": 5,
            "extraAttributes": {
                "exception": "Number prefix missing",
                "phoneStatus": "indeterminate"
            }
        },
        "locationInParties": 0,
        "containedInParties": false
    }
}

```

## Understanding Phone Data with Various Samples

**Here is a sample input file that comprises of global numbers across different countries AU, IN, NZ and GB, this file has been processed with default locale as "AUSTRALIA". Please refer** [Alignment of Default Locale and 'hosted.defaultCountry for Phone Validation Users](https://docs.mastersoftgroup.com/harmony-suite/user-guides/version-3.0.0/email-and-phone-validation/guides/pages/ZwXtPNE8mQzOxJZfUjAJ#id-1.-alignment-of-default-locale-and-hosted.defaultcountry-for-phone-validation-users) for locale setup.

<div align="left"><figure><img src="/files/Kx8e9NWIy8fov5QKgjy3" alt=""><figcaption></figcaption></figure></div>

**Harmony Batch Output.**

Phone numbers with an Output\_phoneStatus as 'connected' are validated.

Phone numbers with an Output\_phoneStatus as 'disconnected' or 'indeterminate' cannot be validated.&#x20;

* Numbers not presented in international format '+##' (e.g., Records 4 and 7).
* Landline numbers (Record 9).
* Disconnected mobile numbers (Record 10).
* Other invalid data (Record 8).

<figure><img src="/files/GdAxFeNkbWDxhMEKA6gl" alt=""><figcaption></figcaption></figure>

## Understanding Phone Validation Exceptions

**Exception generated when Api credentials for phone are not set as detailed in** [**Phone and Email Access Configuration File.**](https://docs.mastersoftgroup.com/harmony-suite/user-guides/version-3.0.0/email-and-phone-validation/guides/pages/zBufTxbNhNqUWPoVrLfR#id-3.-api-user-and-password-to-access-hosted-phone-api)

```json
{
    "ciqPartyDocument": {
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "containedInParties": false,
        "locationInParties": 0,
        "phone": {
            "localNumber": "+44 123 456 7865",
            "phoneQuality": 5
        }
    },
    "exceptions": [
        {
            "cause": {
                "cause": {
                    "code": "H143",
                    "category": "PDP",
                    "description": "HostedPhoneValidation - ROAD error: Missing API user or password for hosted phone validation",
                    "message": "H143 : HostedPhoneValidation - ROAD error: Missing API user or password for hosted phone validation",
                    "localizedMessage": "H143 : HostedPhoneValidation - ROAD error: Missing API user or password for hosted phone validation"
                },
                "code": "H143",
                "category": "PDP",
                "description": "HostedPhoneValidation - ROAD error: Missing API user or password for hosted phone validation",
                "message": "H143 : HostedPhoneValidation - ROAD error: Missing API user or password for hosted phone validation",
                "localizedMessage": "H143 : HostedPhoneValidation - ROAD error: Missing API user or password for hosted phone validation"
            },
            "code": "H143",
            "category": "PDP",
            "description": "HostedPhoneValidation - ROAD error: Missing API user or password for hosted phone validation",
            "inputData": "+44 123 456 7865",
            "inputType": "PHONE_DATA",
            "message": "H143 : HostedPhoneValidation - ROAD error: Missing API user or password for hosted phone validation",
            "localizedMessage": "H143 : HostedPhoneValidation - ROAD error: Missing API user or password for hosted phone validation"
        }
    ]
}
```

**Exception generated when global phone validation is not enabled as detailed in** [**Activating Global Phone Validation**](/harmony-suite/user-guides/version-3.0.0/email-and-phone-validation/prerequisites.md#activating-global-phone-validation)

```json
{
    "exceptions": [
        {
            "code": "H112",
            "category": "PARSER",
            "description": "No pattern matched for this input - +44 123 456 7865. Check for punctuation errors, duplicate fields, incorrect input format and incorrect input data.",
            "inputData": "+44 123 456 7865",
            "inputType": "PHONE_DATA",
            "message": "H112 : No pattern matched for this input - 44 744 618 4828. Check for punctuation errors, duplicate fields, incorrect input format and incorrect input data.",
            "localizedMessage": "H112 : No pattern matched for this input - 44 744 618 4828. Check for punctuation errors, duplicate fields, incorrect input format and incorrect input data."
        }
    ]
}
```

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mastersoftgroup.com/harmony-suite/user-guides/version-3.0.0/email-and-phone-validation/guides/understanding-phone-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
