PHPackages                             daika7ana/dpd-php-sdk - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. daika7ana/dpd-php-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

daika7ana/dpd-php-sdk
=====================

Typed PHP SDK for the DPD Romania API.

v1.0.0(1mo ago)01↓87.5%GPL-3.0-or-laterPHPPHP &gt;=8.3CI passing

Since Jun 2Pushed 1mo agoCompare

[ Source](https://github.com/daika7ana/dpd-php-sdk)[ Packagist](https://packagist.org/packages/daika7ana/dpd-php-sdk)[ RSS](/packages/daika7ana-dpd-php-sdk/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

DPD PHP SDK
===========

[](#dpd-php-sdk)

[![CI](https://github.com/daika7ana/dpd-php-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/daika7ana/dpd-php-sdk/actions/workflows/ci.yml)[![PHP 8.3+](https://camo.githubusercontent.com/c55b9100c1ce5e9fbbfffdfe87d57ea6bfbae24b094fb12a25236b89411fd99b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://www.php.net/)[![PHPUnit](https://camo.githubusercontent.com/8e2629b3de4beefd470f82be6adc3212fa1957a144c66814fac234ed46bbd82e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f504850556e69742d31322e782d3041374242423f7374796c653d666c61742d737175617265)](docs/TESTING.md)[![PHPStan](https://camo.githubusercontent.com/e7017aab2bc8608827a6b38d22f4ab1b1f7bfaaaa2d15d5383a009e5a60b295b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d322e782d3643343345303f7374796c653d666c61742d737175617265)](docs/TESTING.md)[![Smoke Tests](https://camo.githubusercontent.com/fee9224a9d7e9f0be26fa528f7b2d8d38147ced8da8abe92b11bba97d1a90e1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536d6f6b6525323054657374732d4c6976652532304150492d6f72616e67653f7374796c653d666c61742d737175617265)](docs/TESTING.md)[![PSR Standards](https://camo.githubusercontent.com/6fc0261a04d0e205fb94da2b6f36731b4a760d541422d8891fb01d1e6533a955/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d37253246313725324631382d626c75653f7374796c653d666c61742d737175617265)](https://www.php-fig.org/)[![License](https://camo.githubusercontent.com/2be05c1ee647f7bcb4f547df19cc78f192a840670c62767563f0e2b3b6e52c0c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d332e302d2d6f722d2d6c617465722d677265656e3f7374796c653d666c61742d737175617265)](https://spdx.org/licenses/GPL-3.0-or-later.html)

A modern, type-safe PHP SDK for the **DPD Romania API**

> 🚀 Framework-agnostic, DPD-credential-based, fully typed with DTOs, and built for production integrations.

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Configuration](#configuration)
- [Authentication](#authentication)
- [Supported Resources](#supported-resources)
- [Operational Notes](#operational-notes)
- [Testing](#testing)
- [Documentation](#documentation)

Features
--------

[](#features)

### Core Strengths

[](#core-strengths)

- ✅ **Fully Typed DTOs** — Explicit request and response objects across the implemented API surface
- ✅ **Immutable Client Configuration** — Optional environment bootstrapping without mutable runtime defaults
- ✅ **PSR-18 HTTP Client** — Guzzle wired by default with custom client seams when needed
- ✅ **Mixed Response Handling** — Shared JSON, binary, and CSV support for DPD's rough edges
- ✅ **Typed Exception Mapping** — Transport, authentication, validation, and API failures are separated cleanly
- ✅ **Reference-Data Caching** — Optional caching for CSV-backed location imports
- ✅ **Batching Helpers** — Explicit support for capped flows such as batched tracking and bulk hydration

### Good Fit For

[](#good-fit-for)

- 🎯 Laravel applications or any PHP framework
- 🎯 Standalone PHP services and worker processes
- 🎯 Integrations that need explicit shipment and location payloads instead of raw arrays
- 🎯 Teams that want predictable local verification through unit tests, static analysis, and smoke checks

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

[](#requirements)

- **PHP 8.3+**
- PSR-7, PSR-17, and PSR-18 compatible environment

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

[](#installation)

### Via Composer

[](#via-composer)

```
composer require daika7ana/dpd-php-sdk
```

Quick Start
-----------

[](#quick-start)

```
use Daika7ana\Dpd\Client;
use Daika7ana\Dpd\Config\ClientConfig;

$client = Client::create(
    config: new ClientConfig(
        username: 'demo-user',
        password: 'demo-password',
        language: 'RO',
    ),
);

$services = $client->services()->list();

foreach ($services as $service) {
    echo $service->nameEn . PHP_EOL;
}
```

For a full end-to-end walkthrough, continue with [docs/QUICKSTART.md](docs/QUICKSTART.md) or the shorter [docs/EXAMPLES.md](docs/EXAMPLES.md).

Configuration
-------------

[](#configuration)

`ClientConfig` keeps connection settings explicit and immutable:

- `baseUrl`
- `username`
- `password`
- `language`
- `clientSystemId`
- `timeout`
- `connectTimeout`

Use `ClientConfig::fromEnvironment()` when you want configuration to come from environment variables instead of application code.

Authentication
--------------

[](#authentication)

DPD uses static credentials on every request payload instead of OAuth.

The client injects these values automatically:

- `userName`
- `password`
- `language`
- `clientSystemId` when configured

For multi-tenant or rotating-credential setups, you can inject a custom credentials provider into `Client::create()`.

Supported Resources
-------------------

[](#supported-resources)

- `services()` for service catalog and destination-aware service discovery
- `shipments()` for create, cancel, update, lookup, barcode, add-parcel, and handover flows
- `locations()` for detail lookups, capped searches, nearest-office search, and CSV-backed reference data
- `printing()` for PDF or ZPL labels, extended print metadata, and vouchers
- `tracking()` for direct tracking, batched tracking, and bulk tracking file discovery
- `pickup()`, `validation()`, `calculations()`, `clients()`, and `payments()` for the remaining operational endpoints

Operational Notes
-----------------

[](#operational-notes)

- DPD credentials are attached to every request payload, so request logging should always be treated as sensitive.
- Printing endpoints may return binary documents on success and JSON errors on failure. Use `printing()` or `sendBinary()` for those flows.
- Location search endpoints are capped by DPD. Use `find*()` for interactive lookup and `all*()` for full CSV-backed datasets.
- `tracking()->track()` keeps the upstream 10-parcel limit visible. Use `trackBatched()` when you want explicit chunking.
- Non-ASCII address data may still be affected by legacy transliteration rules in DPD label and back-office tooling. Validate with real labels before rollout.

Testing
-------

[](#testing)

### Run The Local Verification Pipeline

[](#run-the-local-verification-pipeline)

```
composer ci
```

### Run Smoke Tests Against A Live DPD Account

[](#run-smoke-tests-against-a-live-dpd-account)

```
composer test:smoke
```

`composer ci` runs formatting, static analysis, and the unit suite. Smoke tests skip automatically when the required environment values are missing.

Documentation
-------------

[](#documentation)

Complete guides and references:

GuidePurpose🔧 [Installation](docs/INSTALLATION.md)Setup and transport expectations⚙️ [Configuration](docs/CONFIGURATION.md)Connection settings and extension points🔐 [Authentication](docs/AUTHENTICATION.md)DPD credential flow and provider options📖 [Quick Start](docs/QUICKSTART.md)First working client, shipment, print, and tracking flow🧩 [Examples](docs/EXAMPLES.md)Small, consistent workflow examples📚 [Usage](docs/USAGE.md)Workflow guidance and integration patterns🔗 [Resources](docs/RESOURCES.md)Method-level public API reference📦 [DTOs](docs/DTOS.md)DTO conventions and domain structure❌ [Errors](docs/ERRORS.md)Exception hierarchy and handling✅ [Testing](docs/TESTING.md)Unit, smoke, and release verification---

Made with ❤️

**Questions?** [Check the docs](docs/USAGE.md) or [open an issue](../../issues)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

52d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11703528?v=4)[Dan-Radu Pana](/maintainers/daika7ana)[@daika7ana](https://github.com/daika7ana)

---

Top Contributors

[![daika7ana](https://avatars.githubusercontent.com/u/11703528?v=4)](https://github.com/daika7ana "daika7ana (9 commits)")

---

Tags

apisdkpsr-18shippingcourierdpd

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/daika7ana-dpd-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/daika7ana-dpd-php-sdk/health.svg)](https://phpackages.com/packages/daika7ana-dpd-php-sdk)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k543.5M2.7k](/packages/aws-aws-sdk-php)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

36789.4k2](/packages/telnyx-telnyx-php)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k46](/packages/neuron-core-neuron-ai)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)

PHPackages © 2026

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