Download the PHP package sonnenglas/dhl-parcel-de-sdk without Composer

On this page you can find all versions of the php package sonnenglas/dhl-parcel-de-sdk. 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-parcel-de-sdk

DHL Parcel DE SDK

A PHP SDK for interacting with the DHL Parcel DE Shipping API (Post & Parcel Germany). This package allows you to easily create shipments, print labels, and manage shipments through the DHL API.

PHP Version

Installation

You can install the package via composer:

Requirements

Features

Usage

Initialization

Creating a Shipment

DHL Packstation Support

The SDK supports DHL Packstation deliveries, allowing customers to receive packages at automated parcel stations throughout Germany.

What is a Packstation?

DHL Packstations are automated parcel stations where customers can receive and send packages 24/7. They are located throughout Germany and provide a convenient alternative to home delivery.

Requirements for Packstation Delivery

To send a package to a DHL Packstation, you need:

  1. Packstation ID - A 3-digit number (100-999) identifying the specific packstation
  2. Customer's DHL Account Number (Postnummer) - A 6-10 digit number that customers receive when they register for DHL services
  3. Packstation Location - The postal code and city where the packstation is located
  4. Customer Name - The name of the person who will collect the package

Creating a Packstation Address

Complete Packstation Shipment Example

Packstation Validation Rules

The SDK validates packstation addresses according to DHL requirements:

API Format

The SDK automatically converts packstation addresses to the correct DHL API format:

Packstation Address (Locker format):

Regular Address (ContactAddress format):

Finding Packstations

Customers can find nearby packstations using:

Customer Registration

Customers need to register for DHL services to get their Postnummer (customer number):

The Postnummer is required for all packstation deliveries and is unique to each customer.

Deleting a Shipment

Using a Custom Profile

Setting Label Format

Complete Example

Here's a complete example showing how to use the SDK to create a shipment:

Available Products

The SDK supports the following DHL products:

House Number Field (addressHouse)

Since v2.5.0 Address accepts an optional addressHouse argument that maps to DHL's dedicated house-number field on ContactAddress:

For the Parcel DE Returns API the separated form is mandatory — concatenating the number into addressStreet causes DHL to respond with 400 "Please add your data in the field 'Number'.". The Shipping API is more lenient and accepts both forms, but using addressHouse is recommended.

addressHouse is silently ignored for Packstation/Locker addresses.

Error Handling

The SDK provides several ways to handle errors:

  1. Exceptions are thrown for critical errors
  2. The getLastErrorResponse() method provides detailed error messages from the DHL API
  3. The getLastRawResponse() method returns the complete API response for debugging

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Credits

Built and maintained by Przemek Peron.

License

The MIT License (MIT). Please see License File for more information.


All versions of dhl-parcel-de-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
guzzlehttp/guzzle Version ^7.12.1
league/iso3166 Version ^4.3
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 sonnenglas/dhl-parcel-de-sdk contains the following files

Loading the files please wait ...