PHPackages                             digitalpianism/nzpost-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. digitalpianism/nzpost-client

ActiveLibrary[API Development](/categories/api)

digitalpianism/nzpost-client
============================

NZ Post API client

0.1.10(4y ago)0271MITPHPPHP &gt;=5.3.0

Since May 5Pushed 4y agoCompare

[ Source](https://github.com/digitalpianism/nzpost-client)[ Packagist](https://packagist.org/packages/digitalpianism/nzpost-client)[ RSS](/packages/digitalpianism-nzpost-client/feed)WikiDiscussions stable Synced today

READMEChangelogDependencies (3)Versions (11)Used By (0)

NZ Post Address Checker API client
==================================

[](#nz-post-address-checker-api-client)

This API client can help you to operate with NZ Post Address Checker API. You can use any PSR-16 Simple Cache with it to save your money on look ups number.

Installation
------------

[](#installation)

`composer require digitalpianism/nzpost-client`

Examples
--------

[](#examples)

The Address Checker API allows you to autocomplete and check New Zealand addresses and postcodes. It can be used within web forms or mobile apps. It’s backed by New Zealand Post’s National Postal Address Database (NPAD).

Firstly you have to get registered account And create new application there to get API credentials.

### Auth and get the client instance

[](#auth-and-get-the-client-instance)

```
use DigitalPianism\NzPostClient\NzPostClient;

$clientID = 'NZPOST_CLIENT_ID';
$secret = 'NZPOST_CLIENT_SECRET';

$Client = new NzPostClient($clientID, $secret);
```

### Auth and get the client instance with PSR-16 Simple Cache

[](#auth-and-get-the-client-instance-with-psr-16-simple-cache)

```
use Symfony\Component\Cache\Simple\FilesystemCache;
use DigitalPianism\NzPostClient\NzPostClient;

$cache = new FilesystemCache();
$ttl = 31536000; // One year cache TTL

$clientID = 'NZPOST_CLIENT_ID';
$secret = 'NZPOST_CLIENT_SECRET';

$Client = new NzPostClient($clientID, $secret, $cache);
$Client->setTTL($ttl);
```

### Get suggested addresses

[](#get-suggested-addresses)

```
$query = '1 Queen street';
$suggestedAddresses = $Client->suggest($query);
```

### Find an address

[](#find-an-address)

```
$addressLines = [
    '1 Queen street',
    'CBD',
    'Auckland'
 ];
 $addresses = $Client->find($addressLines);
```

### Get address details by DPID

[](#get-address-details-by-dpid)

Making calls to the address details services requires passing a DPID. This can be found by calling either the find or suggest resources which return matches including DPID's.

```
$dpid='3111226';
$addressDetails = $Client->details($dpid);
```

### The suggest partial addresses.

[](#the-suggest-partial-addresses)

The suggest partial addresses service takes a partial address query and turns a list of partial address matches.

```
$query = 'queen';
$suggestedAddresses = $Client->suggestPartial($query);
```

### The partial address details service.

[](#the-partial-address-details-service)

The partial address details service takes a partial's unique\_id and returns detailed information about the matching partial address.

```
$uniqId = 82868;
$response = $Client->partialDetails($uniqId);
```

###  Health Score

24

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~143 days

Recently: every ~88 days

Total

10

Last Release

1585d ago

PHP version history (2 changes)v0.1.0PHP ^5.6.30

0.1.2PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2d6888fc36c85a550286ef35565f971d5cefea224ae49ea90ba0aa1966d5a90?d=identicon)[digitalpianism](/maintainers/digitalpianism)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/digitalpianism-nzpost-client/health.svg)

```
[![Health](https://phpackages.com/badges/digitalpianism-nzpost-client/health.svg)](https://phpackages.com/packages/digitalpianism-nzpost-client)
```

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69332.3M98](/packages/algolia-algoliasearch-client-php)[cebe/php-openapi

Read and write OpenAPI yaml/json files and make the content accessable in PHP objects.

49915.1M69](/packages/cebe-php-openapi)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5693.0M24](/packages/thecodingmachine-graphqlite)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k366.4k20](/packages/team-reflex-discord-php)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2302.2M23](/packages/php-opencloud-openstack)[php-tmdb/api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

432376.8k13](/packages/php-tmdb-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
