PHPackages                             pamekar/laravel-postnl-api - 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. pamekar/laravel-postnl-api

ActiveLibrary[API Development](/categories/api)

pamekar/laravel-postnl-api
==========================

Laravel PostNL API package

02.4k—5.8%PHP

Since Jun 19Pushed 2y agoCompare

[ Source](https://github.com/pamekar/laravel-postnl-api)[ Packagist](https://packagist.org/packages/pamekar/laravel-postnl-api)[ RSS](/packages/pamekar-laravel-postnl-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel PostNL API package
==========================

[](#laravel-postnl-api-package)

[![Latest Stable Version](https://camo.githubusercontent.com/46d33798424c37bbfab547853437a4dfabec443edf9358e6c52a902634ae678b/68747470733a2f2f706f7365722e707567782e6f72672f64656e697a74657a63616e2f6c61726176656c2d706f73746e6c2d6170692f762f737461626c65)](https://packagist.org/packages/deniztezcan/laravel-postnl-api)[![Total Downloads](https://camo.githubusercontent.com/193ce937c203ad521e15123de441e34909e4755fd056dd0deb6fa805f2e1d7fb/68747470733a2f2f706f7365722e707567782e6f72672f64656e697a74657a63616e2f6c61726176656c2d706f73746e6c2d6170692f646f776e6c6f616473)](https://packagist.org/packages/deniztezcan/laravel-postnl-api)[![Latest Unstable Version](https://camo.githubusercontent.com/35afed7541705e69a4db9e023170d0670e3862ef58b4a82d6b61098f1ed2a69a/68747470733a2f2f706f7365722e707567782e6f72672f64656e697a74657a63616e2f6c61726176656c2d706f73746e6c2d6170692f762f756e737461626c65)](https://packagist.org/packages/deniztezcan/laravel-postnl-api)[![License](https://camo.githubusercontent.com/4b42c1e5d582fad3aba21448f4194b7a1d161151348caaf9e51d5b0758fec98c/68747470733a2f2f706f7365722e707567782e6f72672f64656e697a74657a63616e2f6c61726176656c2d706f73746e6c2d6170692f6c6963656e7365)](https://packagist.org/packages/deniztezcan/laravel-postnl-api)[![StyleCI](https://camo.githubusercontent.com/3651f73c92271fbc4b582d49d83bb84a78ab6dd3cdf115bc802b1c5886816658/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3231323736373331372f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/212767317/shield?branch=master)

Intergrates the PostNL API with Laravel 5 &amp; 6 via a ServiceProvider and Facade.

### Instalation

[](#instalation)

```
composer require deniztezcan/laravel-postnl-api

```

Add a ServiceProvider to your providers array in `config/app.php`:

```
    'providers' => [
    	//other things here

    	DenizTezcan\LaravelPostNLAPI\PostNLAPIServiceProvider::class,
    ];
```

Add the facade to the facades array:

```
    'aliases' => [
    	//other things here

    	'PostNLAPI' => DenizTezcan\LaravelPostNLAPI\Facades\PostNLAPI::class,
    ];
```

Finally, publish the configuration files:

```
php artisan vendor:publish --provider="DenizTezcan\LaravelPostNLAPI\PostNLAPIServiceProvider"

```

### Configuration

[](#configuration)

Please set your API: `url`, `key` and Customer `code`, `number`, `location`, `email` and `address` in the `config/postnlapi.php`

### Usage

[](#usage)

To generate a `barcode` you can use the following call. To find which `type` and `serie` to use please check [PostNL documentation](https://developer.postnl.nl/browse-apis/send-and-track/barcode-webservice/documentation-soap/)

```
$barcode = PostNLAPI::generateBarcode('3S', '00000000000-99999999999');
```

To generate a `label` you can use the following call. To find which `PrinterType`, `AddressType` and `ProductCodeDelivery` to use please check [PostNL documentation](https://developer.postnl.nl/browse-apis/send-and-track/labelling-webservice/documentation/)

```
use DenizTezcan\LaravelPostNLAPI\Entities\{Address, Contact};

$label = PostNLAPI::generateLabel(
	$barcode,
	'GraphicFile|PDF',
	[Address::create([
        'AddressType' 	=> '01',
        'City'        	=> "Testdorp",
        'CompanyName' 	=> "Crusty Crab BV",
        'Countrycode' 	=> "NL",
        'HouseNr'     	=> "1",
        'Street'      	=> "Teststraat",
        'Zipcode'     	=> "1111AA",
        'FirstName'	  	=> "Meneer",
        'Name'	 	  	=> "Krabs"
    ]),
    Address::create([
        'AddressType'   => '09',
        'City'          => "Testdorp",
        'CompanyName'   => "Crusty Crab BV",
        'Countrycode'   => "NL",
        'HouseNr'       => "1",
        'Street'        => "Teststraat",
        'Zipcode'       => "1111AA",
        'FirstName'     => "Meneer",
        'Name'          => "Krabs"
    ])],
    [Contact::create([
    	'ContactType'	=> "01",
    	'Email'			=> 'test@meneer.nl',
    	'SMSNr'			=> '061111111',
    	'TelNr'			=> '061111111'
    ])],
    '01',
    '3085',
    'This is a reference',
    'This is a remark'
);
```

***Note:*** Watch the Array which needs to be passed in the second and third parameter! Without this it will simply not work!

To get an array of the nearest PostNL locations you can use the following call. You have to pass the `CountryCode` and `PostalCode` as parameters.

```
$locations = PostNLAPI::nearestLocations('NL', '1111AA');
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 79.6% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24904288?v=4)[Victor Ndu](/maintainers/pamekar)[@pamekar](https://github.com/pamekar)

---

Top Contributors

[![deniztezcan](https://avatars.githubusercontent.com/u/10155092?v=4)](https://github.com/deniztezcan "deniztezcan (39 commits)")[![pamekar](https://avatars.githubusercontent.com/u/24904288?v=4)](https://github.com/pamekar "pamekar (8 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")

### Embed Badge

![Health badge](/badges/pamekar-laravel-postnl-api/health.svg)

```
[![Health](https://phpackages.com/badges/pamekar-laravel-postnl-api/health.svg)](https://phpackages.com/packages/pamekar-laravel-postnl-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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