https://github.com/saintsweeto/nz-post
A PHP wrapper for NZ Post API
https://github.com/saintsweeto/nz-post
nz-post php-wrapper
Last synced: 6 days ago
JSON representation
A PHP wrapper for NZ Post API
- Host: GitHub
- URL: https://github.com/saintsweeto/nz-post
- Owner: saintsweeto
- License: mit
- Created: 2020-09-06T23:10:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-07T06:38:49.000Z (over 5 years ago)
- Last Synced: 2025-08-19T11:02:03.553Z (5 months ago)
- Topics: nz-post, php-wrapper
- Language: PHP
- Homepage: https://www.nzpost.co.nz
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NZ Post
A PHP wrapper for NZ Post API
## ParcelAddress API
[API specification summary](https://anypoint.mulesoft.com/exchange/portals/nz-post-group/b8271f09-2ad8-4e1c-b6b1-322c5727d148/parceladdress-api/minor/1.0/console/summary/)
#### Initialization
```
$parcel = new ParcelAddress(CLIENT_ID, CLIENT_SECRET);
```
#### Search for address
Returns a list of suggested domestic addresses for an address fragment.
```
$parcel->searchForAddress(address, count);
```
#### Get address detail by address id
Returns the detailed information for a single domestic address identifier.
```
$parcel->getAddressByAddressId(address_id');
```
#### Get address detail by dpid
Returns the detailed information for a single dpid.
```
$parcel->getAddressByDpid(dpid);
```
#### Domestic suburbs suggestion
Returns a list of suggested domestic suburbs for a suburb fragment.
```
$parcel->searchForSuburbs(address, count);
```
#### Collection locations
Returns a list of parcel collection points nearest to the coordinates provided.
```
$parcel->getCollectionLocations(lat, long, count);
```
#### Search for international address
Returns a list of suggested addresses for a given country code and address fragment.
```
$parcel->searchForInternationalAddress(address, country_code, count);
```
#### Get international address detail
Returns the detailed information for a single international address identifier.
```
$parcel->getInternationalAddress(address_id);
```
#### Australian address lookup
This resource is intended to be used in conjunction with the Get International Address Detail resource.
```
$parcel->getAustralianAddress(address_id);
```