Download the PHP package beziworld/laravel-dhl-express without Composer
On this page you can find all versions of the php package beziworld/laravel-dhl-express. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download beziworld/laravel-dhl-express
More information about beziworld/laravel-dhl-express
Files in beziworld/laravel-dhl-express
Package laravel-dhl-express
Short Description DHL Express MyDHL API client for Laravel: shipments with PDF/ZPL labels and commercial invoices, rates, products, tracking with typed events, proof of delivery, pickups and address validation.
License MIT
Homepage https://github.com/beziworld/laravel-dhl-express
Informations about the package laravel-dhl-express
Laravel DHL Express
DHL Express MyDHL API client for Laravel:
- typed shipment builder: shipper, receiver, packages with weight and dimensions or DHL packaging, references, value added services (insurance, duties paid, paperless trade, ...), payer and duties accounts, pickup booking, e-mail notification
- dutiable shipments with an export declaration and a DHL-generated commercial invoice (VAT and EORI numbers included)
- labels in PDF, ZPL, EPL or LP2 and other documents decoded from base64; validation without creating the shipment
- rates and products for a lane, with billing currency prices and estimated delivery
- tracking with typed checkpoints and normalised statuses, up to 200 shipments per call; electronic proof of delivery; customs and waybill images
- pickups (book and cancel), address validation, reference data
- several DHL Express accounts (named connections and
DhlExpress::using()), Laravel events,dhl-express:checkcommand
Polska wersja dokumentacji
DHL Express or DHL Parcel?
DHL Express and DHL Parcel Polska are separate DHL companies with separate contracts, account numbers and APIs.
This package covers DHL Express (the international time-definite courier network, MyDHL API at
express.api.dhl.com, HTTP Basic credentials issued by DHL Express and a DHL Express account number, product codes
such as P, D, U, N). For the Polish domestic parcel network (DHL24 WebAPI, DHL Parcel Polska) use
beziworld/laravel-dhl-parcel. Credentials, labels, tracking
numbers and pickups of the two services are not interchangeable.
Why this package
| Package | API | Laravel 12/13 | Notes |
|---|---|---|---|
korbeil/dhl-express-php-api, sonnenglas/mydhl-php-sdk |
MyDHL REST | not Laravel packages | framework-agnostic SDKs |
dhl/sdk-api-express, dreipunktnull/dhl-express |
legacy SOAP/XML | no | last releases 2018 to 2020 |
elitedevsolution/laravel-dhl-api, jackbayliss/laravel-dhl-api |
legacy XML-PI | no | not maintained |
This package targets MyDHL API 3.4.1 and adds a typed builder, decoded documents, both MyDHL error formats mapped to
one exception, multiple accounts, the Laravel HTTP client (Http::fake() works in your tests), a strict no-retry
policy for writes and Laravel events.
Installation
Check the credentials with a read-only address validation call: php artisan dhl-express:check.
Create a shipment
Store the documents when the shipment is created: MyDHL has no endpoint to print a label again and no endpoint to cancel a shipment (an unused shipment is simply not handed over).
Other builder options: shipper(), plannedAt() (defaults to 15 minutes from now, MyDHL rejects past times),
incoterm(), service($code, ?Money), payer(), dutiesAndTaxesAccount(), requestPickup($closeTime, $location),
withWaybill(), withRateEstimates(), notify($email) and with([...]) for any other root element. validate()
checks the shipment with validateDataOnly=true without creating it; toArray() returns the request body.
Dutiable shipments
Rates and products
Tracking
The test environment only tracks the waybills listed by DHL (for example 9356579890); shipments created in the
test environment are not trackable.
Pickups and addresses
Multiple accounts
Events
ShipmentCreated, PickupScheduled and PickupCancelled (namespace Beziworld\DhlExpress\Events).
Errors
| Exception | When |
|---|---|
ApiException |
MyDHL rejected the request or could not be reached: errorCode() (numeric DHL code from the detail, e.g. 998), detail(), details(), httpStatus(), isValidationError() (400/422), isAuthenticationError(), isNotFound(), isRateLimited() |
InvalidConfiguration |
missing credentials, account number, shipper, receiver, product, description or parcels |
Both extend DhlExpressException. Read-only calls are retried on connection errors and HTTP 5xx
(DHL_EXPRESS_RETRIES); shipments and pickups are never retried automatically.
Development
Author
Created and maintained by Kamil Ćwiertnia, beziworld.eu.
- E-mail: [email protected]
- Issues: GitHub issues
Need an integration? Get in touch through beziworld.eu.
Other packages by the author
laravel-dhl-parcel · laravel-ups · laravel-fedex · laravel-dpd · laravel-inpost
License
MIT. See LICENSE.md. This package is not affiliated with, endorsed or sponsored by DHL or Deutsche Post DHL Group. DHL is a registered trademark of Deutsche Post AG.
All versions of laravel-dhl-express with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.8
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/events Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0