# Create Address

### Resource

```
POST    https://hosted.mastersoftgroup.com/harmony/rest/address/exchange/v1/addresses
```

### Request

The request body is similar to [AddressRestRequest](/loqate-harmony-api/api-specification/objects/address-objects.md#addressrestrequest) object.&#x20;

<pre class="language-json"><code class="lang-json">{
<strong>  // Part of Country 
</strong>  "country": "AU", //Required in ISO-2 format. 
  
  //  Part of Premise level data. Need at least one (usually streetNumber)
  "streetNumber": "string", //  Optional. Most commonly used in 99% addresses.
  "buildingName": "string", //  Optional.
  "flatUnitNumber": "string", //  Optional. Must use with flatUnitType
  "flatUnitType": "string", //  Optional. Must use with flatUnitNumber
  "floorLevelNumber": "string", //  Optional. Must use with floorLevelType
  "floorLevelType": "string", //  Optional. Must use with floorLevelNumber
  
  // Part of Street level data
  "streetName": "string", // Required. Must use with streetType
  "streetType": "string", // Required. Must use with streetName
  
  //Part of City level data
  "suburb": "string", // Required. Known as City. 
  "postcode": "string", // Optional. Known as Zip or Postcode. 
  
  //  Part of Province level data
  "state": "string", // Required.
  
  //  Geocodes in wgs84 EPSG: 4326
  "latitude": "string", // wgs84 EPSG: 4326
  "longitude": "string" // wgs84 EPSG: 4326
}
</code></pre>

Creating an address requires completion of the all the data levels being:

1. Premise level: One or many. Most common is streetNumber.
   1. buildingName,&#x20;
   2. flatUnitNumber and flatUnitType,
   3. floorLevelNumber, floorLevelType,
   4. streetNumber&#x20;
2. Street level: Completion of both parts is required.
   1. streetName and streetType
3. City level:  Suburb must be completed. Postcode is optional
   1. suburb
   2. postcode
4. Province level:
   1. state has the same meaning as province.
5. Country level:
   1. country in ISO2 format is required.

### Response

The response plays back the submitted Address with status.&#x20;

```json
{
    "status": "SUCCESS",
    "messages": [],
    "payload": {
        "uuid": "788c4c23-fb69-4296-87aa-0650d514283f",
        "createDate": 1691992029508,
        "updateDate": 1691992029508,
        "assessments": [
            {
                "uuid": "13bf0035-f939-4f08-8a62-a9e9860e0872",
                "assessmentDate": 1691992029673,
                "events": null,
                "score": null
            }
        ],
        "attributes": null,
        "country": "AU",
        "postcode": "3144",
        "suburb": "MALVERN",
        "state": "VIC",
        "line1": null,
        "line2": null,
        "streetNumber1Prefix": null,
        "streetNumber1": "23",
        "streetNumber1Suffix": "",
        "streetNumber2Prefix": null,
        "streetNumber2": "25",
        "streetNumber2Suffix": "",
        "postalType": null,
        "postalNumber": null,
        "buildingName": "",
        "subdwelling": null,
        "lotNumber": "",
        "flatUnitNumber": "",
        "flatUnitType": "",
        "floorLevelNumber": "",
        "floorLevelType": "",
        "streetSuffix": "",
        "streetType": "PDE",
        "streetName": "MILTON",
        "rdNumber": "",
        "district": null,
        "latitude": "-37.84615841",
        "longitude": "145.03898928",
        "description": null,
        "fullAddress": "23-25 MILTON PDE, MALVERN VIC 3144"
    }
}
```


---

# 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/loqate-harmony-api/address-exchange-beta/adx-api-specification/create-address.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.
