{"id":41241301,"url":"https://github.com/msztorc/php-dpd-api","last_synced_at":"2026-01-23T01:18:56.399Z","repository":{"id":54068817,"uuid":"85357264","full_name":"msztorc/php-dpd-api","owner":"msztorc","description":"DPD Polska - API wrapper","archived":false,"fork":false,"pushed_at":"2021-03-09T19:47:13.000Z","size":21,"stargazers_count":20,"open_issues_count":3,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-22T23:59:15.782Z","etag":null,"topics":["dpd","dpd-poland","php","sdk"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msztorc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-17T21:45:50.000Z","updated_at":"2025-09-06T19:32:14.000Z","dependencies_parsed_at":"2022-08-13T06:21:10.581Z","dependency_job_id":null,"html_url":"https://github.com/msztorc/php-dpd-api","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/msztorc/php-dpd-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msztorc%2Fphp-dpd-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msztorc%2Fphp-dpd-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msztorc%2Fphp-dpd-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msztorc%2Fphp-dpd-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msztorc","download_url":"https://codeload.github.com/msztorc/php-dpd-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msztorc%2Fphp-dpd-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dpd","dpd-poland","php","sdk"],"created_at":"2026-01-23T01:18:55.733Z","updated_at":"2026-01-23T01:18:56.390Z","avatar_url":"https://github.com/msztorc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-dpd-api\n\nSet of PHP classes to handle API of courier services (DPD Poland)\n\n[![Build Status](https://travis-ci.org/msztorc/php-dpd-api.svg?branch=master)](https://travis-ci.org/msztorc/php-dpd-api)\n[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](http://www.opensource.org/licenses/MIT)\n\n## Installation\n\n```\ncomposer require msztorc/php-dpd-api\n```\nor\n```\ngit clone https://github.com/msztorc/php-dpd-api.git\n```\nof course you can also download zip file, unpack and include to your project\n\n\n### Configuration file\n\nMain configuration is located in `config.php` file\n\n```\n'fid' =\u003e '1495',\n'username' =\u003e 'test', // username for api calls\n'password' =\u003e 'KqvsoFLT2M', // password for api calls\n'wsdl' =\u003e 'https://dpdservicesdemo.dpd.com.pl/DPDPackageObjServicesService/DPDPackageObjServices?WSDL', \n'lang_code' =\u003e 'PL', // lang code (required for api v2)\n'api_version' =\u003e 2, // version of api methods (available api version: 1 or 2)\n'debug' =\u003e true, // debug errors to logfile\n'log_path' =\u003e 'logs' // path of log files\n```\n\n### Usage\n\n**Full example**\n\n```php\n\u003c?php\n\nuse DPD\\Services\\DPDService;\n\n$sender = [\n    'fid' =\u003e '1495',\n    'name' =\u003e 'Janusz Biznesu',\n    'company' =\u003e 'INCO',\n    'address' =\u003e 'Chmielna 10',\n    'city' =\u003e 'Warszawa',\n    'postalCode' =\u003e '00999',\n    'countryCode' =\u003e 'PL',\n    'email'=\u003e 'biuro@_inco.pl',\n    'phone' =\u003e '+22123456',\n];  \n\n$dpd = new DPDService();\n$dpd-\u003esetSender($sender);\n\n$parcels = [\n    0 =\u003e [\n        'content' =\u003e 'antyramy',\n        'customerData1' =\u003e 'Uwaga szkło!',\n        'weight' =\u003e 8,\n    ],\n    1 =\u003e [\n        'content' =\u003e 'ulotki',\n        'weight' =\u003e 5,\n    ],\n];\n\n$receiver = [\n    'company' =\u003e 'ABC Sp. z o.o.',\n    'name' =\u003e 'Jan Kowalski',\n    'address' =\u003e 'Wielicka 10',\n    'city' =\u003e 'Krakow',\n    'postalCode' =\u003e '30552',\n    'countryCode' =\u003e 'PL',\n    'phone' =\u003e '+12 555221112',\n    'email'=\u003e 'biuro@a_b_c.pl',\n];\n\n//send a package\n$result = $dpd-\u003esendPackage($parcels, $receiver, 'SENDER');\n\n$pickupAddress = [\n    'fid' =\u003e '1495',\n    /*'name' =\u003e 'Janusz Biznesu',\n    'company' =\u003e 'INCO',\n    'address' =\u003e 'Chmielna 10',\n    'city' =\u003e 'Warszawa',\n    'postalCode' =\u003e '00999',\n    'countryCode' =\u003e 'PL',\n    'email'=\u003e 'biuro@_inco.pl',\n    'phone' =\u003e '+22123456',*/\n];\n \n// generate speedlabel in default, pdf/a4 format\n$speedlabel = $dpd-\u003egenerateSpeedLabelsByPackageIds([$result-\u003epackageId], $pickupAddress);\n\n// save speedlabel to pdf file\nfile_put_contents('pdf/slbl-pid' . $result-\u003epackageId . '.pdf', $speedlabel-\u003efiledata);\n\n// generate protocol\n$protocol = $dpd-\u003egenerateProtocolByPackageIds([$result-\u003epackageId], $pickupAddress);\n\n// save protocol to pdf file\nfile_put_contents('pdf/prot-pid' . $result-\u003epackageId . '.pdf', $protocol-\u003efiledata);\n\n\n// pickup\n\n$pickupDate = '2017-08-23';\n$pickupTimeFrom = '13:00';\n$pickupTimeTo = '16:00';\n\n$contactInfo = [\n    'name' =\u003e 'Janusz Biznesu',\n    'company' =\u003e 'INCO',\n    'phone' =\u003e '12 5555555',\n    'email' =\u003e 'januszbiznesu@_inco.pl',\n    'comments' =\u003e 'proszę dzownić domofonem'\n\n];\n\n// pickup call\n$pickup = $dpd-\u003epickupRequest([$protocol-\u003edocumentId], $pickupDate, $pickupTimeFrom, $pickupTimeTo, $contactInfo, $pickupAddress);\n\n```\n\n**Postcode verify**\n```php\n\u003c?php\n\nuse DPD\\Services\\DPDService;\n\n$dpd = new DPDService();\n\n$pc1 = $dpd-\u003echeckPostCode('UB3 5HL', 'GB'); //ok\n\n$pc2 = $dpd-\u003echeckPostCode('00-999', 'PL'); //ok\n\n$pc3 = $dpd-\u003echeckPostCode('33 100'); //ok\n\n$pc4 = $dpd-\u003echeckPostCode('33100'); //ok\n\n$pc5 = $dpd-\u003echeckPostCode('00-000'); //wrong\n\n```\n\n\nFor more examples see unit tests\n\n### Notes\nFor current API specification you should contact with IT support of DPD Poland. http://www.dpd.com.pl/\n\n### License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsztorc%2Fphp-dpd-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsztorc%2Fphp-dpd-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsztorc%2Fphp-dpd-api/lists"}