PHPackages                             datalinx/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. [API Development](/categories/api)
4. /
5. datalinx/dpd-php-sdk

ActiveLibrary[API Development](/categories/api)

datalinx/dpd-php-sdk
====================

PHP SDK for DPD Slovenia and Croatia

v0.1.4-alpha(3y ago)163412MITPHPPHP &gt;=7.4

Since Nov 18Pushed 2y ago2 watchersCompare

[ Source](https://github.com/DataLinx/DPD-PHP-SDK)[ Packagist](https://packagist.org/packages/datalinx/dpd-php-sdk)[ Docs](https://github.com/datalinx/dpd-php-sdk)[ RSS](/packages/datalinx-dpd-php-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (7)Used By (2)

PHP SDK for the DPD EasyShip API
================================

[](#php-sdk-for-the-dpd-easyship-api)

[![Packagist PHP Version Support](https://camo.githubusercontent.com/705ff6d0204a0be9cb8f1e49fea8e971f99b0b70e5e0c10e5cb8972d0070c596/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646174616c696e782f6470642d7068702d73646b)](https://camo.githubusercontent.com/705ff6d0204a0be9cb8f1e49fea8e971f99b0b70e5e0c10e5cb8972d0070c596/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646174616c696e782f6470642d7068702d73646b)[![Packagist Version](https://camo.githubusercontent.com/913a2db5f93abf324b27f774b385e27f496b2e43780d22a3e85474bd0ddfb545/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646174616c696e782f6470642d7068702d73646b)](https://packagist.org/packages/datalinx/dpd-php-sdk)[![Packagist Downloads](https://camo.githubusercontent.com/a771c23af6f573f29a43e1fcedb815eb9d740d9649bd82fb5c67214ad64f6c1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646174616c696e782f6470642d7068702d73646b)](https://camo.githubusercontent.com/a771c23af6f573f29a43e1fcedb815eb9d740d9649bd82fb5c67214ad64f6c1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646174616c696e782f6470642d7068702d73646b)[![Tests](https://github.com/DataLinx/DPD-PHP-SDK/actions/workflows/test-runner.yml/badge.svg)](https://github.com/DataLinx/DPD-PHP-SDK/actions/workflows/test-runner.yml)[![codecov](https://camo.githubusercontent.com/84d881c52fdae79cdd42661e8c93f8224a2235af82aaa81024db9fd78f2d191f/68747470733a2f2f636f6465636f762e696f2f67682f446174614c696e782f4450442d5048502d53444b2f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d304e4b525a4331545a4c)](https://codecov.io/gh/DataLinx/DPD-PHP-SDK)[![Conventional Commits](https://camo.githubusercontent.com/9f7a75f0e3af8cca0597d218e8708da4791128679178573a9806a514be52d2eb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6e76656e74696f6e616c253230436f6d6d6974732d312e302e302d2532334645353139363f6c6f676f3d636f6e76656e74696f6e616c636f6d6d697473266c6f676f436f6c6f723d7768697465)](https://conventionalcommits.org)[![Packagist License](https://camo.githubusercontent.com/249227f01fa5265acc5a52c8515d55e066b96a10ece1e590b465a7b6f8baa5b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646174616c696e782f6470642d7068702d73646b)](https://camo.githubusercontent.com/249227f01fa5265acc5a52c8515d55e066b96a10ece1e590b465a7b6f8baa5b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646174616c696e782f6470642d7068702d73646b)

About
-----

[](#about)

This package implements the DPD EasyShip API for Slovenia and Croatia.
It appears each region has its own version, so this will not work for any other country, nor will any other implementation work for Slovenia and Croatia.

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

[](#requirements)

- Supported PHP versions: 7.4 - 8.2
- Supported OS: Linux or Windows
- Required PHP extensions: curl, json

Note: the package works on PHP 8.2, but currently testing in CI for 8.2 fails, because it is still not supported in the [php-vcr](https://php-vcr.github.io/) package, which we use for testing.

Installing
----------

[](#installing)

Download it with composer:

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

Usage
-----

[](#usage)

Currently, only the `ParcelImport` endpoint is implemented.

```
// Set up the API
$dpd = new \DataLinx\DPD\API(getenv('DPD_USERNAME'), getenv('DPD_PASSWORD'), getenv('DPD_COUNTRY_CODE'));

// Prepare the request
$request = new \DataLinx\DPD\Requests\ParcelImport($dpd);
$request->name1 = 'Zdravko Dren';
$request->street = 'Partizanska';
$request->rPropNum = '44';
$request->city = 'Izola';
$request->country = 'SI';
$request->pcode = '6310';
$request->num_of_parcel = 1;
$request->parcel_type = ParcelType::CLASSIC_COD;
$request->cod_amount = 1234.56;
$request->cod_purpose = 'CODREF001';
$request->predict = true;

try {
    $response = $request->send();

    // Get parcel numbers
    $parcel_no = $response->getParcelNumbers();

    // $parcel_no is now an array with parcel numbers, e.g. ["16962023438943"]

} catch (\DataLinx\DPD\Exceptions\ValidationException $exception) {
    // Handle request validation exception
} catch (\DataLinx\DPD\Exceptions\APIException $exception) {
    // Handle API exception
} catch (\Exception $exception) {
    // Handle other exceptions
}
```

Contributing
------------

[](#contributing)

Pull requests for new endpoint implementations are highly welcome.

If you have some suggestions how to make this package better, please open an issue or even better, submit a pull request.

Should you want to contribute, please see the development guidelines in the [DataLinx PHP package template](https://github.com/DataLinx/php-package-template).

### Running tests

[](#running-tests)

By default, the tests run against static fixtures which were captured by the php-vcr package.

If you want to update the fixtures or run the tests against the live (but still testing) API provided by DPD, you need the username and password to run them. You can get them by writing to .

Once you have the credentials, you can set them in `phpunit.xml`.

After that, you also need to set a environment variable with the name `LIVE` and value `1`. This will delete the fixtures before running the tests, which forces live requests to be made.

### Developer resources

[](#developer-resources)

- [DPD EasyShip website](https://easyship.si/login)
- [Webservice User Manual](https://drive.google.com/file/d/1UsbTv-dp7fOdPJwExqo5iyB1ngTnx4Rn/view?usp=share_link) (PDF)

### Changelog

[](#changelog)

All notable changes to this project are automatically documented in the [CHANGELOG.md](CHANGELOG.md) file using the release workflow, based on the [release-please](https://github.com/googleapis/release-please) GitHub action.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

For all this to work, commit messages must follow the [Conventional commits](https://www.conventionalcommits.org/) specification, which is also enforced by a Git hook.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

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

Every ~115 days

Total

5

Last Release

1182d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/131700?v=4)[Omer Sabic](/maintainers/SlimDeluxe)[@SlimDeluxe](https://github.com/SlimDeluxe)

---

Top Contributors

[![SlimDeluxe](https://avatars.githubusercontent.com/u/131700?v=4)](https://github.com/SlimDeluxe "SlimDeluxe (46 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

apidpdeasyshipphpphpapisdkwebserviceeasyshipdpdSloveniacroatiahrvatskaslovenija

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)[clever/clever-php

231.6k](/packages/clever-clever-php)

PHPackages © 2026

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