Download the PHP package dpdconnect/php-sdk without Composer
On this page you can find all versions of the php package dpdconnect/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-sdk
DPD Connect PHP SDK
Connect your PHP application to DPD shipping services.
Create shipments, generate labels, find Parcelshop pickup points, and track parcels — all via a clean, dependency-free PHP library.
Features · Requirements · Installation · Quick Start · Documentation · Development
📦 Features
🚚 Shipment Creation
| Feature | Description |
|---|---|
| Synchronous | Create shipments and receive labels in a single request |
| Asynchronous | Submit large batches and poll for completion via the Job resource |
| Batch creation | Send multiple shipment orders in one call |
| Array or objects | Build requests as plain arrays or typed domain objects |
| Request mapping | Built-in mapper converts Magento/custom requests to API objects |
🏷️ Label Generation
| Feature | Description |
|---|---|
| PDF labels | Standard A4 and A6 paper formats |
| ZPL labels | Thermal printer language support |
| Print offsets | Configurable vertical and horizontal offsets |
| Parcel label number | Optionally pre-assign label numbers |
🏪 Parcelshop Lookup
| Feature | Description |
|---|---|
| Geolocation search | Find parcelshops by longitude, latitude and country |
| Lookup by ID | Retrieve a specific parcelshop by its DPD ID |
| Result limiting | Control the number of results returned |
📬 Parcel Tracking
| Feature | Description |
|---|---|
| Status tracking | Retrieve current parcel status by parcel ID |
| Label retrieval | Fetch a label for an existing parcel by ID |
| Async job polling | Check the state of asynchronous shipment creation jobs |
🔐 Authentication
| Feature | Description |
|---|---|
| Password auth | Authenticate with username + password — JWT is fetched automatically |
| JWT auth | Provide your own JWT token directly |
| Token caching | Token cached until near expiry (5-minute safety margin) |
| Token callback | Register a callback to persist refreshed tokens externally |
💾 Caching
| Feature | Description |
|---|---|
| Built-in filesystem cache | Countries and products cached for 1 hour with no setup required |
| Stale fallback | Product list falls back to a year-old cached result on API failure |
| Custom backends | Implement CacheInterface to use Redis, Memcached, or any store |
🌍 International Shipping
| Feature | Description |
|---|---|
| Customs declarations | Consignee, consignor, customs lines with HS codes and values |
| Cash on delivery | COD amount, currency and purpose |
| Notifications | Email or SMS delivery notifications for the receiver |
| Pickup configuration | Optional pickup scheduling |
✅ Requirements
| Requirement | Version |
|---|---|
| PHP | >=7.4 |
| ext-json | * |
| ext-curl | * |
No framework dependency. Works standalone in any PHP project.
PHP 7.4 is supported so the DPD PrestaShop 1.7 module can install the SDK. It is end of
life and gets no security updates, so use a supported PHP version where you can. CI
checks the syntax of src/ on 7.4 on every commit, but the test suite runs on 8.1 and
8.5 only; see docs/ci-php-version-matrix.md.
📥 Installation
⚡ Quick Start
1. Build a client
2. Create a shipment
3. Find Parcelshops
4. Track a parcel
5. Use a custom API endpoint
📚 Documentation
| Document | Description |
|---|---|
| Architecture | SDK architecture, HTTP stack, design patterns |
| Authentication | Auth methods, token caching, token callback |
| Resources | All API resources with full method reference |
| Objects | Domain objects and data model reference |
| Exceptions | Exception hierarchy and error handling patterns |
| Caching | Caching system and custom backend guide |
🛠️ Development
Run tests
Code quality
CI Pipeline
The project uses GitLab CI with four stages:
| Stage | Jobs | Description |
|---|---|---|
validate |
composer-validate, composer-audit |
Validates composer.json and checks advisories |
analyse |
phpcs, lint-php74, phplint |
Static analysis; lint-php74 syntax-checks src/ on PHP 7.4, phplint runs on PHP 8.1 and 8.5 |
test |
phpunit |
Full unit test suite on PHP 8.1 and 8.5 |
sync |
sync-to-github |
On a release tag only: mirrors to GitHub and publishes the release |
phplint and phpunit run on PHP 8.1 and 8.5: 8.1 is the floor of the tested range,
and 8.5 catches runtime deprecations no static check sees. The declared floor of 7.4 is
covered separately by lint-php74, which is a syntax check only, because the test
toolchain cannot run on 7.4.
sync-to-github runs on release tags only; the job's own comments explain what it does
and why.
📄 License
OSL-3.0 · © DPD — [email protected]
All versions of php-sdk with dependencies
ext-json Version *
ext-curl Version *