PHPackages                             dhl/sdk-api-parcel-de-returns - 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-parcel-de-returns

ActiveLibrary[API Development](/categories/api)

dhl/sdk-api-parcel-de-returns
=============================

DHL Parcel DE Returns API SDK

1.2.0(1y ago)163.7k↓39.8%1MITPHPPHP ^8.1.0CI passing

Since Nov 30Pushed 3d ago6 watchersCompare

[ Source](https://github.com/netresearch/dhl-sdk-api-parcel-de-returns)[ Packagist](https://packagist.org/packages/dhl/sdk-api-parcel-de-returns)[ Docs](https://developer.dhl.com/api-reference/dhl-parcel-de-returns-post-parcel-germany)[ RSS](/packages/dhl-sdk-api-parcel-de-returns/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (3)Dependencies (18)Versions (5)Used By (1)

DHL Parcel DE Returns API SDK
=============================

[](#dhl-parcel-de-returns-api-sdk)

The DHL Parcel DE Returns API SDK package offers an interface to the following web services:

- [Returns API](https://developer.dhl.com/api-reference/dhl-parcel-de-returns-post-parcel-germany)

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

[](#requirements)

### System Requirements

[](#system-requirements)

- PHP 8.1+ with JSON extension

### Package Requirements

[](#package-requirements)

- `netresearch/jsonmapper`: Mapper for deserialization of JSON response messages into PHP objects
- `php-http/discovery`: Discovery service for HTTP client and message factory implementations
- `php-http/httplug`: Pluggable HTTP client abstraction
- `php-http/logger-plugin`: HTTP client logger plugin for HTTPlug
- `psr/http-client`: PSR-18 HTTP client interfaces
- `psr/http-factory`: PSR-7 HTTP message factory interfaces
- `psr/http-message`: PSR-7 HTTP message interfaces
- `psr/log`: PSR-3 logger interfaces

### Virtual Package Requirements

[](#virtual-package-requirements)

- `psr/http-client-implementation`: Any package that provides a PSR-18 compatible HTTP client
- `psr/http-factory-implementation`: Any package that provides PSR-7 compatible HTTP message factories
- `psr/http-message-implementation`: Any package that provides PSR-7 HTTP messages

### Development Package Requirements

[](#development-package-requirements)

- `nyholm/psr7`: PSR-7 HTTP message factory &amp; message implementation
- `phpunit/phpunit`: Testing framework
- `php-http/mock-client`: HTTPlug mock client implementation
- `phpstan/phpstan`: Static analysis tool
- `fig/log-test`: PSR-3 logger implementation for testing purposes
- `squizlabs/php_codesniffer`: Static analysis tool
- `rector/rector`: Automatic refactoring tool to help with PHP upgrades

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

[](#installation)

```
composer require dhl/sdk-api-parcel-de-returns
```

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

[](#uninstallation)

```
composer remove dhl/sdk-api-parcel-de-returns
```

Testing
-------

[](#testing)

```
./vendor/bin/phpunit -c test/phpunit.xml
```

Features
--------

[](#features)

The DHL Parcel DE Returns API SDK supports the following features:

- Book return labels ([`POST /orders`](https://developer.dhl.com/api-reference/dhl-parcel-de-returns-post-parcel-germany#operations-Orders-createReturnOrder))

### Authentication

[](#authentication)

The DHL Parcel DE Returns API requires a two-level authentication (see [API User Guide](https://developer.dhl.com/api-reference/dhl-parcel-de-returns-post-parcel-germany#get-started-section/user-guide)):

1. The **application** submits a *Consumer Key Header* ("API Key") that must be created in the [DHL API Developer Portal](https://developer.dhl.com/user/apps).
2. The **user** is identified via *HTTP Basic Authentication* with credentials configured in the [DHL Business Customer Portal](https://geschaeftskunden.dhl.de/).

These credentials are passed to the SDK via `\Dhl\Sdk\ParcelDe\Returns\Api\Data\AuthenticationStorageInterface`. Use the default implementation or create your own.

### Book Return Label

[](#book-return-label)

Create a return label PDF, or a QR code to be scanned by a place of committal (e.g. post office). For return shipments from outside the EU, a customs document can also be requested.

The destination address of the return shipment is determined via *Receiver ID*parameter. Return recipients and their ID ("Return recipient's name") are configured in the [DHL Business Customer Portal](https://geschaeftskunden.dhl.de/), *Returns Settings* section. More detailed information can be found in the [API FAQ](https://developer.dhl.com/api-reference/dhl-parcel-de-returns-post-parcel-germany#additional-information-section/faq--returns-recipients).

#### Public API

[](#public-api)

The library's components suitable for consumption comprise

- service:
    - service factory
    - return label service
    - data transfer object builder
- data transfer objects:
    - authentication storage
    - booking confirmation with label data

#### Usage

[](#usage)

```
$authStorage = new \Dhl\Sdk\ParcelDe\Returns\Auth\AuthenticationStorage(
    'apiKey',
    'user',
    'password'
);
$logger = new \Psr\Log\NullLogger();

$serviceFactory = new \Dhl\Sdk\ParcelDe\Returns\Service\ServiceFactory();
$service = $serviceFactory->createReturnLabelService($authStorage, $logger, $sandbox = true);

$requestBuilder = new \Dhl\Sdk\ParcelDe\Returns\Model\ReturnLabelRequestBuilder();
$requestBuilder->setReceiverId($returnRecipient = 'deu');
$requestBuilder->setShipper(
    $name = 'Jane Doe',
    $countryCode = 'DEU',
    $postalCode = '53113',
    $city = 'Bonn',
    $streetName = 'Sträßchensweg',
    $streetNumber = '2'
);

$returnOrder = $requestBuilder->create();
$confirmation = $service->createReturnOrder($returnOrder);
```

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance76

Regular maintenance activity

Popularity32

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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 ~276 days

Total

3

Last Release

394d ago

### Community

Maintainers

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

---

Top Contributors

[![mam08ixo](https://avatars.githubusercontent.com/u/1771622?v=4)](https://github.com/mam08ixo "mam08ixo (9 commits)")[![Sebastian80](https://avatars.githubusercontent.com/u/6400300?v=4)](https://github.com/Sebastian80 "Sebastian80 (5 commits)")[![CybotTM](https://avatars.githubusercontent.com/u/326348?v=4)](https://github.com/CybotTM "CybotTM (1 commits)")

---

Tags

dhl-apidhl-parceldhl-phpdhl-php-sdkdhl-sdkgitlab-mirrorphp-librarysdksdk-phpphpsdkdhl

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28150.5k](/packages/phpro-http-tools)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k28.0M318](/packages/openai-php-client)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)

PHPackages © 2026

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