PHPackages                             slonline/dhlglobalmail - 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. slonline/dhlglobalmail

ActiveLibrary[API Development](/categories/api)

slonline/dhlglobalmail
======================

Provides a client to interact with the DHL Global Mail API in an object-oriented way.

v0.1.5(3y ago)172MITPHPPHP &gt;=7.1.3

Since Mar 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/SLONline/dhlglobalmail)[ Packagist](https://packagist.org/packages/slonline/dhlglobalmail)[ RSS](/packages/slonline-dhlglobalmail/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (3)Dependencies (3)Versions (7)Used By (0)

DHL Global Mail
===============

[](#dhl-global-mail)

This is a PHP library that provides a simple way to communicate with the DHL Global Mail API. It was created because there were no simple alternatives that follow good object-oriented code practices.

Example
-------

[](#example)

```
use SLONline\DHLGlobalMail\Client;
use SLONline\DHLGlobalMail\Model\Order;
use SLONline\DHLGlobalMail\Model\OrderItem;
use SLONline\DHLGlobalMail\Model\Shipment;
use SLONline\DHLGlobalMail\Model\Tracking;
use SLONline\DHLGlobalMail\Exception\DHLGlobalMailRequestException;

$client = new Client('your_client_id', 'your_client_secret');

// Create a order and label
try {
    $orer = $client->createOrder([
            'customerEkp' => '9012345678',
            'orderStatus' => Order::STATUS_FINALIZE,
            'paperwork'   => [
                'contactName'     => "Max Mustermann",
                'awbCopyCount'    => 3,
                'jobReference'    => "Job ref",
                'pickupType'      => Paperwork::PICKUP_TYPE_CUSTOMER_DROP_OFF,
                "pickupLocation"  => "Mustergasse 12",
                "pickupDate"      => date('Y-m-d'),
                "pickupTimeSlot"  => Paperwork::TIME_SLOT_MIDDAY,
                "telephoneNumber" => "+4935120681234",
            ],
            'items'       => [
                [
                    "product"             => OrderItem::PRODUCT_GPP,
                    "serviceLevel"        => OrderItem::SERVICE_LEVEL_PRIORITY,
                    "recipient"           => "Alfred J. Quack",
                    "addressLine1"        => "Mustergasse 12",
                    "addressLine2"        => "Hinterhaus",
                    "addressLine3"        => "1. Etage",
                    "city"                => "Dresden",
                    "destinationCountry"  => "DE",
                    "custRef"             => "#REF-2361890-AB",
                    "recipientPhone"      => "+4935120681234",
                    "recipientEmail"      => "alfred.j.quack@somewhere.eu",
                    "postalCode"          => "01432",
                    "shipmentGrossWeight" => 1200,
                    "returnItemWanted"    => false,
                    "shipmentNaturetype"  => OrderItem::SHIPMENT_NATURE_TYPE_SALE_GOODS,
                    'shipmentCurrency'    => 'EUR',
                    "shipmentAmount"      => 100,
                ],
                [
                    "product"             => OrderItem::PRODUCT_GPP,
                    "serviceLevel"        => OrderItem::SERVICE_LEVEL_PRIORITY,
                    "recipient"           => "One Person",
                    "addressLine1"        => "180 St Kilda Rd",
                    "city"                => "Melbourne",
                    "destinationCountry"  => "AU",
                    "custRef"             => "#455",
                    "recipientPhone"      => "+32112122",
                    "recipientEmail"      => "someone@somewhere.eu",
                    "postalCode"          => "VIC 3006",
                    "shipmentGrossWeight" => 120,
                    "returnItemWanted"    => false,
                    "shipmentNaturetype"  => OrderItem::SHIPMENT_NATURE_TYPE_SALE_GOODS,
                    'shipmentCurrency'    => 'EUR',
                    'contents'            => [
                        [
                            'contentPieceAmount'      => 1,
                            'contentPieceDescription' => 'test book',
                            'contentPieceHsCode'      => '49019900',
                            'contentPieceNetweight'   => 120,
                            'contentPieceOrigin'      => 'NL',
                            'contentPieceValue'       => '12.50',
                        ],
                    ],
                ],
                [
                    "product"             => OrderItem::PRODUCT_GPP,
                    "serviceLevel"        => OrderItem::SERVICE_LEVEL_PRIORITY,
                    "recipient"           => "Apple Park",
                    "addressLine1"        => "One Apple Park Way",
                    "city"                => "Cupertino",
                    "state"               => 'CA',
                    "destinationCountry"  => "US",
                    "custRef"             => "#455",
                    "recipientPhone"      => "+321232131",
                    "recipientEmail"      => "someone@somewhere.eu",
                    "postalCode"          => "95014",
                    "shipmentGrossWeight" => 120,
                    "returnItemWanted"    => false,
                    "shipmentNaturetype"  => OrderItem::SHIPMENT_NATURE_TYPE_SALE_GOODS,
                    'shipmentCurrency'    => 'EUR',
                    'shipmentAmount'      => 12.5,
                    'contents'            => [
                        [
                            'contentPieceAmount'      => 1,
                            'contentPieceDescription' => 'test book',
                            'contentPieceHsCode'      => '49019900',
                            'contentPieceNetweight'   => 120,
                            'contentPieceOrigin'      => 'NL',
                            'contentPieceValue'       => '12.50',
                        ],
                    ],
                ],
            ],
        ]
    );

    $awb = $order->getShipments()[0]->getAwb();

    $awbPdf = $client->getAwbLabelPDF($awb);
    $itemsPDF = $client->getItemLabelsPDF($awb);

    var_dump($order, $awbPdf);
} catch (DHLGlobalMailRequestException $exception) {
    echo $exception->getMessage();
}
```

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

[](#installation)

`composer require slonline/dhlglobalmail`

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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

Recently: every ~166 days

Total

6

Last Release

1203d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4aadb774b5fa6a31dd242a822c365c00e6ce8f1ed3cd1739a379b130d4af3b9f?d=identicon)[odraska](/maintainers/odraska)

---

Top Contributors

[![odraska](https://avatars.githubusercontent.com/u/775571?v=4)](https://github.com/odraska "odraska (8 commits)")

---

Tags

apiclientparceldhlglobalmailslonline

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/slonline-dhlglobalmail/health.svg)

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

###  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.7k7.6M74](/packages/openai-php-laravel)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[jouwweb/sendcloud

Provides a client to interact with the Sendcloud API in an object-oriented way.

16256.9k1](/packages/jouwweb-sendcloud)[mvdnbrk/dhlparcel-php-api

DHL Parcel API client for PHP

3957.9k5](/packages/mvdnbrk-dhlparcel-php-api)

PHPackages © 2026

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