> 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/loqate-harmony-api/api-specification/deprecated/address-cleanse.md).

# Address Cleanse v1

Cleanse methods validate the single line input address based on the required source of truth.

## Cleanse methods (AU/NZ)

Cleanse methods validate the single line input address based on the required source of truth.

<table data-header-hidden><thead><tr><th width="294"></th><th></th></tr></thead><tbody><tr><td><a href="https://developer.mastersoftgroup.com/harmony/api/method/cleanse.html#address">address</a></td><td>Cleanse the supplied single-line address into its component parts based on the supplied SOT.</td></tr></tbody></table>

### address <a href="#address" id="address"></a>

The cleanse method takes a concatenated address String in the fullAddress field of an AddressAu or AddressNz parameter. It then attempts to validate it based on the supplied sourceOfTruth into component parts which are then returned in a populated AddressAu or AddressNz object with additional attributes. We support AUPAF, GNAF and NZPAF in this version, and we are continuing the development to support more validations.&#x20;

POST method it can allow to send a list of Addresses (maximum 100 per request) and then return a list of validated addresses.

Details of the processes for each available sourceOfTruth:

* sourceOfTruth : GNAF (GNAFAddressStandardization + GNAFValidation)
* sourceOfTruth : AUPAF (AMASAddressStandardization + AMASHAVE)
* sourceOfTruth : NZPAF (NZAddressStandardiztion + NZPostcodeAllocation + NZHAVEGeoPAF)

#### Resource URL

```
	
    GET    https://hosted.mastersoftgroup.com/harmony/rest/{locale}/cleanse/address?sourceOfTruth=GNAF&fullAddress=220 GEORGE ST, SYDNEY
	    
```

```
	
    POST    https://hosted.mastersoftgroup.com/harmony/rest/{locale}/cleanse/address
```

#### Request

The request body is an [AddressRestRequest](/loqate-harmony-api/api-specification/objects/address-objects.md#addressrestrequest) object:

{% hint style="info" %}

{% endhint %}

```
	
    {
        "payload": [ 
            { "fullAddress": "SE 202, 220 George Street, Syndey 2000" }, 
            { "fullAddress": "3 Orara Street, waitara nsw" }, 
            .... 
        ],
        "sourceOfTruth": "AUPAF"
    }
	    
```

#### Response

{% hint style="success" %}
See [Address Field Mapping Gui](/loqate-harmony-api/guides/best-practices/address-field-mappings.md)[de](/loqate-harmony-api/guides/best-practices/address-field-mappings.md) for integration best practices.
{% endhint %}

The response body is an [AddressRestResponse ](/loqate-harmony-api/api-specification/objects/address-objects.md#addressrestresponse)object:

```
	
    {
        "status": "SUCCESS",
        "messages": [],
        "payload": [	            
            {	
                "fullAddress": "220 GEORGE STREET,SYDNEY NSW 2000",
                "country": "",
                "postcode": "2000",
                "street2": "",
                "street": "George Street",
                "streetNumber": "220",
                "postal": "",
                "postalNumber": "",
                "postalType": "",
                "buildingName": "",
                "subdwelling": "SE 202",
                "eid": null,
                "lotNumber": null,
                "flatUnitNumber": "202",
                "flatUnitType": "SE",
                "floorLevelNumber": "",
                "floorLevelType": "",
                "streetSuffix": "",
                "streetType": "Street",
                "streetName": "George",
                "careOf": "",
                "exception": null,
                "locality": "SYDNEY",
                "state": "NSW",
                "attributes": {
                    "GNAFPIDPosition": "ROOFTOP",
                    "GNAFConfidence": "0",
                    "ParcelID": "1//DP75111",	       	                	
                    "MeshblockId": "10743811000",
                    "Latitude": "-33.86307089",	       	                	
                    "Longitude": "151.20781474",
                    "GNAFReliability": "2",
                    "GNAFPID": "GANSW710276621",
                    "GNAFPointPID": "GANSW710276621",
                    "GNAFGroupPID": "NSW2845405",
                    "GNAFLocalityPID": "NSW3749",	       	                	
                    "GeocodeLevel": "7"
                }
            },
            {   
                "fullAddress": "3-11 ORARA STREET,WAITARA NSW 2077",
                "country": "",
                "postcode": "2077",
                "street2": "",
                "street": "Orara Street",
                "streetNumber": "3-11",
                "postal": "",
                "postalNumber": "",
                "postalType": "",					
                "buildingName": "",
                "subdwelling": "",
                "eid": null,
                "lotNumber": null,
                "flatUnitNumber": "",
                "flatUnitType": "",
                "floorLevelNumber": "",
                "floorLevelType": "",
                "streetSuffix": "",
                "streetType": "Street",
                "streetName": "Orara",
                "careOf": "",
                "exception": null,
                "locality": "waitara",
                "state": "nsw",
                "attributes": {
                    "GNAFPIDPosition": "ROOFTOP",
                    "GNAFConfidence": "1",
                    "ParcelID": "110//SP75046",
                    "GNAFPointPID": "GANSW716818114",
                    "MeshblockId": "11205293800",
                    "Latitude": "-33.70872612",
                    "GNAFPID": "GANSW716818114",
                    "Longitude": "151.10400679",
                    "GNAFReliability": "2",
                    "GNAFLocalityPID": "NSW4122",
                    "GNAFGroupPID": "NSW2895995",
                    "GeocodeLevel": "7"
                }
            },
            .......
        ]
    }
	    
```


---

# 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/loqate-harmony-api/api-specification/deprecated/address-cleanse.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.
