aotearoait / nzpost-search
A PHP wrapper for NZ Post API
dev-main
2021-02-24 02:39 UTC
Requires
- guzzlehttp/guzzle: ^7.0
- symfony/cache: ^5.1
This package is auto-updated.
Last update: 2024-10-24 10:49:23 UTC
README
A PHP wrapper for NZ Post API
ParcelAddress API
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);