PHPackages                             dshumkov/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. dshumkov/nzpost-client

ActiveLibrary[API Development](/categories/api)

dshumkov/nzpost-client
======================

NZ Post API client

v0.1.1(8y ago)2334MITPHPPHP ^5.6.30

Since May 5Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (3)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 dshumkov/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 DShumkov\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 DShumkov\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

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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 ~0 days

Total

2

Last Release

2977d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3907801?v=4)[Dmitry Shumkov](/maintainers/DShumkov)[@DShumkov](https://github.com/DShumkov)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69734.4M144](/packages/algolia-algoliasearch-client-php)[thecodingmachine/graphqlite

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

5733.2M40](/packages/thecodingmachine-graphqlite)[team-reflex/discord-php

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

1.1k406.5k25](/packages/team-reflex-discord-php)[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.

427382.4k17](/packages/php-tmdb-api)[n1ebieski/ksef-php-client

PHP API client that allows you to interact with the API Krajowego Systemu e-Faktur

8754.6k](/packages/n1ebieski-ksef-php-client)[wtfzdotnet/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.

4262.9k](/packages/wtfzdotnet-php-tmdb-api)

PHPackages © 2026

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