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

ActiveLibrary[API Development](/categories/api)

deniztezcan/laravel-postnl-api
==============================

Laravel PostNL API package

1.2.3(2y ago)33243[1 issues](https://github.com/deniztezcan/laravel-postnl-api/issues)MITPHPCI failing

Since Oct 11Pushed 1y ago2 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (16)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

33

—

LowBetter than 72% of packages

Maintenance21

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 95.1% 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.

###  Release Activity

Cadence

Every ~148 days

Recently: every ~116 days

Total

13

Last Release

681d ago

Major Versions

0.2.4 → 1.0.12022-07-28

1.2.3 → v4.x-dev2024-08-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10155092?v=4)[Deniz Tezcan](/maintainers/deniztezcan)[@deniztezcan](https://github.com/deniztezcan)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M984](/packages/statamic-cms)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[smodav/mpesa

M-Pesa API implementation

16467.9k1](/packages/smodav-mpesa)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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