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

ActiveLibrary[API Development](/categories/api)

ginkida/laravel-dpd
===================

DPD API wrapper for Laravel

v1.3.4(3y ago)12MITPHPPHP ^8.0

Since Jul 6Pushed 3y agoCompare

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

READMEChangelog (2)Dependencies (8)Versions (15)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/178b702128001ab3379109a965c0eaffdf3daab6c1c9b442c3985506eed159e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e302e2a2d626c75652e737667)](https://www.php.net)[![Generic badge](https://camo.githubusercontent.com/861f8e14f7cfffe992dc1f6c62d56162712c300532d1271b44607f3d282f29f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d253545382e302d7265642e737667)](https://laravel.com)

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

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

Allows you to:

- Find a City by query string
- Find a Street by City ID and query string
- Find a City that has Receive Points / Terminals
- Find Receive Points / Terminals
- Find Terminals
- Calculate a delivery

No Database required
--------------------

[](#no-database-required)

If you did research of DPD API you must know, that they suppose you to fetch data files with cities, terminals and streets and manage all of it by your own. However, with this package, there is no need for that.

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', null),
'user'       => env('DPD_USER', null),
'login'      => env('DPD_LOGIN', null),
'password'   => env('DPD_PASSWORD', null),
'prefix'     => 'dpd',
'middleware' => ['web']
```

If you only need to use DPDClient, you may completely skip this configuration. Otherwise, you can use default options and specify some data in .env file:

- DPD\_KEY
- DPD\_USER
- DPD\_LOGIN
- DPD\_PASSWORD

To make full use of predefined routes, you will need to publish the config:

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

Now you can change routes prefix and middleware to whatever you need

### Use Case #1

[](#use-case-1)

After installing, you may just import the client

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

Firstly let's initialize and get a session. Session is required for a few methods.

```
/*
    You may find your User ID by entering DPD Cabinet.
    Here we are initializing the client.
*/
$client = new DPDClient('user', 'key');
/*
    Please make sure you understand the diff between login and User.
    We need to get a session, so we are authorizing with login and password
*/
$session = client->authorize('login', 'password);
```

Now we can use these methods:

```
$client->findCity(string $query, string $country)
$client->findCityStreet(int $city, string $query, string $session)
$client->findReceivePointCity(string $query)
$client->getReceivePoints(string $bounds, string $city)
$client->getTerminals(string $bounds, string $city)
/* 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
```

### Use Case #2

[](#use-case-2)

There are some predefined routes, that will be merged with your routes as well. You may check it by using

```
php artisan routes:list
```

It actually exposes the same methods to the routes, so it should be pretty clear on how to use it. For more information on how to use it, please check out `src/` folder.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 54.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 ~61 days

Recently: every ~75 days

Total

12

Last Release

1455d ago

Major Versions

0.1 → v1.3.32022-05-17

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

v1.3.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba0c9aab146070fb40149689ab72d0b97cafc9b8ccb6336848fe9bcc676f71df?d=identicon)[ginkida](/maintainers/ginkida)

---

Top Contributors

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

---

Tags

laraveldpd

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/ginkida-laravel-dpd/health.svg)](https://phpackages.com/packages/ginkida-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)
