PHPackages                             sonnenglas/mydhl-php-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. [API Development](/categories/api)
4. /
5. sonnenglas/mydhl-php-sdk

ActiveLibrary[API Development](/categories/api)

sonnenglas/mydhl-php-sdk
========================

Unofficial PHP SDK for MyDHL REST API (DHL Express)

0.3.2(3y ago)437.0k↓50%5MITPHPPHP ~8.0

Since Jan 4Pushed 3y ago3 watchersCompare

[ Source](https://github.com/sonnenglas/mydhl-php-sdk)[ Packagist](https://packagist.org/packages/sonnenglas/mydhl-php-sdk)[ RSS](/packages/sonnenglas-mydhl-php-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (22)Used By (0)

mydhl-api
=========

[](#mydhl-api)

PHP library for using DHL Express REST API (MyDHL API).

Status: [![CircleCI](https://camo.githubusercontent.com/7a146058323d2fd24227975310a2b65a0f7ed9b815a775e82e5939c79eecb8f8/68747470733a2f2f636972636c6563692e636f6d2f67682f736f6e6e656e676c61732f6d7964686c2d7068702d73646b2f747265652f6d61737465722e7376673f7374796c653d736869656c64)](https://circleci.com/gh/sonnenglas/mydhl-api/tree/master)

**Note:** It supports only the latest REST API provided by DHL. No SOAP API support.

Supported services:
===================

[](#supported-services)

ServiceSupported**RATING**Retrieve Rates for a one piece Shipment✅Retrieve Rates for Multi-piece Shipments❌Landed Cost❌**PRODUCT**Retrieve DHL Express products❌**SHIPMENT**Electronic Proof of Delivery❌Upload updated customs docs for shipment❌Create Shipment✅Upload Commercial Invoice Data for shipment❌**TRACKING**Track a single DHL Express Shipment❌Tracka single or multiple DHL Express Shipments❌**PICKUP**Cancel a DHL Express pickup booking request❌Update pickup information for existing pickup booking req❌Create a DHL Express pickup booking request❌**IDENTIFIER**Service to allocate identifiers upfront ...❌**ADDRESS**Validate DHL Express pickup/delivery capability❌**INVOICE**Upload Commercial Invoice data❌Usage:
======

[](#usage)

`diff`

### Retrieve rates

[](#retrieve-rates)

```
use Sonnenglas\MyDHL\MyDHL;
use Sonnenglas\MyDHL\ValueObjects\RateAddress;
use Sonnenglas\MyDHL\ValueObjects\Package;

$testMode = true;
$myDhl = new MyDHL('username', 'password', $testMode);

$rateService = $myDhl->getRateService();

$originAddress = new RateAddress(
    countryCode: 'DE',
    postalCode: '10117',
    cityName: 'Berlin',
);

$destinationAddress = new RateAddress(
    countryCode: 'DE',
    postalCode: '20099',
    cityName: 'Hamburg',
);

$package = new Package(
    weight: 10, // kg
    height: 20, // cm
    length: 10, // cm
    width: 30, // cm
);

$shippingDate = new DateTimeImmutable('2021-01-15 12:00:00');

$rates = $rateService->setAccountNumber('99999999')
    ->setOriginAddress($originAddress)
    ->setDestinationAddress($destinationAddress)
    ->setPlannedShippingDate($shippingDate)
    ->setPackage($package)
    ->setNextBusinessDay(false)
    ->setCustomsDeclarable(false)
    ->getRates();
```

All usage examples:

- [Check Rate](https://github.com/sonnenglas/mydhl-php-sdk/blob/master/examples/checkRate.php)
- [Create Shipment](https://github.com/sonnenglas/mydhl-php-sdk/blob/master/examples/createShipment.php)

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

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

Recently: every ~69 days

Total

20

Last Release

1208d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c01b6bd0faf6699a448bcb24a5b86999f5a770ea0f296dc7ade0842ad54836cc?d=identicon)[sonnenglas](/maintainers/sonnenglas)

---

Top Contributors

[![przemekperon](https://avatars.githubusercontent.com/u/169778?v=4)](https://github.com/przemekperon "przemekperon (40 commits)")

---

Tags

phpapiclientdhlmydhldhl-express

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sonnenglas-mydhl-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/sonnenglas-mydhl-php-sdk/health.svg)](https://phpackages.com/packages/sonnenglas-mydhl-php-sdk)
```

###  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)[kunalvarma05/dropbox-php-sdk

Dropbox PHP API V2 SDK (Unofficial)

3633.0M18](/packages/kunalvarma05-dropbox-php-sdk)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[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)[picqer/sendcloud-php-client

A PHP Client for the SendCloud API

45400.4k1](/packages/picqer-sendcloud-php-client)[bornfight/erste-bank-client

Client written in PHP for Erste Bank API

106.1k](/packages/bornfight-erste-bank-client)

PHPackages © 2026

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