This page contains the technical API information for our Address Autocomplete. Please visit our address autocomplete page if you are looking to learn more about the service
This API is used to power the autocomplete capability of the Addressfinder widget. It can also be used to power your own custom autocomplete functionality, such as in a mobile or desktop app. If you want to call this API from a web browser, there are some special guidelines that you will need to follow.
Response Specification
The API response will contain a hash with an element named completions
, which is an array of hashes containing the following fields.
Field Name | Type | Description | Example |
---|---|---|---|
a
|
String | Canonical address as supplied by Land Information New Zealand or NZ Post. | 184 Williams Street, Kaiapoi 7630 |
pxid
|
String | The unique address identifier. | 2-.3.1q.2.4G.4c |
v
|
Integer | This is a deprecated field and is only retained for backwards compatibility reasons. You should ignore this field. | 0 |
highlighted_a
|
String | When highlighting is enabled, contains the full address string with highlighted matching terms. | <span class='af_hl'>184</span> <span class='af_hl'>Will</span>iams Street, Kaiapoi 7630 |
success
|
Boolean | Indicates if the request was successful or not. | true |
Errors
Below are the possible errors that can be returned by the API.
- Validation error (1000)
- Key not found (1001)
- Key not provided (1002)
- Domain not registered with Addressfinder (1003)
- Secret not provided (1004)
- Direct API calls are not permitted on your current plan. (1005)
- Invalid credentials (1006)
- Secret should not be supplied (1008)
- The address autocomplete feature is unavailable as it has exceeded the number of free lookups. Please contact the website owner (1009)
- The record you are trying to load does not exist (1011)
- Domain parameter must not be included in a web request (1015)
- This domain has been blocked (1016)
- This service is not enabled on your current plan (1017)
- Your IP address has been blocked for these credentials (1018)
- HTTP Referer or Origin header record must be present when making a browser initiated request (1019)
- Your Addressfinder trial has ended (1020)
- Your Addressfinder trial has exceeded its allowed lookups (1021)
- Postal addresses are not enabled on your current plan (1022)
- Your Addressfinder plan is paused (1023)