5. Contact Validation: Address Typeahead (Complex)

5.1. Introduction

The address auto-complete (typeahead) API endpoints are utilised to improve user experience by providing an efficient means of data entry. Addresses selected from the auto-complete results list should be followed up with a Validate Address call prior to storing the address in your systems. This is to ensure that the address captured is valid and data formats correct.

These APIs form part of the Contact Validation (Address) auto-complete functionality suitable for capturing address in ‘complex’ or ‘deconstructed’ mode. As opposed to the ‘Simple’ address, a complex address is one in the format of:

Unit  
Streetnumber 100
Street Arthur Street
Suburb North Sydney
State NSW
Postcode 2060

Note

  • The Authentication for all Address Auto-complete (typeahead) APIs is done via Referer.
  • API endpoint URLs and parameters in the query string are not case sensitive.
  • Remember to properly encode URLs - such as encoding whitespace as %20.

5.2. ConstructAddress

ConstructAddress will take separate address elements and returns a single address line. This can be used for switching from complex address capture to simple address capture.

5.2.1. API URL Endpoint and URL Format

http://services.inivio.com.au/autocomplete/address/constructaddress?query_string where the query string is composed of a series of field-value pairs field1=value1&field2=value2&field3=value3

5.2.2. Query String Fields and Values

Query String Fields Values Type Notes
state Australian State Abbreviations Optional Field NSW, ACT, NT, QLD, SA, TAS, VIC, WA
postcode Australian postcode in full or part of it Optional Field  
suburb Suburb name in full or part of it Optional Field See Note 1 below the table
street Street name Optional field Setting this has no effect on the operator
streetNumber Street number Optional field Setting this has no effect on the operator
unit Unit number Optional field Setting this has no effect on the operator
limit Integer Optional field Default to 15
as XML or JSON Optional field Default is JSON

5.2.3. Example 1

5.2.3.1. Request

Construct the address from supplied parameters in the query string such as:

http://services.inivio.com.au/autocomplete/address/constructaddress?state=nsw&street=epping%20rd&suburb=north%20ryde&streetnumber=1&postcode=2113

5.2.3.2. Response

{"Result":"1 epping rd north ryde nsw 2113"}

5.3. AddressFields

AddressFields takes a ‘simple’ address (i.e. single address line) and returns the string into separate address elements.

5.3.1. API URL Endpoint and URL Format

http://services.inivio.com.au/autocomplete/address/addressfields?query_string where the query string is composed of a series of field-value pairs field1=value1&field2=value2&field3=value3

5.3.2. Query String Fields and Values

Query String Fields Values Type Notes
address Full address Mandatory Field  
as XML or JSON Optional field Default is JSON

5.3.3. Example 1

5.3.3.1. Request

Get the fields of the address supplied via address parameter

http://services.inivio.com.au/autocomplete/address/AddressFields?address=l+15+100+Arthur+st+North+Sydney+2060+nsw&as=xml

5.3.3.2. Response

<ResultOfSimpleAddress xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Result>
                <Level>15</Level>
                <PDNumber/>
                <PDType/>
                <Postcode>2060</Postcode>
                <State>NSW</State>
                <Street>ARTHUR</Street>
                <StreetNumber>100</StreetNumber>
                <Suburb>NORTH SYDNEY</Suburb>
                <Unit/>
</Result>
</ResultOfSimpleAddress>

5.3.4. Example 2

5.3.4.1. Request

Get the fields of the address supplied via address parameter:

http://services.inivio.com.au/autocomplete/address/addressfields?address=1%20epping%20rd%20north%20ryde%20nsw%202113&as=xml

5.3.4.2. Response

<ResultOfSimpleAddress xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Result>
                <Level/>
                <PDNumber/>
                <PDType/>
                <Postcode>2113</Postcode>
                <State>NSW</State>
                <Street>EPPING</Street>
                <StreetNumber>1</StreetNumber>
                <Suburb>MACQUARIE PARK</Suburb>
                <Unit/>
        </Result>
