# AupostValidation using Harmony WS

API:

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

## Role used in Webservice Request

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

## Sample Request and Response

**Request 1 and Request 2 are samples for validated addresses.**

<details>

<summary>Request 1: Complete address Input that includes Parcel Locker with Number</summary>

```json
{
    "harmonyServiceConfig": {
        "role": "AupostValidationRole",
        "locale":"AUSTRALIA"
    },
    "parserInput": {
        "rawDataInput": {
            "address": {
                "value": "HERVEY BAY PARCEL LOCKER CN # 12345678,UNIT 101a 6 CENTRAL AVENUE, URRAWEEN QLD 4655"
            }
        }
    }
}

```

</details>

<details>

<summary>Response 1: Validated Record. </summary>

```json
{
    "ciqPartyDocument": {
        "addresses": [
            {
                "state": "QLD",
                "streetName": "CENTRAL",
                "streetNumber": "6",
                "flatNumber": "101",
                "placeMajorName": "Hervey Bay Parcel Locker",
                "addressQuality": 9,
                "gml": {
                    "geocodedPosition": "152.833313 -25.289075"
                },
                "addressLines": [
                    "Hervey Bay Parcel Locker, Shop 101 6 Central Avenue, URRAWEEN QLD 4655"
                ],
                "careOfSubject": "12345678",
                "addressLine": "Hervey Bay Parcel Locker, Shop 101 6 Central Avenue, URRAWEEN QLD 4655",
                "postCode": "4655",
                "postalID": "76734732",
                "area": "URRAWEEN",
                "flatType": "Shop",
                "streetType": "AVENUE",
                "addressMessage": "POINT",
                "extraAttributes": {
                    "AddressLine1": "Shop 101 6 Central Avenue",
                    "Type": "UPL",
                    "Description": "Available 24/7",
                    "LocationDescription": "Parcel Locker is located alongside the Street Posting Boxes (SPBs)",
                    "RecordType": "upl",
                    "AddressQuality": "9",
                    "PostalID": "76734732",
                    "Id": "76734732_UPL",
                    "AddressMessage": "POINT",
                    "MatchedRule": "address",
                    "Name": "Hervey Bay Parcel Locker"
                }
            }
        ],
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "containedInParties": false,
        "locationInParties": 0
    }
}
```

</details>

<details>

<summary>Request 2: Input partial address e.g. License post office and locality information</summary>

```json
{
    "harmonyServiceConfig": {
        "role": "AupostValidationRole",
        "locale":"AUSTRALIA"
    },
    "parserInput": {
        "rawDataInput": {
            "address": {
                "value": "CALWELL LPO,CALWELL ACT 2905"
            }
        }
    }
}

```

</details>

<details>

<summary>Response 2: Validated Record.</summary>

```json
{
    "ciqPartyDocument": {
        "addresses": [
            {
                "state": "ACT",
                "streetName": "Webber",
                "streetNumber": "7",
                "flatNumber": "22",
                "placeMajorName": "CALWELL LPO, Calwell Shopping Centre",
                "addressQuality": 6,
                "gml": {
                    "geocodedPosition": "149.114166 -35.435000"
                },
                "addressLines": [
                    "CALWELL LPO, Calwell Shopping Centre, Shop 22 7 Webber Crescent, CALWELL ACT 2905"
                ],
                "addressLine": "CALWELL LPO, Calwell Shopping Centre, Shop 22 7 Webber Crescent, CALWELL ACT 2905",
                "postCode": "2905",
                "postalID": "84328363",
                "area": "CALWELL",
                "flatType": "Shop",
                "streetType": "Crescent",
                "addressMessage": "POINT",
                "extraAttributes": {
                    "AddressLine2": "Shop 22 7 Webber Crescent",
                    "AddressLine1": "Calwell Shopping Centre",
                    "Type": "LPO",
                    "Description": "LICENSED POST OFFICE",
                    "RecordType": "po",
                    "AddressQuality": "6",
                    "PostalID": "84328363",
                    "Id": "200053_PO",
                    "AddressMessage": "POINT",
                    "MatchedRule": "address",
                    "Name": "CALWELL LPO"
                }
            }
        ],
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "containedInParties": false,
        "locationInParties": 0
    }
}
```

</details>

**Request 3 and Request 4 are samples for records that cannot be validated.**

<details>

<summary>Request 3: Input address that has different Parcel locker Plus Data(Parcel Locker and Post office) in the same street address.</summary>

```json
{
    "harmonyServiceConfig": {
        "role": "AupostValidationRole",
        "locale":"AUSTRALIA"
    },
    "parserInput": {
        "rawDataInput": {
            "address": {
                "value": "33 Berry St, NORTH SYDNEY NSW 2060"
            }
        }
    }
}

```

</details>

<details>

<summary>Response 3: Ambiguous matches found for the street address. Record cannot be validated.</summary>

```json
{
    "ciqPartyDocument": {
        "addresses": [
            {
                "state": "NSW",
                "streetName": "Berry",
                "streetNumber": "33",
                "addressQuality": 8,
                "addressLines": [
                    "33 Berry St, NORTH SYDNEY NSW 2060"
                ],
                "addressLine": "33 Berry St, NORTH SYDNEY NSW 2060",
                "postCode": "2060",
                "area": "NORTH SYDNEY",
                "streetType": "St",
                "extraAttributes": {
                    "AddressQuality": "8"
                }
            }
        ],
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "containedInParties": false,
        "locationInParties": 0
    }
}
```

</details>

<details>

<summary>Request 4: Input address does not exist in Aust Post Asset Data</summary>

```json
{
    "harmonyServiceConfig": {
        "role": "AupostValidationRole",
        "locale":"AUSTRALIA"
    },
    "parserInput": {
        "rawDataInput": {
            "address": {
                "value": "210 VICTORIA ST, DENILIQUIN NSW 2710"
            }
        }
    }
}

```

</details>

<details>

<summary>Response 4: Record cannot be validated.</summary>

```json
{
    "ciqPartyDocument": {
        "addresses": [
            {
                "state": "NSW",
                "streetName": "VICTORIA",
                "streetNumber": "210",
                "addressQuality": 8,
                "addressLines": [
                    "210 VICTORIA ST, DENILIQUIN NSW 2710"
                ],
                "addressLine": "210 VICTORIA ST, DENILIQUIN NSW 2710",
                "postCode": "2710",
                "area": "DENILIQUIN",
                "streetType": "ST",
                "extraAttributes": {
                    "AddressQuality": "8"
                }
            }
        ],
        "pdpchangeContext": {},
        "options": {
            "exposeAttributes": "7"
        },
        "containedInParties": false,
        "locationInParties": 0
    }
}
```

</details>


---

# 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/australia-post-parcel-locker-plus-lookup-and-validation/australia-post-parcel-locker-plus-validation/aupostvalidation-using-harmony-ws.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.
