PHPackages                             smart-dato/dhl-parcel-sdk - 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. smart-dato/dhl-parcel-sdk

ActiveLibrary

smart-dato/dhl-parcel-sdk
=========================

Laravel SDK for the DHL Parcel DE Shipping v2 API

v0.0.4(1mo ago)05↑500%MITPHPPHP ^8.4CI passing

Since Mar 19Pushed 1mo agoCompare

[ Source](https://github.com/smart-dato/dhl-parcel-sdk)[ Packagist](https://packagist.org/packages/smart-dato/dhl-parcel-sdk)[ Docs](https://github.com/smart-dato/dhl-parcel-sdk)[ GitHub Sponsors](https://github.com/SmartDato)[ RSS](/packages/smart-dato-dhl-parcel-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (15)Versions (5)Used By (0)

DHL Parcel DE Shipping SDK for Laravel
======================================

[](#dhl-parcel-de-shipping-sdk-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4913a6bbe91416305492215429fa44abbb65d77c2c6007be900497dddbae2ce0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736d6172742d6461746f2f64686c2d70617263656c2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smart-dato/dhl-parcel-sdk)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3991ebcd0a7d27137f5efa2b3f95464c621eeeaf0c14aa003103bff71d896325/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736d6172742d6461746f2f64686c2d70617263656c2d73646b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/smart-dato/dhl-parcel-sdk/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c48b16826930ea3af59a44a83d0bb9c65202dabc54726a35da29efea4650b288/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736d6172742d6461746f2f64686c2d70617263656c2d73646b2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/smart-dato/dhl-parcel-sdk/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/c75c2e4031863cbe356a3f7711c9b4cb0de460d1fefa147ccef93a24a53f2093/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736d6172742d6461746f2f64686c2d70617263656c2d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smart-dato/dhl-parcel-sdk)

A Laravel package for the [DHL Parcel DE Shipping v2 API](https://developer.dhl.com/api-reference/parcel-de-shipping-post-parcel-germany-v2). Create shipments, retrieve labels, manage manifests, and more. Built on [Saloon](https://docs.saloon.dev) and [Spatie Laravel Data](https://spatie.be/docs/laravel-data).

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

[](#installation)

```
composer require smart-dato/dhl-parcel-sdk
```

Publish the config file:

```
php artisan vendor:publish --tag="dhl-parcel-sdk-config"
```

Add your credentials to `.env`:

```
DHL_PARCEL_API_KEY=your-api-key
# Or use Basic Auth instead:
# DHL_PARCEL_USERNAME=your-username
# DHL_PARCEL_PASSWORD=your-password

# Enable sandbox for testing:
# DHL_PARCEL_SANDBOX=true
```

Usage
-----

[](#usage)

### Create a shipment

[](#create-a-shipment)

```
use SmartDato\DhlParcel\Data\Orders\ContactAddressData;
use SmartDato\DhlParcel\Data\Orders\ShipmentData;
use SmartDato\DhlParcel\Data\Orders\ShipmentDetailsData;
use SmartDato\DhlParcel\Data\Orders\ShipmentOrderRequestData;
use SmartDato\DhlParcel\Data\Orders\ShipperData;
use SmartDato\DhlParcel\Data\Orders\WeightData;
use SmartDato\DhlParcel\Enums\DocFormat;
use SmartDato\DhlParcel\Enums\Product;
use SmartDato\DhlParcel\Enums\WeightUom;
use SmartDato\DhlParcel\Facades\DhlParcel;

$response = DhlParcel::orders()->create(
    data: new ShipmentOrderRequestData(
        profile: 'STANDARD_GRUPPENPROFIL',
        shipments: [
            new ShipmentData(
                product: Product::V01PAK,
                billingNumber: '33333333330102',
                details: new ShipmentDetailsData(
                    weight: new WeightData(WeightUom::Grams, 500),
                ),
                shipper: new ShipperData(
                    name1: 'My Online Shop GmbH',
                    addressStreet: 'Sträßchensweg 10',
                    city: 'Bonn',
                    country: 'DEU',
                    postalCode: '53113',
                ),
                consignee: new ContactAddressData(
                    name1: 'Maria Musterfrau',
                    addressStreet: 'Kurt-Schumacher-Str. 20',
                    city: 'Bonn',
                    country: 'DEU',
                    postalCode: '53113',
                ),
            ),
        ],
    ),
    docFormat: DocFormat::Pdf,
);

// Access the label
$label = $response->items[0]->label;
```

### Validate a shipment (dry run)

[](#validate-a-shipment-dry-run)

```
$response = DhlParcel::orders()->validate(
    data: $shipmentOrderRequest,
);
```

### Retrieve existing labels

[](#retrieve-existing-labels)

```
$response = DhlParcel::orders()->get(
    shipments: ['340434310428091700'],
);
```

### Delete shipments

[](#delete-shipments)

```
$response = DhlParcel::orders()->delete(
    profile: 'STANDARD_GRUPPENPROFIL',
    shipments: ['340434310428091700'],
);
```

### Manifests

[](#manifests)

```
use SmartDato\DhlParcel\Data\Manifests\ManifestRequestData;

// Get daily manifest
$manifest = DhlParcel::manifests()->get(date: '2025-01-15');

// Close out shipments
$response = DhlParcel::manifests()->create(
    data: new ManifestRequestData(
        profile: 'STANDARD_GRUPPENPROFIL',
        shipmentNumbers: ['340434310428091700'],
    ),
);
```

### Download a label PDF

[](#download-a-label-pdf)

```
$pdfContent = DhlParcel::labels()->download(token: 'label-token-from-response');
```

### Using without the Facade

[](#using-without-the-facade)

You can create a `DhlParcel` instance directly using `DhlParcel::make()`. This is useful when you prefer not to use the facade, need different credentials per request, or want to support multi-tenant setups:

```
use SmartDato\DhlParcel\DhlParcel;

// With API key
$dhl = DhlParcel::make([
    'api_key' => 'your-api-key',
    'sandbox' => true,
]);

// Or with Basic Auth
$dhl = DhlParcel::make([
    'username' => 'your-username',
    'password' => 'your-password',
]);

$response = $dhl->orders()->create($data);
```

You can also optionally pass a custom `base_url` if needed:

```
$dhl = DhlParcel::make([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api-eu.dhl.com/parcel/de/shipping/v2',
]);
```

Available products
------------------

[](#available-products)

EnumProduct`Product::V01PAK`DHL Paket`Product::V53WPAK`DHL Paket International`Product::V54EPAK`DHL Europaket`Product::V62WP`Warenpost`Product::V62KP`DHL Kleinpaket`Product::V66WPI`Warenpost InternationalTesting
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [SmartDato](https://github.com/smart-dato)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~0 days

Total

4

Last Release

51d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3006db55caec62526937fa2d941da32fc5e69e2ca86a52e87c8046da5958d82?d=identicon)[smart-dato](/maintainers/smart-dato)

---

Top Contributors

[![tschigo](https://avatars.githubusercontent.com/u/344100?v=4)](https://github.com/tschigo "tschigo (8 commits)")[![michael-tscholl](https://avatars.githubusercontent.com/u/178569346?v=4)](https://github.com/michael-tscholl "michael-tscholl (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

laravelsaloonshippingdhlSmartDatodhl-parcel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/smart-dato-dhl-parcel-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/smart-dato-dhl-parcel-sdk/health.svg)](https://phpackages.com/packages/smart-dato-dhl-parcel-sdk)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

188.5k](/packages/tarfin-labs-event-machine)[basillangevin/laravel-data-json-schemas

Transforms Spatie Data objects into JSON Schemas with built-in validation

1312.2k1](/packages/basillangevin-laravel-data-json-schemas)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)

PHPackages © 2026

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