PHPackages                             gunjanpatel/dhl-parcel-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. gunjanpatel/dhl-parcel-api

ActiveApplication[API Development](/categories/api)

gunjanpatel/dhl-parcel-api
==========================

The DHL Parcel Business customer shipping API. DHL developer account required.

0.1(9y ago)01192[2 issues](https://github.com/gunjanpatel/dhl-parcel-api/issues)MITPHPPHP &gt;=5.3.0

Since Dec 28Pushed 9y ago4 watchersCompare

[ Source](https://github.com/gunjanpatel/dhl-parcel-api)[ Packagist](https://packagist.org/packages/gunjanpatel/dhl-parcel-api)[ RSS](/packages/gunjanpatel-dhl-parcel-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

DHL Parcel Business customer shipping API
=========================================

[](#dhl-parcel-business-customer-shipping-api)

[![Latest Stable Version](https://camo.githubusercontent.com/5d35eb56249c9ba14392ec9802c594913fe4d9346be061c678414cf67f66837d/68747470733a2f2f706f7365722e707567782e6f72672f67756e6a616e706174656c2f64686c2d70617263656c2d6170692f76657273696f6e)](https://packagist.org/packages/gunjanpatel/dhl-parcel-api) [![Total Downloads](https://camo.githubusercontent.com/0f6f73fd69ad467e615ad373f95c6b328a82eadddc5d57ab0470f5623d22fa58/68747470733a2f2f706f7365722e707567782e6f72672f67756e6a616e706174656c2f64686c2d70617263656c2d6170692f646f776e6c6f616473)](https://packagist.org/packages/gunjanpatel/dhl-parcel-api) [![Latest Unstable Version](https://camo.githubusercontent.com/9e3da85c19fc499985a5d1cef1d896ae63abed9fccdd72d5d54050b31f5d0ea7/68747470733a2f2f706f7365722e707567782e6f72672f67756e6a616e706174656c2f64686c2d70617263656c2d6170692f762f737461626c65)](//packagist.org/packages/gunjanpatel/dhl-parcel-api) [![License](https://camo.githubusercontent.com/d7aee1090f64313232d1b3e2bc8fa4c98c691ae7a4656705e0bb50884541ac0c/68747470733a2f2f706f7365722e707567782e6f72672f67756e6a616e706174656c2f64686c2d70617263656c2d6170692f6c6963656e7365)](https://packagist.org/packages/gunjanpatel/dhl-parcel-api)

### Setup

[](#setup)

#### You can use composer to use this library.

[](#you-can-use-composer-to-use-this-library)

```
{
    "require": {
        "gunjanpatel/dhl-parcel-api": "*"
    }
}
```

#### or you may install using `composer` command.

[](#or-you-may-install-using-composer-command)

```
composer require gunjanpatel/dhl-parcel-api:*

```

### Configuration

[](#configuration)

Set configuration variables at `etc/config.json`.

```
cp etc/config.dist.json etc/config.json
```

### Examples of sending request to DHL

[](#examples-of-sending-request-to-dhl)

#### Request a shipment - `html/shipment.php`

[](#request-a-shipment---htmlshipmentphp)

```
require_once __DIR__ . '/vendor/autoload.php';

use DHL\Client\Soap as DhlSoapClient;
use DHL\Data\Shipper;
use DHL\Data\Receiver;
use DHL\Data\Shipment as ShipmentDetail;
use DHL\Request\Business\CreateShipment;

// Our company info
$shipper = new Shipper(
	[
		'company_name'   => 'Garnio Aps',
		'street_name'    => 'Clayallee',
		'street_number'  => '241',
		'zip'            => '14165',
		'city'           => 'Berlin',
		'email'          => 'company@hello.dk',
		'phone'          => '01788338795',
		'contact_person' => 'Gunjan Patel',
		'comment'        => '',
	]
);

$customer_details = [
	'name'           => 'Gunjan Patel',
	'street_name'    => 'Clayallee',
	'street_number'  => '12',
	'zip'            => 14165,
	'city'           => 'Berlin',
	'email'          => 'user@hello.dk',
	'phone'          => '1234567890',
	'contact_person' => 'Gunjan Patel',
	'comment'        => 'Just test',
];

$receiver = new Receiver($customer_details);

$detail = new ShipmentDetail(
	[
		'product'       => 'V01PAK',
		'accountNumber' => '2222222222220101',
		// 'customerReference'           => '',     // Optional
		'shipmentDate'  => date('Y-m-d'),
		// 'returnShipmentAccountNumber' => $config['ekp'],       // Optional
		// 'returnShipmentReference'     => '',     // Optional
	]
);

// Needs to convert weight into KG
$detail->item(['weight' => 10])
	->notify('user@hello.dk');

$shipment = new CreateShipment;
$shipment->setOrderId(123456)
	->detail($detail)
	->shipper($shipper)
	->receiver($receiver)
	->labelType('B64');

$client = new DhlSoapClient(true);

$response = $client->call($shipment);

echo "";
print_r($response);
echo "";
```

#### Get Label - PDF - `html/label.php`

[](#get-label---pdf---htmllabelphp)

```
require_once __DIR__ . '/vendor/autoload.php';

use DHL\Client\Soap as DhlSoapClient;
use DHL\Request\Business\Label;

$client = new DhlSoapClient(true);

$label = new Label('1234567890987654321');
$response = $client->call($label);

echo "";
print_r($response);
echo "";
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3422d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21d2b29d83f8152c4ca9b1fc6c96f73e412f3a789a5eab27879f82cc7c7b44ea?d=identicon)[gunjanpatel](/maintainers/gunjanpatel)

---

Top Contributors

[![gunjanpatel](https://avatars.githubusercontent.com/u/2002921?v=4)](https://github.com/gunjanpatel "gunjanpatel (3 commits)")

---

Tags

phpbusinesssoapshippingshipmentparceldhl

### Embed Badge

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

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

###  Alternatives

[shippo/shippo-php

A PHP library for connecting with multiple carriers (FedEx, UPS, USPS) using Shippo.

1711.8M2](/packages/shippo-shippo-php)[mvdnbrk/dhlparcel-php-api

DHL Parcel API client for PHP

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

A Library to integrate with Aramex APIs

2925.2k](/packages/octw-aramex)[afiqiqmal/parcel-track

Api Parcel Tracking API

184.1k](/packages/afiqiqmal-parcel-track)

PHPackages © 2026

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