PHPackages                             jacobdekeizer/statusweb-client - 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. jacobdekeizer/statusweb-client

ActiveLibrary[API Development](/categories/api)

jacobdekeizer/statusweb-client
==============================

Statusweb API client for PHP

v3.0.0(1mo ago)24721MITPHPPHP &gt;=8.5

Since Feb 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/jacobdekeizer/statusweb-client)[ Packagist](https://packagist.org/packages/jacobdekeizer/statusweb-client)[ Docs](https://github.com/jacobdekeizer/statusweb-client)[ RSS](/packages/jacobdekeizer-statusweb-client/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (12)Used By (0)

Statusweb API client for PHP
============================

[](#statusweb-api-client-for-php)

[![Packagist Version](https://camo.githubusercontent.com/bd4f4273ddd1aa6063f059365e3dfc3eea8def18d119f09ffd6d7910b719024d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a61636f6264656b65697a65722f7374617475737765622d636c69656e74)](https://packagist.org/packages/jacobdekeizer/statusweb-client)[![Packagist](https://camo.githubusercontent.com/7c5bdd78c61458c771af71538ca1f49718ddaa3b6f30460ca21a0ff40bfd0c66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a61636f6264656b65697a65722f7374617475737765622d636c69656e743f636f6c6f723d627269676874677265656e)](https://packagist.org/packages/jacobdekeizer/statusweb-client)[![Packagist](https://camo.githubusercontent.com/e5ae61b844b199d17ebbbf2eec5df08e57952f3db1ba9830a09d85f2aeb07483/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a61636f6264656b65697a65722f7374617475737765622d636c69656e743f636f6c6f723d627269676874677265656e)](https://packagist.org/packages/jacobdekeizer/statusweb-client)

Get your api keys from Statusweb &gt; Help &gt; Statusweb API. On this page you can also get the Statusweb API documentation.

Installation
------------

[](#installation)

You can install this package via composer:

```
composer require jacobdekeizer/statusweb-client

```

Usage
-----

[](#usage)

> This readme shows basic usage of this package, for all available options look at the class definitions and the api documentation.

Create the client

```
$client = (new \JacobDeKeizer\Statusweb\Client())
    ->setApiKey('api_key')
    ->setPassword('password');
```

### Create shipment

[](#create-shipment)

```
$deliveryAddress = new \JacobDeKeizer\Statusweb\Resources\Address(
    name: 'Gijs Boersma',
    street: 'Lange laan',
    houseNumber: '29A',
    postalCode: '9281EM',
    city: 'Zevenaar',
    countryCode: \JacobDeKeizer\Statusweb\Enums\CountryCode::NETHERLANDS,
    toTheAttentionOf: 'tav',
    phoneNumber: '+31612345678',
    email: 'noreply@example.com',
);

$labelData = new \JacobDeKeizer\Statusweb\Resources\LabelData(
    returnLabel: true, // return the pdf label in the response
    labelFormat: \JacobDeKeizer\Statusweb\Enums\LabelFormat::PDF,
);

$shipmentRow = new \JacobDeKeizer\Statusweb\Resources\ShipmentRow(
    amount: 1,
    unit: \JacobDeKeizer\Statusweb\Enums\Unit::COLLI,
    weight: 10,
);

$shipment = new \JacobDeKeizer\Statusweb\Resources\Shipment(
    deliveryAddress: $deliveryAddress,
    type: 1, // Statusweb -> Tabellen -> Zendingsoorten
    directSend: true, // when true the shipment is confirmed and can't be deleted
    labelData: $labelData,
    reference: 'My reference',
);

// setters remain available for optional values
$shipment->addShipmentRow($shipmentRow); // ->setShipmentRows accepts an array of ShipmentRows

$shipmentResponse = $client->shipments()->create($shipment);

// Show label pdf
$data = base64_decode($shipmentResponse->getLabels());
header('Content-Type: application/pdf');
echo $data;
```

### Delete shipment

[](#delete-shipment)

```
$deleteShipmentResponse = $client->shipments()->delete(12345678); // transportNumber
```

### Send shipments

[](#send-shipments)

> Sends all shipments where setDirectSend was false

```
$sendShipmentsResponse = $client->shipments()->send();
```

### Get shipment status

[](#get-shipment-status)

> This endpoint does only work if the shipment is in transport or has arrived.

```
$statusResponse = $client->shipments()->getStatus(12345678); // transportNumber
$statusResponse->getStatuses();
```

### All shipment statuses

[](#all-shipment-statuses)

> This endpoint does only work if the are any shipments in transport or that have arrived.

```
$statusResponse = $client->shipments()->getAllStatuses();
$statusResponse->getStatuses();
```

### Get statusweb status url

[](#get-statusweb-status-url)

> Get the statusweb status url -&gt; does only work when the shipment is in transport or has arrived

```
$statusLink = $client->shipments()->getStatusUrl(12345678); // transportNumber
```

### Get estimated time of arrival

[](#get-estimated-time-of-arrival)

> This endpoint does only work if the shipment is in transport or has arrived.

```
$etaResponse = $client->shipments()->getEstimatedTimeOfArrival(12345678); // transportNumber
```

### Get label

[](#get-label)

> This endpoint does only work if the shipment isn't confirmed by the send endpoint and directSend for the shipment was false

```
$labelResponse = $client->labels()->get(9207289743, \JacobDeKeizer\Statusweb\Enums\LabelFormat::PDF);
```

### Exceptions

[](#exceptions)

Each endpoint can throw a `StatuswebErrorResponse` or `StatuswebException`. The `StatuswebErrorResponse` contains the error code and message from statusweb. For example:

```
try {
    $statusLink = $client->shipments()->getStatusUrl(12345678);
} catch (\JacobDeKeizer\Statusweb\Exceptions\StatuswebErrorResponse $statuswebErrorResponse) {
    $hasLink = $statuswebErrorResponse->getCode() === \JacobDeKeizer\Statusweb\Enums\ResponseCode::NO_STATUS_URL_FOR_SHIPMENT;
} catch (\JacobDeKeizer\Statusweb\Exceptions\StatuswebException $statuswebException) {
    $originalException = $statuswebException->getPrevious(); // do something
}
```

Register your own session store implementation (Optional)
---------------------------------------------------------

[](#register-your-own-session-store-implementation-optional)

Statusweb session ids are valid for 2 hours. To reduce the amount of sessionId requests you can create your own SessionStore. By default the `JacobDeKeizer\Statusweb\Stores\DefaultSessionStore` is used.

```
use JacobDeKeizer\Statusweb\Contracts\SessionStore;
use JacobDeKeizer\Statusweb\Dto\Session;

class DatabaseSessionStore implements SessionStore
{
    public function put(string $apiKey, Session $session): void
    {
        // save in db
    }

    public function get(string $apiKey): ?Session
    {
        // retrieve from db
    }
}
```

```
$client->setSessionStore(new DatabaseSessionStore());
```

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance92

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

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

Recently: every ~582 days

Total

11

Last Release

41d ago

Major Versions

v0.1 → v1.02018-02-10

v1.3 → v2.0.02020-02-17

v2.x-dev → v3.x-dev2026-07-01

PHP version history (4 changes)v0.1PHP &gt;=5.3.0

v1.x-devPHP &gt;=7

v2.0.0PHP &gt;=7.2

v3.x-devPHP &gt;=8.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15017400?v=4)[jacobdekeizer](/maintainers/jacobdekeizer)[@jacobdekeizer](https://github.com/jacobdekeizer)

---

Top Contributors

[![jacobdekeizer](https://avatars.githubusercontent.com/u/15017400?v=4)](https://github.com/jacobdekeizer "jacobdekeizer (10 commits)")

---

Tags

phpapistatuswebbulstra

### Embed Badge

![Health badge](/badges/jacobdekeizer-statusweb-client/health.svg)

```
[![Health](https://phpackages.com/badges/jacobdekeizer-statusweb-client/health.svg)](https://phpackages.com/packages/jacobdekeizer-statusweb-client)
```

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

138114.7k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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