> For the complete documentation index, see [llms.txt](https://docs.mastersoftgroup.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mastersoftgroup.com/harmony-suite/user-guides/version-3.0.0/email-and-phone-validation/email-validation-using-harmony-ws.md).

# Email Validation using Harmony WS

This document provides instructions on utilizing the Harmony Restful WebServices for the Validation of email addresses using Email Validation PDPs in different locales.

## API:

```
http://localhost:8080/HarmonyWS/rest/parseCustomerData
```

## Role used in Webservice Request

Use the role detailed in [PDP configuration setup](https://docs.mastersoftgroup.com/harmony-suite/user-guides/version-3.0.0/email-and-phone-validation/phone-and-email-pdp-configuration-setup.md).

## Sample Request and Response

### 1. Pre Reading

Please ensure that you have read and understood the rule when you are running Email Validation. Although locale must be set in the request it doesn't impact the Email Validation results, user can choose either AUSTRALIA/NEW\_ZEALAND as Default Locale. Refer guidance on [Alignment of Default Locale and 'hosted.defaultCountry' for Phone Validation Users](https://docs.mastersoftgroup.com/pages/ZwXtPNE8mQzOxJZfUjAJ#id-1.-alignment-of-default-locale-and-hosted.defaultcountry-for-phone-validation-users).

### 2. Request Samples

<details>

<summary>Request 1: Input Deliverable email</summary>

```json
{
    "harmonyServiceConfig": {
        "role": "HostedValRole",
        "locale":"AUSTRALIA"  //doesnot impact processing
     
    },
    "parserInput": {
        "rawDataInput": {
           
            "emailAddress":
            {
            	"value":"jim@hotmail.com"
            }
        }
    }
}

```

</details>

<details>

<summary>Response 1: Validated Email that is DELIVERABLE.</summary>

```json
{
    "ciqPartyDocument": {
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "emailAddress": {
            "emailAddress": "jim@hotmail.com",
            "uniqueName": "jim",
            "domainName": "hotmail.com",
            "extraAttributes": {
                "catchAll": "false",
                "do_not_send": "false",
                "hashmd5": "3e9385d795906ee1a3e04aa93bfa3a41",
                "hashsha256": "4c93fb55adc0297ee4086a8d047ff7ca694784c690703eab0f215685db180f37",
                "domain_exists": "VALID",
                "mailserver_exists": "VALID",
                "deliverable": "DELIVERABLE",
                "email_valid": "VALID",
                "domainValidated": "true",
                "message": "Email verified.",
                "disposable": "false",
                "email_exists": "VALID",
                "do_not_mail": "false",
                "hashsha1": "7a90bf8dcac4717728d4f36e291ff17255dadeb2",
                "rolebased": "false",
                "mailBoxValidated": "true",
                "blackListValidated": "true",
                "domain": "hotmail.com",
                "formatValidated": "true",
                "subdomain": "false",
                "risk": "LOW",
                "emailValidated": "true",
                "account": "jim"
            }
        },
        "containedInParties": false,
        "locationInParties": 0
    }
}
```

</details>

<details>

<summary>Request 2: Input Email Address that Doesn't Exist on Mail Server.</summary>

```json
{
    "harmonyServiceConfig": {
        "role": "HostedValRole",
        "locale":"AUSTRALIA"  //doesnot impact processing
        
     
    },
    "parserInput": {
        "rawDataInput": {
           
            "emailAddress":
            {
            	"value":"jimmy@yahoo.com"
            }
        }
    }
}

```

</details>

<details>

<summary>Response 2: Undeliverable Email with Mail Box Not Validated</summary>

```json
{
    "ciqPartyDocument": {
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "emailAddress": {
            "emailAddress": "jimmy@yahoo.com",
            "uniqueName": "jimmy",
            "domainName": "yahoo.com",
            "extraAttributes": {
                "catchAll": "false",
                "reason": "[mailbox_does_not_exist]",
                "do_not_send": "false",
                "hashmd5": "efa811854abb0ad7de2579a349c2d470",
                "hashsha256": "1bc88ec6d822c4bd4c88b399ee7874effea66c26e5a1ac895dbd263792d26ca4",
                "domain_exists": "VALID",
                "mailserver_exists": "VALID",
                "deliverable": "UNDELIVERABLE",
                "email_valid": "VALID",
                "domainValidated": "true",
                "message": "Email address does not exist on mail server.",
                "disposable": "false",
                "email_exists": "INVALID",
                "do_not_mail": "false",
                "hashsha1": "225da63df3d2b1fb9fd6b49e7f8068da88c23733",
                "rolebased": "false",
                "mailBoxValidated": "false",
                "blackListValidated": "true",
                "domain": "yahoo.com",
                "formatValidated": "true",
                "subdomain": "false",
                "risk": "HIGH",
                "emailValidated": "true",
                "account": "jimmy"
            }
        },
        "containedInParties": false,
        "locationInParties": 0
    }
}
```

</details>

<details>

<summary>Request 3: Input Timed Out by the SMTP Provider</summary>

```json
{
    "harmonyServiceConfig": {
        "role": "HostedValRole",
        "locale":"AUSTRALIA"  //doesnot impact processing
     
    },
    "parserInput": {
        "rawDataInput": {
           
            "emailAddress":
            {
            	"value":"thiswilltimeout@email.com"
            }
        }
    }
}

```

</details>

<details>

<summary>Response 3: Undeliverable Email with Reason Code: smtp_timeout</summary>

```json
{
    "ciqPartyDocument": {
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "locationInParties": 0,
        "containedInParties": false,
        "emailAddress": {
            "emailAddress": "thiswilltimeout@email.com",
            "uniqueName": "thiswilltimeout",
            "domainName": "email.com",
            "extraAttributes": {
                "catchAll": "false",
                "reason": "[smtp_timeout]",
                "do_not_send": "false",
                "hashmd5": "cd4bdd475145f8b4bdacfedb1de18db2",
                "hashsha256": "62940336864af888c55aaf6b15cb23501449a5093b39cfa5ab59325dbbbc7093",
                "formateValidated": "true",
                "domain_exists": "VALID",
                "mailserver_exists": "VALID",
                "deliverable": "UNKNOWN",
                "email_valid": "VALID",
                "domainValidated": "true",
                "message": "Please check email, unable to determine if valid or invalid.",
                "disposable": "false",
                "email_exists": "UNKNOWN",
                "do_not_mail": "false",
                "hashsha1": "e84fec215fd77d9d9e3e827585dc000b0a1e2de3",
                "rolebased": "false",
                "mailBoxValidated": "false",
                "blackListValidated": "true",
                "domain": "email.com",
                "subdomain": "false",
                "risk": "UNKNOWN",
                "emailValidated": "true",
                "account": "thiswilltimeout"
            }
        }
    }
} 
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mastersoftgroup.com/harmony-suite/user-guides/version-3.0.0/email-and-phone-validation/email-validation-using-harmony-ws.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
