PHPackages                             dhl/sdk-api-express - 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. dhl/sdk-api-express

AbandonedArchivedLibrary[API Development](/categories/api)

dhl/sdk-api-express
===================

API communication to the DHL Express web services.

2.1.0(5y ago)1350.2k↑10.7%221MITPHPPHP ^7.1

Since Sep 17Pushed 4y ago11 watchersCompare

[ Source](https://github.com/netresearch/dhl-sdk-api-express)[ Packagist](https://packagist.org/packages/dhl/sdk-api-express)[ RSS](/packages/dhl-sdk-api-express/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (10)Used By (1)

DHL Express Shipping API SDK for PHP
====================================

[](#dhl-express-shipping-api-sdk-for-php)

Description
-----------

[](#description)

This library enables extension developers to prepare and parse messages for DHL Express API communication and provides functionality for collecting request data.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1
- DHL Express customer account able to access the production endpoints (optionally sandpit too)

Installation Instructions
-------------------------

[](#installation-instructions)

```
composer require dhl/sdk-api-express
```

Uninstallation
--------------

[](#uninstallation)

```
composer remove dhl/sdk-api-express
```

Features
--------

[](#features)

The DHL Express Shipping API SDK supports the following features:

- Retrieve Shipping Rates
- Create Shipping Label

### Shipping Rates

[](#shipping-rates)

The *Rate Request* will return DHL's product capabilities (products, services, and estimated delivery time) and prices (where applicable) for a certain set of input data.

#### Public API

[](#public-api)

The library's components suitable for consumption comprise of

- services:
    - service factory
    - rate service
    - data transfer object builder
- data transfer objects:
    - rate request
    - rate response

#### Usage

[](#usage)

```
$logger = new \Psr\Log\NullLogger();

$serviceFactory = new SoapServiceFactory();
$service = $serviceFactory->createRateService('api-user', 'api-pass', $logger);

$requestBuilder = new RateRequestBuilder();
$requestBuilder->setIsUnscheduledPickup($isUnscheduledPickup);
$requestBuilder->setShipperAccount($accountNumber);
$requestBuilder->setShipperAddress($countryCode, $postalCode, $city, $etc);
$requestBuilder->setRecipientAddress($countryCode, $postalCode, $city, $etc);
$requestBuilder->setWeightUOM($weightUOM);
$requestBuilder->setDimensionsUOM($dimensionsUOM);
$requestBuilder->setTermsOfTrade($termsOfTrade);
$requestBuilder->setContentType($contentType);
$requestBuilder->setReadyAtTimestamp($readyAtTimestamp);
$requestBuilder->addPackage($weight, $weightUom, $length, $width, $height, $dimensionsUom, $readyAtDate);
$requestBuilder->setInsurance($insuranceValue, $insuranceCurrency);

$request = $requestBuilder->build();
$response = $service->collectRates($request);
```

### Shipping Label

[](#shipping-label)

The *ShipmentRequest* operation will allow you to generate an AWB number and piece IDs, generate a shipping label, transmit manifest shipment detail to DHL, and optionally book a courier for the pickup of a shipment.

#### Public API

[](#public-api-1)

The library's components suitable for consumption comprise of

- services:
    - service factory
    - shipment service
    - data transfer object builder
- data transfer objects:
    - shipment request
    - shipment response

#### Usage

[](#usage-1)

```
$logger = new \Psr\Log\NullLogger();

$serviceFactory = new SoapServiceFactory();
$service = $serviceFactory->createShipmentService('api-user', 'api-pass', $logger);

$requestBuilder = new ShipmentRequestBuilder();
$requestBuilder->setIsUnscheduledPickup($unscheduledPickup);
$requestBuilder->setTermsOfTrade($termsOfTrade);
$requestBuilder->setContentType($contentType);
$requestBuilder->setReadyAtTimestamp($readyAtTimestamp);
$requestBuilder->setNumberOfPieces($numberOfPieces);
$requestBuilder->setCurrency($currencyCode);
$requestBuilder->setDescription($description);
$requestBuilder->setServiceType($serviceType);
$requestBuilder->setPayerAccountNumber($accountNumber);
$requestBuilder->setInsurance($insuranceValue, $insuranceCurrency);
$requestBuilder->setShipper($countryCode, $postalCode, $city, $streetLines, $name, $company, $phone);
$requestBuilder->setRecipient($countryCode, $postalCode, $city, $streetLines, $name, $company, $phone);
$requestBuilder->setDryIce($unCode, $weight);
$requestBuilder->addPackage($sequenceNumber, $weight, $weightUOM, $length, $width, $height, $dimensionsUOM, $customerReferences);

$request = $requestBuilder->build();
$response = $service->createShipment($request);
```

Support
-------

[](#support)

The DHL Express Shipping API SDK was created to be used in conjunction with the Magento® 2 module [DHL Express Rates at Checkout](https://marketplace.magento.com/dhl-module-rates-express.html). Any other usage will not receive official support.

Developer
---------

[](#developer)

Christoph Aßmann | [Netresearch GmbH &amp; Co. KG](http://www.netresearch.de/) | [@mam08ixo](https://twitter.com/mam08ixo)

License
-------

[](#license)

See LICENSE.md for license details.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~91 days

Recently: every ~71 days

Total

9

Last Release

2071d ago

Major Versions

1.2.0 → 2.0.02019-12-05

PHP version history (4 changes)1.1.0PHP ~5.6.5 || ~7.0.13 || ~7.1.3 || ~7.2.0

2.0.0PHP ~5.6.5 || ~7.0.13 || ~7.1.3 || ~7.2.0 || ~7.3.0

2.0.1PHP ~5.6.5 || ~7.0.13 || ~7.1.3 || ~7.2

2.0.2PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/efd68399f95aa07110668d9af1a47a8030d8df5ec5af4b28e821d442d787583a?d=identicon)[team-mage](/maintainers/team-mage)

![](https://www.gravatar.com/avatar/695e3bfd8205ec067be29cbcf46630d7fc6586d050acbe630783a1d382cac71f?d=identicon)[moehrenzahn](/maintainers/moehrenzahn)

---

Top Contributors

[![magicsunday](https://avatars.githubusercontent.com/u/564393?v=4)](https://github.com/magicsunday "magicsunday (110 commits)")[![mam08ixo](https://avatars.githubusercontent.com/u/1771622?v=4)](https://github.com/mam08ixo "mam08ixo (19 commits)")[![powli](https://avatars.githubusercontent.com/u/4511053?v=4)](https://github.com/powli "powli (19 commits)")[![Sebastian80](https://avatars.githubusercontent.com/u/6400300?v=4)](https://github.com/Sebastian80 "Sebastian80 (10 commits)")[![AndreasMueller75](https://avatars.githubusercontent.com/u/32193606?v=4)](https://github.com/AndreasMueller75 "AndreasMueller75 (5 commits)")[![ngolatka](https://avatars.githubusercontent.com/u/7393538?v=4)](https://github.com/ngolatka "ngolatka (1 commits)")[![rafatga](https://avatars.githubusercontent.com/u/3813277?v=4)](https://github.com/rafatga "rafatga (1 commits)")

---

Tags

api-clientdhldhl-apidhl-expressphpphp-librarysdk

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dhl-sdk-api-express/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69433.0M114](/packages/algolia-algoliasearch-client-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

517.9M7](/packages/avalara-avataxclient)[alexacrm/dynamics-webapi-toolkit

Web API toolkit for Microsoft Dynamics 365 and Dynamics CRM

81324.1k1](/packages/alexacrm-dynamics-webapi-toolkit)

PHPackages © 2026

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