PHPackages                             sergeevpasha/laravel-dpd - 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. sergeevpasha/laravel-dpd

ActiveLibrary[API Development](/categories/api)

sergeevpasha/laravel-dpd
========================

Tiny DPD API wrapper for Laravel

v2.0.3(2y ago)11.8k↓50%2[3 PRs](https://github.com/sergeevpasha/laravel-dpd/pulls)MITPHPPHP ^8.0

Since Jul 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sergeevpasha/laravel-dpd)[ Packagist](https://packagist.org/packages/sergeevpasha/laravel-dpd)[ RSS](/packages/sergeevpasha-laravel-dpd/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (17)Used By (0)

[![Maintainability](https://camo.githubusercontent.com/dcccd1169003808d43b6e911e37a5d0a2624d7bd38dedc9297fab384df1d5dbe/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35326561383563636662633764373764656531302f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/sergeevpasha/laravel-dpd/maintainability)[![Test Coverage](https://camo.githubusercontent.com/55bb9ee7d9fc42a1e6676801a2166074e4c2b67b6dfd37b7f4438bc612f3aec9/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f35326561383563636662633764373764656531302f746573745f636f766572616765)](https://codeclimate.com/github/sergeevpasha/laravel-dpd/test_coverage)[![CodeFactor](https://camo.githubusercontent.com/c9d5c8245f05b7f0ac1b6e98201773b73126cfd24ee28c0c2c0355d720c1e2af/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f7365726765657670617368612f6c61726176656c2d6470642f6261646765)](https://www.codefactor.io/repository/github/sergeevpasha/laravel-dpd)[![Generic badge](https://camo.githubusercontent.com/71e4c6c99277aa5d7db5de1dc213c756c2809b9179f16af7ab0950db7615fc49/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302e302d626c75652e737667)](https://www.php.net)[![Generic badge](https://camo.githubusercontent.com/039819db2c3096cdffa1dd49f831e01efc0591599768d8582eeacc84dce1f89b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d253545382e34302e302d7265642e737667)](https://laravel.com)

IMPORTANT UPDATE
================

[](#important-update)

DPD made lots of changes, so the best way I see it is having DPD API as a service, so starting from now on this package will have only a few basic functionality required for it, consider using it (will be available later) instead.

Laravel DPD API Wrapper
=======================

[](#laravel-dpd-api-wrapper)

Allows you to:

- Get all DPD cities
- Get all DPD Terminals
- Calculate a delivery

Pre-requirements
----------------

[](#pre-requirements)

You need to get DPD API key, user, login and password. Key can be obtained in your cabinet at

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

[](#installation)

```
composer require sergeevpasha/laravel-dpd
```

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

[](#configuration)

This package has a few configuration values:

```
'key'        => env('DPD_KEY'),
'user'       => env('DPD_USER'),
'login'      => env('DPD_LOGIN'),
'password'   => env('DPD_PASSWORD'),
'prefix'     => 'dpd',
'middleware' => ['web']
```

```
php artisan vendor:publish --provider="SergeevPasha\DPD\Providers\DPDServiceProvider" --tag="config"
```

After installing, you may just import the client

```
use SergeevPasha\DPD\Libraries\DPDClient;
```

```
/*
    You may find your User ID by entering DPD Cabinet.
    Here we are initializing the client.
*/
$client = new DPDClient('user', 'key');
```

Now we can use these methods:

```
$client->getCountryCities(string $country)
$client->getTerminals()
$client->findByTrackNumber(string $trackNumber)
/* This one requires a Delivery Object, see next to see how to build it */
$client->getPrice(Delivery $delivery)
```

Delivery Object
---------------

[](#delivery-object)

To build a Delivery object you will need to pass an array to fromArray() method just like that:

```
Delivery::fromArray([
    arrival_city_id     => 123456, // Arrival City ID from findCity() method
    derival_city_id     => 123456, // Derival City ID from findCity() method
    arrival_terminal    => 1, // Set 1 if you are delivering to terminal
    derival_terminal    => 0, // Set 1 if you send from terminal
    parcel_total_weight => 20, // Total parcel weight, KG
    parcel_total_volume => 0.5, // Total parcel volume, M3
    parcel_total_value  => 1000500.50, // Total parcel volume, RUB
    pickup_date         => 2020-10-10, // YYYY-MM-DD Format, when your parcel should be picked up for delivery
    max_delivery_days   => 15, // Show only options that can be delivered for that or less amount of days
    max_delivery_price  => 1000.10, // Show only options that costs that or less price
    services => [
        'ECU',
        'CUR'
    ], // List of available services
])
```

Available countries
-------------------

[](#available-countries)

If you need to specify a country you need to use one of these codes:

```
RU - Russia
KZ - Kazakhstan
AM - Armenia
BY - Belarus
KG - Kyrgyzstan
```

Available services
------------------

[](#available-services)

If you need to specify a service you need to use one of these codes:

```
BZP = '18:00';
ECN - ECONOMY
ECU - ECONOMY CU
CUR - CLASSIC
NDY - EXPRESS
CSM - Online Express
PCL - OPTIMUM
PUP - SHOP
DPI - CLASSIC international IMPORT
DPE - CLASSIC international EXPORT
MAX - MAX domestic
MXO - Online Max
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 62.5% 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 ~104 days

Recently: every ~194 days

Total

13

Last Release

877d ago

Major Versions

v1.3.2 → v2.0.02022-06-12

PHP version history (2 changes)v1.0.0PHP ^7.4

v1.3.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/978bd841bc42fd031fb568f25fd9d48f9a565770818a646c73f3801263bb7e21?d=identicon)[sergeevpasha](/maintainers/sergeevpasha)

---

Top Contributors

[![sergeevpasha](https://avatars.githubusercontent.com/u/30777415?v=4)](https://github.com/sergeevpasha "sergeevpasha (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")

---

Tags

laraveldpd

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sergeevpasha-laravel-dpd/health.svg)

```
[![Health](https://phpackages.com/badges/sergeevpasha-laravel-dpd/health.svg)](https://phpackages.com/packages/sergeevpasha-laravel-dpd)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)[spinen/laravel-clickup

SPINEN's Laravel Package for ClickUp.

282.2k](/packages/spinen-laravel-clickup)

PHPackages © 2026

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