</ResultOfSimpleAddress>

5.4. Postcode

Returns all postcodes in a given state and / or suburb which begin with the values of the fields in the URL query string

5.4.1. API URL Endpoint and URL Format

http://services.inivio.com.au/autocomplete/address/postcode?query_string where the query string is composed of a series of field-value pairs field1=value1&field2=value2&field3=value3

5.4.2. Query String Fields and Values

Query String fields Values Type Notes
state Australian State Abbreviations Mandatory Field NSW, ACT, NT, QLD, SA, TAS, VIC, WA
postcode Australian postcode in full or part of it Optional Field  
suburb Suburb name in full or part of it Optional Field See Note 1 below the table
street Street name Optional field Setting this has no effect on the operator
streetNumber Street number Optional field Setting this has no effect on the operator
unit Unit number Optional field Setting this has no effect on the operator
limit Integer Optional field Default to 15
as XML or JSON Optional field Default is JSON

Note

  • This method accepts a suburb full or partial match. (I.e. ‘North Sydney’ or ‘North Syd’)
  • If no limit is set, then the default limit returned is 15

5.4.3. Example 1

5.4.3.1. Request

Get postcodes starting with 21 in NSW in JSON data format, limited to 5 response elements:

http://services.inivio.com.au/autocomplete/address/postcode?postcode=21&state=nsw&limit=5&as=json

5.4.3.2. Response

{"Result":["2100","2101","2102","2103","2104"]}

5.4.4. Example 2

5.4.4.1. Request

Get the postcodes starting with 21 in NSW in XML data format ( limited to 15 by default.):

http://services.inivio.com.au/autocomplete/address/Postcode?state=NSW&postcode=21&as=xml

5.4.4.2. Response

<ResultOfArrayOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Result xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a:string>2100</a:string>
                <a:string>2101</a:string>
                <a:string>2102</a:string>
                <a:string>2103</a:string>
                <a:string>2104</a:string>
                <a:string>2105</a:string>
                <a:string>2106</a:string>
                <a:string>2107</a:string>
                <a:string>2108</a:string>
                <a:string>2110</a:string>
                <a:string>2111</a:string>
                <a:string>2112</a:string>
                <a:string>2113</a:string>
                <a:string>2114</a:string>
                <a:string>2115</a:string>
        </Result>
</ResultOfArrayOfstring>

5.4.5. Example 3

5.4.5.1. Request

Get all postcodes starting with 2 in NSW in the suburb of North Ryde in XML data format:

http://services.inivio.com.au/autocomplete/address/Postcode?state=NSW&postcode=2&suburb=north%20ryde&as=xml

5.4.5.2. Response

<ResultOfArrayOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Result xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a:string>2113</a:string>
        </Result>
</ResultOfArrayOfstring>

5.5. Suburb

Returns all suburbs in a given state and / or postcode which begin with the values of the fields in the URL query string

5.5.1. API URL Endpoint and URL Format

http://services.inivio.com.au/autocomplete/address/suburb?query_string where the query string is composed of a series of field-value pairs field1=value1&field2=value2&field3=value3

5.5.2. Query String Fields and Values

Query String fields Values Type Notes
state Australian State Abbreviations Mandatory Field NSW, ACT, NT, QLD, SA, TAS, VIC, WA
postcode Australian postcode in full or part of it Optional Field  
suburb Suburb name in full or part of it Optional Field See Note 1 below the table
street Street name Optional field Setting this has no effect on the operator
streetNumber Street number Optional field Setting this has no effect on the operator
unit Unit number Optional field Setting this has no effect on the operator
limit Integer Optional field Default to 15
as XML or JSON Optional field Default is JSON

Note

  • This method accepts a suburb full or partial match. (I.e. ‘North Sydney’ or ‘North Syd’)
  • If no limit is set, then the default limit returned is 15

