Addressfinder

The best way to find exact addresses in New Zealand

  • Skip to Main Navigation
  • Skip to Footer Sitemap
  • Skip to Top
  • About
    • About Us
    • Case Studies
    • FAQ
    • Partners
    • Blog
    • Contact Us
  • Pricing
  • Industries
    • E-commerce
      Collect verified delivery addresses
    • Finance
      Verified address data for KYC and AML
    • Utilities
      Make network connections faster
  • Features
    • Autocomplete
      Search addresses and locations as you type
    • Bulk Cleansing
      Verify a database of addresses
    • Email Verification
      Collect only valid email addresses
    • Geocode Addresses
      Collect addresses and GPS coordinates together
    • Address Metadata
      Get extra data about addresses
    • MORE FEATURES
  • Address Verification
    • Integration Guide
    • Javascript Reference
    • Code Examples
    • API Reference
    • Code Generator
    • International Integration
  • Email Verification
    • Integration Guide
    • Javascript Reference
    • Code Examples
    • API Reference
  • About
    • About Us
    • Case Studies
    • Frequently Asked Questions
    • Partners
    • Blog
    • Contact Us
  • Pricing
  • Industries
    • E-commerce
      Collect verified delivery addresses
    • Finance
      Verified address data for KYC and AML
    • Utilities
      Make network connections faster
  • Features
    • Autocomplete
      Search addresses and locations as you type
    • Bulk Cleansing
      Verify a database of addresses
    • Email Verification
      Collect only valid email addresses
    • Geocode Addresses
      Collect addresses and GPS coordinates together
    • Address Metadata
      Get extra data about addresses
    • MORE FEATURES
  • Documentation
    • Integrations
      • Magento
      • WooCommerce
      • Hubspot
      • Salesforce
      • Shopify Plus
      See all integrations
    • Address Verification
      • Integration Guide
      • Javascript Reference
      • Code Examples
      • API Reference
      • Code Generator
      • International Integration
    • Email Verification
      • Integration Guide
      • Javascript Reference
      • Code Examples
      • API Reference
  • Login

JavaScript Widget: best practices

Many registration forms need to capture an address from the customer. Often the address captured is the customer’s home address or a delivery address.

The typical registration form will ask the customer for their address in a format such as:

  • Address Line 1
  • Address Line 2
  • Suburb
  • City
  • Postcode

Adding Addressfinder

There are two main approaches to applying Addressfinder to your registration forms. You can either add the JavaScript Widget to an existing unmodified form, or you can choose to adjust your form to take advantage of Addressfinder’s capabilities. We suggest the second option. Examples of form integration can be found on the demos page.

Adding the JavaScript Widget to an existing form

You can attach the widget to the Address Line 1 field (in the example above), and configure it to automatically populate the existing address form fields when the user selects an address.

Optimising a form to use the JavaScript Widget

When you add Addressfinder to your registration form, we suggest that you reduce the number of fields captured to just a single address line. When the user selects an address, all of the address components will remain within the one address field.

Depending on your requirements, you will probably want some or all of the individual address elements. You should store these in hidden form fields.

Capturing address data

As described above, we suggest that you display the selected address on a single line, but store the individual address elements separately in hidden fields.

Hiding these fields from the user will reduce the size of your form, which may lead to a higher conversion rate. In addition, hiding these fields will reduce the opportunity for the user to tamper or adjust them.

Have a look at the response documentation on the address elements returned. We suggest you store everything, so as to future proof yourselves against any future requirements.

Capturing address meta data

