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.4k1[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 today

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

28

—

LowBetter than 57% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity22

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

3030d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cac4382b94861c297e5cf0ca9a84015c987c2f465c6240187a2dc6d56eb38bc0?d=identicon)[MisterBrownRSA](/maintainers/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

[google/apiclient

Client library for Google APIs

9.8k186.9M875](/packages/google-apiclient)[stripe/stripe-php

Stripe PHP Library

4.0k139.3M411](/packages/stripe-stripe-php)[webonyx/graphql-php

A PHP port of GraphQL reference implementation

4.7k75.4M270](/packages/webonyx-graphql-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k90.6M248](/packages/twilio-sdk)[friendsofsymfony/jsrouting-bundle

A pretty nice way to expose your Symfony routing to client applications.

1.5k52.7M205](/packages/friendsofsymfony-jsrouting-bundle)[knplabs/github-api

GitHub API v3 client

2.2k15.3M170](/packages/knplabs-github-api)

PHPackages © 2026

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