5.5.3. Example 1

5.5.3.1. Request

Get all the suburbs with postcode 2113:

http://services.inivio.com.au/autocomplete/address/suburb?postcode=2113

5.5.3.2. Response

{"Result":["Blenheim Road","East Ryde","Macquarie Centre","Macquarie Park","North Ryde"]}

5.5.4. Example 2

5.5.4.1. Request

Get all the suburbs with North in the state of NSW in XML data format:

http://services.inivio.com.au/autocomplete/address/suburb?state=NSW&suburb=north&as=xml

5.5.4.2. Response

<ResultOfArrayOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Result xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a:string>North Albury</a:string>
                <a:string>North Arm</a:string>
                <a:string>North Arm Cove</a:string>
                <a:string>North Avoca</a:string>
                <a:string>North Balgowlah</a:string>
                <a:string>North Batemans Bay</a:string>
                <a:string>North Boambee Valley</a:string>
                <a:string>North Bondi</a:string>
                <a:string>North Bourke</a:string>
                <a:string>North Casino</a:string>
                <a:string>North Curl Curl</a:string>
                <a:string>North Dorrigo</a:string>
                <a:string>North Epping</a:string>
                <a:string>North Gosford</a:string>
                <a:string>North Haven</a:string>
        </Result>
</ResultOfArrayOfstring>

Note: The response is limited to default 15

5.6. Street

Returns all streets in a given state and postcode and suburb which begin with the values of the fields in the URL query string

5.6.1. API URL Endpoint and URL Format

http://services.inivio.com.au/autocomplete/address/street?query_string where the query string is composed of a series of field-value pairs field1=value1&field2=value2&field3=value3

5.6.2. Query String Fields and Values

Query String fields Values Type Notes
state Australian State Abbreviations Mandatory Field NSW, ACT, NT, QLD, SA, TAS, VIC, WA
postcode Australian postcode in full or part of it Mandatory Field  
suburb Suburb name in full Mandatory Field See Note 1 below the table
street Street name Optional field  
streetNumber Street number Optional field Setting this has no effect on the operator
unit Unit number Optional field Setting this has no effect on the operator
limit Integer Optional field Default to 15
as XML or JSON Optional field Default is JSON

Note

  • This method accepts a suburb full or partial match. (I.e. ‘North Sydney’ or ‘North Syd’)
  • If no limit is set, then the default limit returned is 15

5.6.3. Example 1

5.6.3.1. Request

Get street names starting with letter ‘e’ in the suburb of North Ryde with postcode 2113 in NSW:

http://services.inivio.com.au/autocomplete/address/street?street=e&postcode=2113&state=NSW&suburb=north%20ryde&as=xml

5.6.3.2. Response

<ResultOfArrayOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Result xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a:string>Eastview Ave</a:string>
                <a:string>Epping Rd</a:string>
                <a:string>Edmondson St</a:string>
        </Result>
</ResultOfArrayOfstring>

5.6.4. Example 2

5.6.4.1. Request

Get street names starting with letter ‘m’ in the suburb of Brunswick with postcode 3056 in VIC:

http://services.inivio.com.au/autocomplete/address/street?street=m&state=vic&suburb=brunswick&postcode=3056

5.6.4.2. Response

{"Result":["Marks St","Mckay St","Merri St","Munro St","Mcvean St","Minnie St","Mciver St","Michael St","Murdock St","Millward St","Moreland Rd","Mitchell St","Mayfield Ave","Mcpherson St","Mcdougall St"]}

5.7. StreetNumber

Returns all street numbers in a given state and postcode and suburb and street which begin with the values of the fields in the URL query string.

5.7.1. API URL Endpoint and URL Format

http://services.inivio.com.au/autocomplete/address/streetnumber?query_string where the query string is composed of a series of field-value pairs field1=value1&field2=value2&field3=value3

5.7.2. Query String Fields and Values

