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

AbandonedArchivedLibrary[API Development](/categories/api)

jacobdekeizer/redjepakketje-client
==================================

Red je Pakketje API client for PHP

v2.0.0(4y ago)415.1k2MITPHPPHP ^8.0

Since Dec 7Pushed 4y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (11)Used By (0)

Red je Pakketje api client
==========================

[](#red-je-pakketje-api-client)

[![Packagist Version](https://camo.githubusercontent.com/d09e6471dfaf2810a1d0a3714ec2e34bc44517ac8fb26909ae16a8d14558fafd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a61636f6264656b65697a65722f7265646a6570616b6b65746a652d636c69656e74)](https://packagist.org/packages/jacobdekeizer/redjepakketje-client)[![Packagist](https://camo.githubusercontent.com/a4bcf3692c40993e17409a19b8cee4258bebb78a8c0240de467e37632d4c8c41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a61636f6264656b65697a65722f7265646a6570616b6b65746a652d636c69656e74)](https://packagist.org/packages/jacobdekeizer/redjepakketje-client)[![Packagist](https://camo.githubusercontent.com/7fb52b3ffce1c9d584ff96feb00a717b8b52334188c421edc7da7e13d33fde8b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a61636f6264656b65697a65722f7265646a6570616b6b65746a652d636c69656e74)](https://packagist.org/packages/jacobdekeizer/redjepakketje-client)[![Packagist](https://camo.githubusercontent.com/97aaeb8619c236ee7e7533122e39e2f00872808c01bb3fff24cee851f5bec0a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a61636f6264656b65697a65722f7265646a6570616b6b65746a652d636c69656e74)](https://packagist.org/packages/jacobdekeizer/redjepakketje-client)[![Build](https://github.com/jacobdekeizer/redjepakketje-client/workflows/Build/badge.svg?branch=master)](https://github.com/jacobdekeizer/redjepakketje-client/workflows/Build/badge.svg?branch=master)

[Red je Pakketje API documentation](https://redjepakketje.docs.apiary.io)

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

[](#installation)

Get it with composer

```
composer require jacobdekeizer/redjepakketje-client

```

Usage
-----

[](#usage)

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

Create the client

```
$client = new \JacobDeKeizer\RedJePakketje\Client();

$client->setApiKey('api_key');
```

Shipments
---------

[](#shipments)

### List shipments

[](#list-shipments)

```
$shipmentsList = $client->shipments()->all(
    new \JacobDeKeizer\RedJePakketje\Parameters\Shipments\All() // optional
);
```

### List recently created shipments

[](#list-recently-created-shipments)

Retrieves shipments from the last 7 days.

```
$shipmentsList = $client->shipments()->allRecentlyCreated();
```

### Get shipment

[](#get-shipment)

```
$shipment = $client->shipments()->get('tracking_code');

// for example check the shipment status
$isDelivered = $shipment->getStatus() === \JacobDeKeizer\RedJePakketje\Models\Shipment\Enums\ShipmentStatus::DELIVERED;
```

### Create shipment

[](#create-shipment)

```
$shipment = (new \JacobDeKeizer\RedJePakketje\Models\Shipment\CreateShipment())
    ->setCompanyName('Boeren BV')
    ->setName('Gijs Boersma')
    ->setStreet('Lange laan')
    ->setHouseNumber(29)
    ->setHouseNumberExtension('a')
    ->setZipcode('9281EM')
    ->setCity('Zevenaar')
    ->setTelephone('0602938172')
    ->setEmail('noreply@example.com')
    ->setNote('Some note')
    ->setDeliveryDate(date('Y-m-d'))
    ->setProduct(\JacobDeKeizer\RedJePakketje\Models\Shipment\Enums\ShipmentProduct::SAME_DAY_PARCEL_STANDARD)
    ->setReference('reference')
    ->setNote('my_note')
    ->setSender('sender_uuid');

// optionally set product options
$shipment->setProductOptions(
    (new \JacobDeKeizer\RedJePakketje\Models\Shipment\ProductOption())
        ->setOption(\JacobDeKeizer\RedJePakketje\Models\Shipment\ProductOption::OPTION_ALLOW_NEIGHBOURS)
        ->setValue(true),
    (new \JacobDeKeizer\RedJePakketje\Models\Shipment\ProductOption())
        ->setOption(\JacobDeKeizer\RedJePakketje\Models\Shipment\ProductOption::OPTION_REQUIRE_SIGNATURE)
        ->setValue(false),
    (new \JacobDeKeizer\RedJePakketje\Models\Shipment\ProductOption())
        ->setOption(\JacobDeKeizer\RedJePakketje\Models\Shipment\ProductOption::OPTION_AGE_CHECK_18)
        ->setValue(false),
    (new \JacobDeKeizer\RedJePakketje\Models\Shipment\ProductOption())
        ->setOption(\JacobDeKeizer\RedJePakketje\Models\Shipment\ProductOption::OPTION_ALLOW_NEIGHBOURS)
        ->setValue(true)
        ->setMaxAttempts(2)
);

$shipmentResponse = $client->shipments()->create(
    $shipment,
    new \JacobDeKeizer\RedJePakketje\Parameters\Shipments\Create() // optional
);

$label = $shipmentResponse->getLabel();
```

### Update shipment

[](#update-shipment)

```
$shipment = $client->shipments()->update(
    'tracking_code',
    (new \JacobDeKeizer\RedJePakketje\Models\Shipment\UpdateShipment())
        ->setProduct(\JacobDeKeizer\RedJePakketje\Models\Shipment\Enums\ShipmentProduct::NEXT_DAY_PARCEL_LARGE)
);
```

### Cancel shipment

[](#cancel-shipment)

```
$shipment = $client->shipments()->cancel('tracking_code');
```

### Get label of a shipment

[](#get-label-of-a-shipment)

```
$label = $client->shipments()->getLabel(
    'tracking_code',
    (new \JacobDeKeizer\RedJePakketje\Parameters\Shipments\GetLabel()) // optional
);
```

Return shipments
----------------

[](#return-shipments)

### List return shipments

[](#list-return-shipments)

```
$returnShipmentsList = $client->returnShipments()->all(
    new \JacobDeKeizer\RedJePakketje\Parameters\ReturnShipments\All() // optional
);
```

### Get return shipment

[](#get-return-shipment)

```
$returnShipment = $client->returnShipments()->get('return_shipment_uuid');
```

### Create return shipment

[](#create-return-shipment)

```
$returnShipment = (new \JacobDeKeizer\RedJePakketje\Models\ReturnShipment\CreateReturnShipment())
    ->setName('Gijs Boersma')
    ->setStreet('Lange laan')
    ->setHouseNumber(29)
    ->setHouseNumberExtension('a')
    ->setZipcode('9281EM')
    ->setCity('Zevenaar')
    ->setTelephone('0602938172')
    ->setEmail('noreply@example.com')
    ->setReference('Bestelling 123')
    ->setNote('Some note')
    ->setReceiverName('My company')
    ->setProduct(\JacobDeKeizer\RedJePakketje\Models\ReturnShipment\Enums\ReturnShipmentProduct::SAME_DAY_PARCEL_MEDIUM)
    ->setNote('some text')
    ->setSender('sender_uuid');

$returnShipmentResponse = $client->returnShipments()->create($returnShipment);
```

### Cancel return shipment

[](#cancel-return-shipment)

```
$returnShipment = $client->returnShipments()->cancel('return_shipment_uuid');
```

Senders
-------

[](#senders)

### List senders

[](#list-senders)

```
$senderList = $client->senders()->all();
```

### Get sender

[](#get-sender)

```
$sender = $client->senders()->get('sender_uuid');
```

### Update sender

[](#update-sender)

```
$sender = $client->senders()->update(
    'sender_uuid',
    (new \JacobDeKeizer\RedJePakketje\Models\Sender\UpdateSender())
        ->setName('My Webshop 123')
        ->setTelephone('+31612345678')
        ->setStreet('Streetname')
        ->setHouseNumber('11')
        ->setZipcode('8327SD')
        ->setCity('Breda')
);
```

### Create sender

[](#create-sender)

```
$sender = $client->senders()->create(
    (new \JacobDeKeizer\RedJePakketje\Models\Sender\CreateSender())
        ->setReference('A1234567890Q')
        ->setName('My Webshop')
        ->setTelephone('+31612345678')
        ->setStreet('Streetname')
        ->setHouseNumber('11')
        ->setZipcode('8327SD')
        ->setCity('Breda')
);
```

### Deactivate sender

[](#deactivate-sender)

```
$client->senders()->deactivate(
    'sender_uuid',
    (new \JacobDeKeizer\RedJePakketje\Models\Sender\DeactivateSender())
        ->setInactiveFrom(date('Y-m-d', strtotime('+1 day')))
);
```

Pick-up Locations
-----------------

[](#pick-up-locations)

### List pick-up locations

[](#list-pick-up-locations)

```
$pickUpLocationsList = $client->pickUpLocations()->all(
    new JacobDeKeizer\RedJePakketje\Parameters\PickUpLocation\All() // optional
);
```

### Get pick-up location

[](#get-pick-up-location)

```
$pickUpLocation = $client->pickUpLocations()->get('pick_up_location_uuid');
```

### Create pick-up location

[](#create-pick-up-location)

```
$pickUpLocation = $client->pickUpLocations()->create(
    (new JacobDeKeizer\RedJePakketje\Models\PickUpLocation\CreatePickUpLocation())
        ->setName('Warehouse')
        ->setStreet('Streetname')
        ->setHouseNumber('11')
        ->setHouseNumberExtension('a')
        ->setZipcode('8327SD')
        ->setCity('Breda')
        ->setAvailableDays([1, 2, 3, 4, 5])
        ->setTypes([\JacobDeKeizer\RedJePakketje\Models\PickUpLocation\Enums\PickUpLocationType::PICK_UP_POINT])
);
```

### Update pick-up location

[](#update-pick-up-location)

```
$pickUpLocation = $client->pickUpLocations()->update(
    'pick_up_location_uuid',
    (new \JacobDeKeizer\RedJePakketje\Models\PickUpLocation\UpdatePickUpLocation())
        ->setAvailableDays([1, 2, 3, 4, 5, 6, 7])
);
```

Pick-up rules
-------------

[](#pick-up-rules)

### List pick-up rules

[](#list-pick-up-rules)

```
$pickUpRulesList = $client->pickUpRules()->all('sender_uuid');
```

### Create pick-up rule

[](#create-pick-up-rule)

```
$pickUpRule = $client->pickUpRules()->create(
        'sender_uuid',
        (new \JacobDeKeizer\RedJePakketje\Models\PickUpRule\CreatePickUpRule())
            ->setPickUpLocation('pick_up_location_uuid')
            ->setStartDate(date('Y-m-d'))
    );
```

### Update pick-up rule

[](#update-pick-up-rule)

```
$pickUpRule = $client->pickUpRules()->update(
    'sender_uuid',
    'pick_up_rule_uuid',
    (new \JacobDeKeizer\RedJePakketje\Models\PickUpRule\UpdatePickUpRule())
        ->setStartDate(date('Y-m-d', strtotime('+1 day')))
);
```

### Delete pick-up rule

[](#delete-pick-up-rule)

```
$client->pickUpRules()->delete(
    'sender_uuid',
    'pick_up_rule_uuid'
);
```

Contacts
--------

[](#contacts)

### List contacts

[](#list-contacts)

```
$contactsList = $client->contacts()->all();
```

### Get contact

[](#get-contact)

```
$contact = $client->contacts()->get('contact_uuid');
```

### Create contact

[](#create-contact)

```
$contact = $client->contacts()->create(
    (new \JacobDeKeizer\RedJePakketje\Models\Contact\CreateContact())
        ->setFirstName('John')
        ->setLastName('Doe')
        ->setEmail('john.doe@example.com')
        ->setTelephone('+31612345678')
        ->setGender(\JacobDeKeizer\RedJePakketje\Models\Contact\Enums\Gender::MALE)
        ->setReference('reference')
);
```

### Update contact

[](#update-contact)

```
$contact = $client->contacts()->update(
    'contact_uuid',
    (new \JacobDeKeizer\RedJePakketje\Models\Contact\UpdateContact())
        ->setFirstName('Jane')
        ->setLastName('Doe')
        ->setEmail('jane.doe@example.com')
        ->setTelephone('+31612345678')
        ->setGender(\JacobDeKeizer\RedJePakketje\Models\Contact\Enums\Gender::FEMALE)
        ->setReference('reference')
);
```

Exceptions
----------

[](#exceptions)

You can catch the RedJePakketjeException and check if there is a response and response error or if it is a json error:

```
// example bad call
try {
    $shipmentResponse = $client->shipments()->create(
        (new \JacobDeKeizer\RedJePakketje\Models\Shipment\CreateShipment()),
    );
} catch (\JacobDeKeizer\RedJePakketje\Exceptions\RedJePakketjeException $exception) {
    if ($exception->hasResponse()) {
        var_dump($exception->getResponse());
    }

    if ($exception->hasResponseError()) {
        var_dump($exception->getResponseError()->getErrorCode());
        var_dump($exception->getResponseError()->getErrorMessage());
        var_dump($exception->getResponseError()->getErrorDetails());
    }

    if ($exception->isJsonError()) {
        var_dump($exception->getPrevious());
    }
}
```

Code sniffer
------------

[](#code-sniffer)

Check: `composer phpcs`

Autofix: `composer phpcbf`

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 85.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 ~79 days

Recently: every ~142 days

Total

10

Last Release

1684d ago

Major Versions

v0.4.0 → v1.0.02020-02-08

v1.x-dev → v2.0.02021-11-23

PHP version history (2 changes)v0.1.0PHP &gt;=7.2

v2.0.0PHP ^8.0

### 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 (23 commits)")[![basepack](https://avatars.githubusercontent.com/u/939500?v=4)](https://github.com/basepack "basepack (4 commits)")

---

Tags

phpapiclientred je pakketjeredjepakketje

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k9.5M89](/packages/openai-php-laravel)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74331.3k1](/packages/mozex-anthropic-laravel)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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