Sign in to see the examples with your own API key.
NZ Get
Resolves an NZ Autocomplete suggestion 'Id' to the full New Zealand address. Part of the New Zealand addresses add-on: without it switched on the request is refused with 403.
Request
GET https://api.getaddress.io/nz/get/{id}?api-key={your-api-key}
Example
Resolving the suggestion for '12 Queen Street, Auckland Central, Auckland 1010'.
GET https://api.getaddress.io/nz/get/1131927?api-key={your-api-key}
Response
{
"id": "1131927",
"address_id": "1131927",
"address_label": "12 Queen Street, Auckland Central, Auckland 1010",
"country": "NZ",
"unit": "",
"number_first": "12",
"number_last": "",
"number_suffix": "",
"full_road_name": "Queen Street",
"locality_name": "Auckland Central",
"town_city": "Auckland",
"territorial_authority": "Auckland",
"postcode": "1010",
"postcode_source": "road",
"postcode_official": false,
"coordinates": {
"latitude": -36.8440749667,
"longitude": 174.7672206667
}
}
Response Fields
| Field | Description |
|---|---|
| id / address_id | LINZ's own identifier for the address. The same value under both names. |
| address_label | The address on one line with the postcode last, the same text the suggestion showed. |
| country | Always "NZ". |
| unit | The unit, flat or suite, e.g. "2" or "G04". Empty when the address has none. |
| number_first / number_last / number_suffix | The street number, the last of a range ("48-56" gives "48" and "56"), and a letter after the number ("12A" gives "A"). Empty when there is none. |
| full_road_name | The road's full name, e.g. "Queen Street". |
| locality_name | The suburb or locality, e.g. "Auckland Central". |
| town_city | The town or city. Empty for some rural addresses. |
| territorial_authority | The district or city council, e.g. "Wellington City". |
| postcode | The 4-digit postcode, with its leading zero (Northland's start with 0). Empty when none could be given. |
| postcode_source |
How the postcode was found: road (every address on the road shares it),
suburb (single) or suburb (majority) (from the suburb), corrected or
corrected (road) (fixed by hand), or none.
|
| postcode_official |
true only for a postcode from NZ Post's own data. Today every postcode comes from the
open_nz_postcodes project (CC0), not NZ Post, so it is false, and about 5 in 100 may be wrong. Confirm the postcode
with your customer where it matters.
|
| coordinates | The address point (NZGD2000), as latitude and longitude. Null when the address carries none. |
Usage
- Each successful NZ Get request counts as 1 look-up against your plan's daily allowance, the same allowance as Australian look-ups.
- An id that is not a New Zealand address returns 404 and costs nothing.
- A domain token works in place of your API key.
Rate Limiting
Your subscription's plan will limit the number of requests per 5 minute span. Exceeding your plan's rate limit will return a HTTP 429 response.
The Retry-After HTTP header contains the number of seconds until a successful retry can be made.