As well as the address elements, we also make available additional meta data about the address. We provide the following meta data for most addresses:

  • GPS coordinates (latitude and longitude)
  • Meshblock identifier
  • New Zealand Post Delivery Point Identifier
  • Territorial Authority [https://en.wikipedia.org/wiki/Territorial_authorities_of_New_Zealand]
  • Region [https://en.wikipedia.org/wiki/Regions_of_New_Zealand]

At a minimum, we suggest that you capture the GPS coordinates.

Filtering the address autocomplete

By default, the JavaScript widget will return results of all available address types. It is likely that you will only need a subset of these results.

For example, if you are asking your user to select their billing address, you probably want deliverable addresses only. Alternatively, you may want exclude PO Boxes when selecting a delivery address.

You should consult the Addressfinder API documentation for the list of filtering options, and the JavaScript demos for examples of how to apply these parameters in the widget.

Storing the SOA address

Some organisations take advantage of New Zealand Post’s offer to reduce postage rates for accurate addresses. The rates are reduced when the organisation’s address database has a very high match rate with New Zealand Post’s PAF database.

Addressfinder uses the PAF database as part of our dataset, and returns the exact PAF-compatible address data in our result set. Our response documentation contains further detail on these fields (postal_ prefixed fields).

Handling missing addresses

Sometimes an address will appear to be missing from Addressfinder. Our data comes from authoritative sources such as New Zealand Post, Land Information New Zealand, Statistics New Zealand and others. These data sets are occasionally out of sync with reality for a number of reasons - for example, delayed notification of new subdivisions. Or unofficial “grey addresses” that should really be submitted to New Zealand Post.

In cases like this, it makes sense to allow your users to provide their address in a manual manner. We suggest adding a link such as “Enter your address manually” which displays a set of hidden address fields when clicked.

Handling failure

Addressfinder is a very stable platform with an impressive uptime. Our infrastructure has multi-site redundancy and handles failure well.

But, no service can ever be 100% reliable, and occasionally there may be a problem.

We suggest that you allow users an option to manually enter an address for when Addressfinder is unavailable. You could use the approach suggested above.

More information

Our Addressfinder knowledge base has further information about how to use Addressfinder on your website. We are happy to help, so please click the Help button on the bottom right corner of this page to contact support at your leisure.

  • Address Verification
    • Integration guide
    • Javascript reference
    • Code examples
    • Widget code generator
    • Best practices
    • Fixing browser quirks
    • Advanced usage
    • Can't find your address?
    • Integration guide (Int'l)
  • Email Verification
    • Integration guide
    • Javascript reference
    • Code examples
    • Advanced usage
    • API reference
  • API Documentation (NZ)
    • Address Autocomplete
    • Address Metadata
    • Address Verification
    • Address Reverse Geocode
    • Location Autocomplete
    • Location Metadata
    • Points of Interest Autocomplete
    • Points of Interest Metadata
    • API Errors
  • API Documentation (AU)
    • Address Autocomplete
    • Address Metadata
    • Address Verification
    • Location Autocomplete
    • Location Metadata
    • API Errors
  • API Documentation (INT'L)
    • Address Autocomplete
    • Address Metadata
  • Integrations
    • Magento
    • WooCommerce
    • BigCommerce
    • Salesforce
    • Shopify Plus
    • Hubspot
    • StoreConnect
    • Spiffy Stores
    • Ruby
    • iOS
    • Drupal
    • Microsoft Dynamics 365
    • Vue
    • Gravity Forms
    • React
Addressfinder logo
Addressfinder provides speedy, accurate and dependable address autocompletion at a fair price. Easily integrate our address finder software with your site to start enjoying our address verification, address autocomplete and other address services today.

Sitemap

  • About
  • About Us
  • Contact
  • Blog
  • FAQ
  • Pricing
  • Case Studies
  • Status Page
  • Privacy Policy
  • Terms & Conditions
  • Features
  • Address Autocomplete
  • Address Metadata
  • Bulk Address Cleansing
  • Address Geocoding
  • Email Address Verification
  • Reverse Address Lookup
  • Points of Interest
  • Street, Suburb & City Search
  • Postcode Finder
  • Address Verification
  • Integrations
  • WooCommerce
  • BigCommerce
  • Shopify Plus
  • Magento
  • Salesforce
  • Spiffy Stores
  • iOS
  • Ruby
  • HubSpot
  • StoreConnect
  • Drupal
  • Microsoft Dynamics 365
  • Vue
  • Gravity Forms
  • React
  • API Documentation
  • Address Autocomplete
  • Address Metadata
  • Address Verification
  • Email Verification
  • API Errors
  • AU APIs specs
  • International APIs
  • Widget Documentation
  • Integration Guide
  • Javascript Reference
  • Code Examples
  • Widget Code Generator
  • International Integration Guide
  • Email Integration Guide
Addressfinder is also available in Australia
Terms and Conditions | Privacy
Copyright © 2023 Addressfinder, New Zealand