Download the PHP package medzuch/dhl-express-php without Composer

On this page you can find all versions of the php package medzuch/dhl-express-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dhl-express-php

medzuch/dhl-express-php

A clean, framework-agnostic PHP 8.3 library for the DHL Express MyDHL API 3.2.2.

CI PHP


Features

Domain Operations
Tracking Single shipment tracking, multi-shipment tracking
Shipments Create shipment, upload PLT image, upload invoice data, add piece, get image
Rates Single-piece rates (GET), multi-piece rates (POST)
Landed Cost Estimate duties and taxes
Pickups Create, update, cancel pickup bookings
Products List available shipping products
Address Validate destination addresses
Service Points Find DHL service points
EPOD Electronic proof of delivery
Identifiers Resolve tracking identifiers
Reference Data Look up DHL code lists
Early Shipment Screening BBX Denied Party screening (POST /early-shipment-screening)

Requirements

Installation

The library uses php-http/discovery to auto-detect a PSR-18 HTTP client and PSR-17 factories at runtime. Any PSR-18 compliant client works — Guzzle 7 is the recommended default.

If you want to use a different client (e.g. Symfony HttpClient), require it instead and it will be discovered automatically. You can also inject any PSR-18/PSR-17 implementation directly via the DhlClient constructor.


Quick Start


Usage Examples

Track a Shipment

Use tracking()->getMany(...) to track up to 200 shipments in a single call. It returns a list<TrackingResponse> with the same flat shape per entry.

Get Shipping Rates

Create a Shipment

Cross-border Shipment with Customs Declaration

Book a Pickup


Error Handling

All exceptions extend DhlException. Catch the specific type you care about:


Configuration

Custom HTTP Client

Any PSR-18 compliant client can be injected:

Logging

Pass any PSR-3 logger to capture request and response payloads at debug level. The Authorization header is automatically redacted:

Timeout

Timeout configuration is handled by your PSR-18 HTTP client, not by ClientConfig. When using the default Guzzle client, pass a configured instance via the DhlClient constructor:


Development

Setup

Make Targets

Command Description
make test Run PHPUnit unit suite
make test-integration Run integration tests (requires env vars below)
make analyse PHPStan on src/ (level max)
make analyse-all PHPStan on src/ and tests/
make cs-fix Fix code style
make cs-check Check style without modifying
make check Tests + full analysis + style check
make shell Shell inside container

Integration Tests

Integration tests hit the real DHL Express sandbox. To run them locally:

In GitHub Actions, the nightly Integration Tests workflow needs the same three values configured under repo settings — but split between Secrets and Variables:

The account number is stored as a variable rather than a secret because workflow if: conditions can read variables but not secrets — that lets the workflow skip cleanly on forks where credentials aren't configured.


License

MIT — see LICENSE.


All versions of dhl-express-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
psr/log Version ^3.0
php-http/discovery Version ^1.20
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package medzuch/dhl-express-php contains the following files

Loading the files please wait ...