PHPackages                             dhl/sdk-api-ecom-us - 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-ecom-us

AbandonedArchivedLibrary[API Development](/categories/api)

dhl/sdk-api-ecom-us
===================

DHL eCommerce US API SDK

1.0.0(5y ago)29[1 issues](https://github.com/netresearch/dhl-sdk-api-ecom-us/issues)[7 PRs](https://github.com/netresearch/dhl-sdk-api-ecom-us/pulls)1MITPHPPHP ^7.1.0CI failing

Since Mar 17Pushed 1mo ago6 watchersCompare

[ Source](https://github.com/netresearch/dhl-sdk-api-ecom-us)[ Packagist](https://packagist.org/packages/dhl/sdk-api-ecom-us)[ RSS](/packages/dhl-sdk-api-ecom-us/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (16)Versions (10)Used By (1)

DHL eCommerce US API SDK
========================

[](#dhl-ecommerce-us-api-sdk)

The DHL eCommerce US API SDK package offers an interface to the following web services:

- DHL eCommerce Solutions Americas API, version 4

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

[](#requirements)

### System Requirements

[](#system-requirements)

- PHP 7.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
- `squizlabs/php_codesniffer`: Static analysis tool

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

[](#installation)

```
$ composer require dhl/sdk-api-ecom-us
```

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

[](#uninstallation)

```
$ composer remove dhl/sdk-api-ecom-us
```

Testing
-------

[](#testing)

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

Features
--------

[](#features)

The DHL eCommerce US API SDK supports the following features:

- Create Label
- Create Manifest

### Label Creation

[](#label-creation)

Create labels for DHL eCommerce including the relevant shipping documents.

#### Public API

[](#public-api)

The library's components suitable for consumption comprise

- services:
    - service factory
    - label service
    - data transfer object builder
- data transfer objects:
    - authentication storage
    - label with package identifiers and label data

#### Usage

[](#usage)

```
$logger = new \Psr\Log\NullLogger();
$authStorage = new \Dhl\Sdk\EcomUs\Model\Auth\AuthenticationStorage(
    $username = 'u5er',
    $password = 'p4ss'
);

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

$requestBuilder = new \Dhl\Sdk\EcomUs\Model\Label\LabelRequestBuilder();
$requestBuilder->setShipperAccount(
    $pickupAccountNumber = '5323000',
    $distributionCenter = 'USMCO1'
);
$requestBuilder->setShipperAddress(
    $country = 'US',
    $postalCode = '33324',
    $city = 'Plantation',
    $streetLines = ['1210 South Pine Island Road'],
    $company = 'DHL eCommerce'
);
$requestBuilder->setReturnAddress(
    $country = 'US',
    $postalCode = '33324',
    $city = 'Plantation',
    $streetLines = ['1210 South Pine Island Road'],
    $company = 'DHL eCommerce'
);
$requestBuilder->setRecipientAddress(
    $country = 'US',
    $postalCode = '90232',
    $city = 'Culver City',
    $streetLines = ['10441 Jefferson Blvd.', 'Suite 200'],
    $name = 'Jane Doe',
    $company = 'Foo Factory',
    $email = 'foo@example.org',
    $phone = '800 123456',
    $state = 'CA'
);

$requestBuilder->setPackageId($uniquePackageId = 'TEST-9876543210');
$requestBuilder->setPackageDetails(
    $shippingProduct = 'PLT',
    $currency = 'USD',
    $packageWeight = 1.2,
    $weightUnit = 'LB'
);

$labelRequest = $requestBuilder->create();
$label = $service->createLabel($labelRequest);
```

### Manifestation

[](#manifestation)

Create a package manifest and retrieve documentation.

#### Public API

[](#public-api-1)

The library's components suitable for consumption comprise

- services:
    - service factory
    - manifest service
- data transfer objects:
    - authentication storage
    - manifest with documents and package errors

#### Usage

[](#usage-1)

```
$logger = new \Psr\Log\NullLogger();
$authStorage = new \Dhl\Sdk\EcomUs\Model\Auth\AuthenticationStorage(
    $username = 'u5er',
    $password = 'p4ss'
);

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

// create manifest for all available packages
$manifest = $service->createManifest($pickupAccountNumber = '5323000');

// OR create manifest for certain packages, identified by number
$manifest = $service->createPackageManifest(
    $pickupAccountNumber = '5323000',
    $packageIds = [
        "TEST-0123456789",
        "TEST-9876543210"
    ]
);

// documentation may not be instantly available, try again later
if ($manifest->getStatus() !== \Dhl\Sdk\EcomUs\Api\Data\ManifestInterface::STATUS_COMPLETED) {
    $manifest = $service->getManifest(
        $pickupAccountNumber = '5323000',
        $requestId = $manifest->getRequestId()
    );
}
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance51

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% 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

1880d 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 (14 commits)")[![CybotTM](https://avatars.githubusercontent.com/u/326348?v=4)](https://github.com/CybotTM "CybotTM (3 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (2 commits)")[![Sebastian80](https://avatars.githubusercontent.com/u/6400300?v=4)](https://github.com/Sebastian80 "Sebastian80 (2 commits)")[![AndreasMueller75](https://avatars.githubusercontent.com/u/32193606?v=4)](https://github.com/AndreasMueller75 "AndreasMueller75 (1 commits)")

---

Tags

phpsdk

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/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.8k22.6M232](/packages/openai-php-client)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M65](/packages/opensearch-project-opensearch-php)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[mozex/anthropic-php

Anthropic PHP is a supercharged community-maintained PHP API client that allows you to interact with Anthropic API.

46365.1k13](/packages/mozex-anthropic-php)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)

PHPackages © 2026

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