A PHP SDK for the PostNord API.
Open a command console, enter your project directory and execute the following command to download the latest stable version of this library:
composer require setono/post-nord-php-sdk
Here is an example showing you can get the nearest service points.
use Setono\PostNord\Client\Client;
use Setono\PostNord\Request\Query\ServicePoints\NearestByAddressQuery;
require_once __DIR__ . '/../vendor/autoload.php';
$client = new Client('b09ff56c6a0344768d5afaaec595b2fb');
$servicePoints = $client->servicePoints()->getNearestByAddress(NearestByAddressQuery::create(
'Street name',
'Street number',
'Postal code',
'City',
'Country code',
numberOfServicePoints: 10,
));
- There is a Symfony bundle integrating this library: Symfony Post Nord Bundle