PHPackages                             misterbrownrsa/laravel-dhl-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. misterbrownrsa/laravel-dhl-api

ActiveLibrary[API Development](/categories/api)

misterbrownrsa/laravel-dhl-api
==============================

DHL API wrapper for LARAVEL

1.0.0(8y ago)35.5k1[1 issues](https://github.com/MisterBrownRSA/laravel-dhl-api/issues)MITPHPPHP &gt;=7.0.0

Since Dec 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/MisterBrownRSA/laravel-dhl-api)[ Packagist](https://packagist.org/packages/misterbrownrsa/laravel-dhl-api)[ RSS](/packages/misterbrownrsa-laravel-dhl-api/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel DHL API
===============

[](#laravel-dhl-api)

I needed a laravel-esque wrapper to make calls to the DHL XML service, but couldn't find any. So I created one. It was specifically designed for my own personal use, but you are welcome to submit issues, and I'll look into refactoring it so that it can be used in a more general purpose fashion.

Getting Started
---------------

[](#getting-started)

### Prerequisites

[](#prerequisites)

This was built and tested ONLY on Laravel 5.5, although I'm sure it'll work on previous versions as well.

### Installing

[](#installing)

```
composer require misterbrownrsa/laravel-dhl-api

```

Since Laravel 5.5 automatically includes the service provider, it won't be necessary to register it. However, if you really want to, run the following command

```

```

\##Usage Examples

\###Capability

This is typically used to test the validity of addresses and DHL's capability to deliver. Validate must return `true`.

```
$user = User::first();

$GetCapability = new \MisterBrownRSA\DHL\API\GetCapability();
$GetCapability->user($user);
dd($GetCapability->validate());

```

Dump the request

```
dump($GetCapability->toXML());

```

Dump the response

```
dump($GetCapability->doCurlPost());
dump($GetCapability->requestRAW());

```

\###Quotation

This is used to get product information such as the price and total transit days.

```
$product = [];
foreach ($cart->items as $key => $cartItem) {
    for ($i = 1; $i quantity; $i++) {
        $product[ $key ]['height'] = $box['height'];
        $product[ $key ]['depth'] = $box['length'];
        $product[ $key ]['width'] = $box['width'];
        $product[ $key ]['weight'] = $cartItem->warehouse->product->weight + $box1['weight'];
    }
}

```

```
$GetQuote = new \MisterBrownRSA\DHL\API\GetQuote();
$GetQuote->user($user)
    ->reference($cart->order->reference)
    ->addProduct($product)
    ->declaredValue($cart->subtotal);

$result = $GetQuote
    ->doCurlPost();

dd($result);

```

Dump the request

```
dd($GetQuote->toXML());

```

Dump the response

```
dump($GetQuote->results());
dump($GetQuote->resultsRAW());

```

Authors
-------

[](#authors)

- **Duwayne Brown** - *Initial work* - [MisterBrownRSA](https://github.com/MisterBrownRSA)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

Acknowledgments
---------------

[](#acknowledgments)

- Thanks David for your help during the implementation process

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

3172d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22321812?v=4)[Duwayne Brown](/maintainers/MisterBrownRSA)[@MisterBrownRSA](https://github.com/MisterBrownRSA)

---

Top Contributors

[![MisterBrownRSA](https://avatars.githubusercontent.com/u/22321812?v=4)](https://github.com/MisterBrownRSA "MisterBrownRSA (16 commits)")

### Embed Badge

![Health badge](/badges/misterbrownrsa-laravel-dhl-api/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)

PHPackages © 2026

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