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

ActiveLibrary[API Development](/categories/api)

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

API communication to the DHL Express web services.

v0.1.4(4y ago)052MITPHPPHP &gt;=7.1

Since Apr 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/SLONline/dhl-express-sdk-api)[ Packagist](https://packagist.org/packages/slonline/dhl-express-sdk-api)[ RSS](/packages/slonline-dhl-express-sdk-api/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (4)Versions (6)Used By (0)

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.

This library is derived from dhl/sdk-api-express of Netresearch DTT GmbH.

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 slonline/dlh-express-sdk-api
```

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

[](#uninstallation)

```
composer remove slonline/dlh-express-sdk-api
```

Features
--------

[](#features)

The DHL Express Shipping API SDK supports the following features:

- Retrieve Shipping Rates
- Create Shipping Label
- Create Shipping Label with Export Items

### 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);
```

Developer
---------

[](#developer)

Lubos Odraska | [SLONline, s.r.o](https://www.slonline.sk)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

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Total

5

Last Release

1773d 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 (6 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

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

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

API powering the features of Algolia.

69333.0M113](/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)[alexacrm/dynamics-webapi-toolkit

Web API toolkit for Microsoft Dynamics 365 and Dynamics CRM

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

Comgate PHP SDK

13327.8k](/packages/comgate-sdk)

PHPackages © 2026

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