Skip to main content

Address Metadata API

The Address Metadata API is used to collect the metadata associated with an address selected from the Address Autocomplete API

Endpoint

New Zealand

https://api.addressfinder.io/api/nz/address/metadata

Parameters

ParameterDefaultDescriptionTest Value
key

Your unique licence key (find on Portal credentials)

Required string

secret

Your unique secret key (find on Portal credentials). This is required when calling API endpoints without a referer.

Optional string

formatjson

The required format of the response.

Optional string

pxid

Unique address identifier obtained from the NZ Address Autocomplete or NZ Address Bounding Box APIs.

You must supply either a pxid or dpid field.

Optional string

dpid

Unique reference number assigned to a delivery address by NZ Post.

You must supply either a pxid or dpid field.

Optional string

census2018

Desired data source for Statistics NZ metadata.

Optional integer

domain

Used to identify which of your services is calling the API for activity monitoring purposes. This domain needs to be registered in the portal.

Optional string

ascii

Set to 1 to reformat special characters like macrons and other accents characters with their ASCII equivalent (e.g. Pōneke and Café will be returned as Poneke and Cafe).

Optional string

Responses

200 The API response will contain a hash with an element named completions, which is an array of hashes.

NameTypeDescriptionExample
astringCanonical address as supplied by Land Information New Zealand or NZ Post.Unit 2, 1703A State Highway 1, Warkworth 0983
postalstringAssociated postal address when supplied by NZ Post. Field will be omitted if this address is not delivered to by NZ Post.Unit 2, 1703A State Highway 1, RD 3, Warkworth 0983
building_namestringHolds the building or property name.Miban Building
unit_typestringDescribes the category of a sub-dwelling.Flat
unit_identifierstringIdentifies a specific sub dwelling. Can be alpha, number or a combination.1
floorstringThe level number and level type in a multi-story building.Level 19
numberstringThe street number of the address. Also populated with the box number for PO Box type addresses.1703
alphastringHolds the alpha component of a street number. In the address 1B High Street, B is the alpha.B
streetstringHolds the full name of the street. Note The street attribute also includes the Street Type.State Highway 1
street_namestringHolds the name of the street.Queen
street_typestringThe type of street.Avenue
suburbstringThe suburb or locality of the address as assigned by Land Information New Zealand.Warkworth
citystringThe city, town or locality name as assigned by Land Information New Zealand.Warkworth
box_typestringThe type of PO Box/CMB/Private Bag/Counter Delivery.PO Box
lobby_namestringThe name of the NZ Post outlet or Agency outlet where the PO Box, Private Bag or Counter Delivery is located.Fendalton
rd_numberstringThe rural delivery number assigned by NZ Post to a rural address.4
post_suburbstringName of the suburb when supplied by NZ Post.Manukau
mailtownstringName of the town/city when supplied by NZ Post.Warkworth
postcodestringHolds the four digit postcode.0983
dpidstringA unique reference number assigned to each delivery address by NZ Post.2668726
primary_parcel_idstringThe unique identifier of the portion of land associated with the selected address.3866475
aims_address_idstringThe unique identifier from Land Information New Zealand (LINZ).1518959
xstringLongitude coordinate (in WGS84 format).174.643199
ystringLatitude coordinate (in WGS84 format).-36.426956
meshblockstringThe meshblock identifier for the requested census dataset (see census parameter). If not specified, the meshblock returned is from the 2018 census.146004
sa1_idstringStatistical area 1 (2018 census only)7000001
sa2_idstringStatistical area 2 ID (2018 census only)100200
sa2stringStatistical area 2 name (2018 census only)Rangaunu Harbour
ruralbooleanAn indicator to help determine if this address is located in a rural setting. Note Different courier companies have different rural/urban boundaries so this determination should be confirmed by your delivery agent.true
urstringUrban rural name (2018 census only)Kaimaumau
ur_idstringUrban rural ID (2018 census only)1002
iurstringUrban rural indicator name (2018 census only)Rural settlement
iur_idstringUrban rural indicator ID (2018 census only)21
aims_road_section_idstringThe unique road section identifier from Land Information New Zealand (LINZ).323309
regionstringThe Regional Authority in which this address exists. Note Regional Authorities are the top tier of local government in New Zealand.Auckland Region
region_idstringRegion ID (2018 census only)4
tastringThe Territorial Authority in which this address exists. Territorial authorities are the second tier of local government in New Zealand.Auckland
ta_idstringTerritorial Authority ID (2018 census only)48
constringConstituency name (2018 census only)Te Hiku Constituency
con_idstringConstituency ID (2018 census only)65
maoriconstringMaori Constituency name (2018 census only)Okurei Maori Constituency
maoricon_idstringMaori Constituency ID (2018 census only)258
wardstringWard name (2018 census only)Banks Peninsula Ward
ward_idstringWard ID (2018 census only)3086
cbstringCommunity Board name (2018 census only)Te Hiku Community
cb_idstringCommunity Board ID (2018 census only)65
tasubstringTerritorial Authority Subdivision name (2018 census only)Akaroa Subdivision
tasub_idstringTerritorial Authority Subdivision ID (2018 census only)06019
landwaterstringLand/Water description (2018 census only)Inlet
landwater_idstringLand/Water ID (2018 census only)22
address_line_1stringFirst line of the non-suburb/city/postcode portion of the addressUnit 2
address_line_2stringSecond line of the non-suburb/city/postcode portion of the address.1703A State Highway 1
pxidstringUnique address identifier.3-.1.1d.2.42.1T.2
successbooleanIndicates if the request was successful or not.true

400 Bad request

NameTypeDescriptionExample
completionsarrayAn empty array will be returned due to the error-
error_codestringA unique numerical value identifying the error that occured1004
messagestringAn informative message describing the error that occuredSecret not provided
successbooleanIndicates if the request was successful or notfalse

See API Error Reference for details.