Query String Fields Values Type Notes
state Australian State Abbreviations Mandatory Field NSW, ACT, NT, QLD, SA, TAS, VIC, WA
postcode Australian postcode in full or part of it Mandatory Field  
suburb Suburb name in full or part of it Mandatory Field  
street Street name Mandatory Field  
streetNumber Street number Optional field  
unit Unit number Optional field Setting this has no effect on the operator
limit Integer Optional field Default to 15
as XML or JSON Optional field Default is JSON

Note

If no limit is set, then the default limit returned is 15

5.7.3. Example 1

5.7.3.1. Request

Get the street numbers starting with 1 in North Sydney with postcode 2060 at Arthur Street in JSON data format:

http://services.inivio.com.au/autocomplete/address/Streetnumber?state=NSW&postcode=2060&suburb=North%20Sydney&street=Arthur%20St&streetNumber=1&as=json

5.7.3.2. Response

{"Result":["100","122","132","140","146"]}

5.7.4. Example 2

5.7.4.1. Request

Get the street numbers of Epping Road in North Ryde in NSW with postcode 2113. Limit the response elements to 20 and provide the data in XML data format:

http://services.inivio.com.au/autocomplete/address/streetnumber?state=NSW&postcode=2113&suburb=north%20ryde&street=epping%20rd&limit=20&as=xml

5.7.4.2. Response

<GeoResultOfArrayOfstring xmlns="http://schemas.datacontract.org/2004/07/Common" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Result xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a:string>12</a:string>
                <a:string>14</a:string>
                <a:string>16-18</a:string>
                <a:string>20</a:string>
                <a:string>22</a:string>
                <a:string>24</a:string>
                <a:string>26</a:string>
                <a:string>28</a:string>
                <a:string>30</a:string>
                <a:string>34</a:string>
                <a:string>36</a:string>
                <a:string>38</a:string>
                <a:string>40</a:string>
                <a:string>42</a:string>
                <a:string>44</a:string>
                <a:string>46</a:string>
                <a:string>48</a:string>
                <a:string>50</a:string>
                <a:string>52</a:string>
                <a:string>54</a:string>
        </Result>
</GeoResultOfArrayOfstringuHEDJ7Dj>

5.8. Unit

Returns unit numbers in a given state and postcode and suburb and street and street number which begin with the values of the fields in the URL query string

5.8.1. API URL Endpoint and URL Format

http://services.inivio.com.au/autocomplete/address/unit?query_string where the query string is composed of a series of field-value pairs field1=value1&field2=value2&field3=value3

5.8.2. Query String Fields and Values

Query String fields Values Type Notes
state Australian State Abbreviations Mandatory Field NSW, ACT, NT, QLD, SA, TAS, VIC, WA
postcode Australian postcode in full or part of it Mandatory Field  
suburb Suburb name in full Mandatory Field  
street Street name Mandatory Field  
streetNumber Street number Mandatory Field  
unit Unit number Optional field  
limit Integer Optional field Default to 15
as XML or JSON Optional field Default is JSON

Note

If no limit is set, then the default limit returned is 15

5.8.3. Example 1

5.8.3.1. Request

Get the unit numbers starting with 1 in the specified location provided in the state,postcode,suburb, street and street number:

http://services.inivio.com.au/autocomplete/address/Unit?state=NSW&postcode=2145&suburb=Westmead&street=Lydbrook+St&streetNumber=39-45&unit=1&as=xml

5.8.3.2. Response

<ResultOfArrayOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Result xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a:string>1</a:string>
                <a:string>10</a:string>
                <a:string>11</a:string>
                <a:string>12</a:string>
                <a:string>13</a:string>
                <a:string>14</a:string>
                <a:string>15</a:string>
                <a:string>16</a:string>
                <a:string>17</a:string>
                <a:string>18</a:string>
                <a:string>19</a:string>
        </Result>
</ResultOfArrayOfstring>