PHPackages                             dividebv/postnl - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. dividebv/postnl

ActiveLibrary[HTTP &amp; Networking](/categories/http)

dividebv/postnl
===============

Library to connect to PostNL's SOAP service called CIF

v2.0.2(4y ago)34349.7k—3.6%38[4 PRs](https://github.com/DivideBV/Postnl/pulls)GPL-2.0-or-laterPHPPHP &gt;=7.0

Since Jun 30Pushed 1y ago9 watchersCompare

[ Source](https://github.com/DivideBV/Postnl)[ Packagist](https://packagist.org/packages/dividebv/postnl)[ RSS](/packages/dividebv-postnl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (27)Used By (0)

PostNL CIF
==========

[](#postnl-cif)

[![Latest Stable Version](https://camo.githubusercontent.com/2650ad6241bbf6415c1eeea546ea909498d2d812efaae3c2f5e4f58c4ce4f2bb/68747470733a2f2f706f7365722e707567782e6f72672f64697669646562762f706f73746e6c2f762f737461626c65)](https://packagist.org/packages/dividebv/postnl)[![Total Downloads](https://camo.githubusercontent.com/1b2d12a51bd7c8e60a03465a32e5e46e6bab95ab3f39afaacaf009c6d8a83f11/68747470733a2f2f706f7365722e707567782e6f72672f64697669646562762f706f73746e6c2f646f776e6c6f616473)](https://packagist.org/packages/dividebv/postnl)[![Latest Unstable Version](https://camo.githubusercontent.com/fbd6cf4f5f7403f5e0db8c9912a774567b334a00f72dacb789ec8712a4318f85/68747470733a2f2f706f7365722e707567782e6f72672f64697669646562762f706f73746e6c2f762f756e737461626c65)](https://packagist.org/packages/dividebv/postnl)[![License](https://camo.githubusercontent.com/2e3dafd566fbae504b33fb1cfba8d29aa2d008fac3189ab302b8a343894c5e7a/68747470733a2f2f706f7365722e707567782e6f72672f64697669646562762f706f73746e6c2f6c6963656e7365)](https://packagist.org/packages/dividebv/postnl)

This is a library to interface with the SOAP services offered by [PostNL](http://postnl.nl/), called CIF.

New authorization
=================

[](#new-authorization)

Since version 2.0 of this library, the new authorization method (using tokens instead of username/password) is used.

Installation
============

[](#installation)

Install the latest version with

```
composer require dividebv/postnl
```

Implementation Status
=====================

[](#implementation-status)

This library is not complete. This table lists which services are implemented and which aren't. The list of existing services is taken from [PostNL's developer center](https://developer.postnl.nl/).

ServiceImplementedVersion**Addresses €**Adrescheck Nationaal✗N/AAdrescheck Basis Nationaal✗N/AAdrescheck Internationaal✗N/APersoon op Adrescheck Basis✗N/AGeo Adrescheck Nationaal✗N/A**Creditworthiness &amp; Business information €**Bedrijfscheck Nationaal✗N/AFraudepreventie Check Basis✗N/AIBANcheck Nationaal✗N/AKredietcheck Consument Basis✗N/AKredietcheck Consument Premium✗N/AKredietcheck Zakelijk✗N/A**Send &amp; Track**Barcode webservice✓1\_1Confirming webservice✓1\_9Labelling webservice✓2\_0Shippingstatus webservice✓1\_6**Delivery options**Deliverydate webservice✓2\_1Location webservice✓2\_1Timeframe webservice✓2\_0**Mail**Bulkmail webservice✗N/AExample
=======

[](#example)

```
use DivideBV\Postnl\Postnl;
use DivideBV\Postnl\ComplexTypes;

// Create client class using credentials received from PostNL.
$client = new Postnl(
    12345678,   // Customer number
    'ABCD',     // Customer code
    'Acme BV',  // Customer name
    'xxxxxxxx', // API key
    123456,     // Collection location
    'CD1234',   // Globalpack
    true        // Whether to use PostNL's sandbox environment.
);

/**
 * Jan Smit
 * Smit & Zonen
 * Hoofdstraat 1A
 * 1234 AB Heikant
 * The Netherlands
 */
$receiverAddress = ComplexTypes\Address::create()
    ->setAddressType('01')
    ->setFirstName('Jan')
    ->setName('Smit')
    ->setCompanyName('Smit & Zonen')
    ->setStreet('Hoofdstraat')
    ->setHouseNr('1')
    ->setHouseNrExt('A')
    ->setZipcode('1234AB')
    ->setCity('Heikant')
    ->setCountrycode('NL');

$senderAddress = ComplexTypes\Address::create()
    ->setAddressType('02')
    ->setFirstName('Robert')
    ->setName('Jansen')
    ->setCompanyName('Jansen & Janssen')
    ->setStreet('Hoofdstraat')
    ->setHouseNr('999')
    ->setHouseNrExt('B')
    ->setZipcode('1234AB')
    ->setCity('Heikant')
    ->setCountrycode('NL');

// Request a barcode from PostNL.
$barcode = $client->generateBarcodeByDestination($receiverAddress->getCountryCode());

// Create a shipment.
$shipment = ComplexTypes\Shipment::create()
    ->setAddresses(new ComplexTypes\ArrayOfAddress([
        $receiverAddress,
        $senderAddress,
    ]))
    ->setBarcode($barcode)
    ->setDimension(ComplexTypes\Dimension::create()
        ->setWeight(5000) // Weight in g
        ->setWidth(215)   // Width in mm
        ->setLength(305)  // Length in mm
        ->setHeight(280)  // Height in mm
    )
    ->setProductCodeDelivery('3085');

// Generate label and confirm shipment.
$result = $client->generateLabel($shipment);

// Save the label PDF locally.
$label = $result->getLabels()[0];
$file = new \SplFileObject("label.pdf", 'w');
$file->fwrite($label->getContent());
```

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 75.2% 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 ~100 days

Recently: every ~276 days

Total

24

Last Release

1676d ago

Major Versions

v0.11.0 → v1.0.02016-08-25

v1.2.1 → v2.0.0-beta12018-09-14

PHP version history (3 changes)v0.5.0PHP ^5.4

v0.6.0PHP 5.4 - 7

v2.0.1PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a98c556f433d1f4e611fc9c910cf4e1a32dda0211e7c1255100ddf227d3caa5?d=identicon)[ameenross](/maintainers/ameenross)

---

Top Contributors

[![ameenross](https://avatars.githubusercontent.com/u/859737?v=4)](https://github.com/ameenross "ameenross (109 commits)")[![Jomaanro](https://avatars.githubusercontent.com/u/5111622?v=4)](https://github.com/Jomaanro "Jomaanro (10 commits)")[![wvdongen](https://avatars.githubusercontent.com/u/1862615?v=4)](https://github.com/wvdongen "wvdongen (6 commits)")[![slokhorst](https://avatars.githubusercontent.com/u/8083666?v=4)](https://github.com/slokhorst "slokhorst (5 commits)")[![annuh](https://avatars.githubusercontent.com/u/2487949?v=4)](https://github.com/annuh "annuh (4 commits)")[![thijsbekke](https://avatars.githubusercontent.com/u/1152678?v=4)](https://github.com/thijsbekke "thijsbekke (3 commits)")[![JeroenBakker](https://avatars.githubusercontent.com/u/1167406?v=4)](https://github.com/JeroenBakker "JeroenBakker (2 commits)")[![MPaap](https://avatars.githubusercontent.com/u/10021557?v=4)](https://github.com/MPaap "MPaap (1 commits)")[![phamels](https://avatars.githubusercontent.com/u/8149258?v=4)](https://github.com/phamels "phamels (1 commits)")[![media253](https://avatars.githubusercontent.com/u/28750663?v=4)](https://github.com/media253 "media253 (1 commits)")[![stephan-cream](https://avatars.githubusercontent.com/u/12713337?v=4)](https://github.com/stephan-cream "stephan-cream (1 commits)")[![kim-dongit](https://avatars.githubusercontent.com/u/17615168?v=4)](https://github.com/kim-dongit "kim-dongit (1 commits)")[![digipact](https://avatars.githubusercontent.com/u/10134219?v=4)](https://github.com/digipact "digipact (1 commits)")

---

Tags

phppostnlpostnl-cifsoap-services

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dividebv-postnl/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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