PHPackages                             fzsombor/plentymarkets-rest-client - 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. fzsombor/plentymarkets-rest-client

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

fzsombor/plentymarkets-rest-client
==================================

REST Client for Plentymarkets

0.1.7(6y ago)05MITPHPPHP &gt;=5.6.0

Since Apr 2Pushed 6y agoCompare

[ Source](https://github.com/fzsombor/plentymarkets-rest-client)[ Packagist](https://packagist.org/packages/fzsombor/plentymarkets-rest-client)[ Docs](https://github.com/repat/plentymarkets-rest-client)[ RSS](/packages/fzsombor-plentymarkets-rest-client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (8)Used By (0)

plentymarkets-rest-client
=========================

[](#plentymarkets-rest-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/847386aa5e16378e81714978d8b85041d171aa2724f3c286b66b8cb5494c3716/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72657061742f706c656e74796d61726b6574732d726573742d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/repat/plentymarkets-rest-client)[![Total Downloads](https://camo.githubusercontent.com/6619c4c2980082f31066ee1cc70c53a5cff01003550a79369cd4be7c0a215c3f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72657061742f706c656e74796d61726b6574732d726573742d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/repat/plentymarkets-rest-client)

This is a PHP package for Plentymarkets new REST API. The API is relatively new (March 2017), so not everything might work correctly and this package might also be out of date at some point.

I'm not in anyway affiliated with Plentymarkets, nor do I get paid for this by anybody. As it says in the license, this software is 'as-is'. If you want/need more features, open a GitHub ticket or write a pull request. I'll do my best :) That said, I don't work for the company I developed this for anymore, so if you have any interest in becoming a contributor on this repo, let me know.

You can find the Plentymarkets documentation [here](https://developers.plentymarkets.com/):

### Overview

[](#overview)

- Functions for the 4 HTTP verbs: GET, POST, PUT, DELETE
- Automatic login and refresh if login is not valid anymore
- Simple one-time configuration with PHP array (will be saved serialized in a file)
- Functions return an associative array
- Handle rate limiting (thanks [hepisec](http://github.com/hepisec))

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

[](#installation)

Available via composer on [Packagist](https://packagist.org/packages/repat/plentymarkets-rest-client):

`composer require repat/plentymarkets-rest-client`

Usage
-----

[](#usage)

```
use repat\PlentymarketsRestClient\PlentymarketsRestClient;

// path to store the configuration in
$configFilePath = ".plentymarkets-rest-client.config.php";
// $config only has to be set once like this
$config = [
    "username" => "PM_USERNAME",
    "password" => "PM_PASSWORD",
    "url" => "https://www.plentymarkets-system.tld",
];

$client = new PlentymarketsRestClient($configFilePath, $config);

// After that just use it like this:
$client = new PlentymarketsRestClient($configFilePath);
```

It's possible to use the 4 HTTP verbs like this

```
$client->get($path, $parameterArray);
$client->post($path, $parameterArray);
$client->put($path, $parameterArray);
$client->delete($path, $parameterArray);

// $parameterArray has to be a PHP array. It will be transformed into JSON automatically in case
// of POST, PUT and DELETE or into query parameters in case of GET.
// You don't _have_ to specify it, it will then just be empty
$parameterArray = [
    "createdAtFrom" => "2016-10-24T13:33:23+02:00"
];

// $path is the path you find in the Plentymarkets documentation
$path = "rest/orders/";
```

It's also possible to use the function like this. It gives you more freedom, since you can specify the method and the $parameters given are directly given to the [guzzle object](http://docs.guzzlephp.org/en/latest/quickstart.html).

```
$client->singleCall("GET", $guzzleParameterArray);
```

### Errors

[](#errors)

- If there was an error with the call (=&gt; guzzle throws an exception) all functions will return false
- If the specified config file doesn't exist or doesn't include username/password/url, an exception will be thrown

TODO
----

[](#todo)

- Refresh without new login but refresh-token

Dependencies
------------

[](#dependencies)

- [https://packagist.org/packages/nesbot/carbon](nesbot/carbon) for date comparison
- [https://packagist.org/packages/guzzlehttp/guzzle](guzzlehttp/guzzle) for HTTP calls.
- [https://packagist.org/packages/danielstjules/stringy](danielstjules/stringy) for string comparisons

License
-------

[](#license)

- see [LICENSE](https://github.com/repat/plentymarkets-rest-client/blob/master/LICENSE) file

Changelog
---------

[](#changelog)

- 0.1.7 Fix constructor according to README (thx [daniel-mannheimer](https://github.com/repat/plentymarkets-rest-client/pull/11))
- 0.1.6 Support for HTTP `PATCH` (thx [hepisec](https://github.com/repat/plentymarkets-rest-client/pull/10))
- 0.1.5 Remove check for `www.` as it breaks subdomains (thx [daniel-mannheimer](https://github.com/repat/plentymarkets-rest-client/pull/9))
- 0.1.4 Automatic rate limiting (thx [hepisec](https://github.com/repat/plentymarkets-rest-client/pull/8))
- 0.1.3 Fix PHP 7.2 dependency
- 0.1.2 Fix Carbon dependency
- 0.1.1 Update Guzzle for PHP 7.2
- 0.1 initial release

Contact
-------

[](#contact)

- Homepage:
- e-mail:
- Twitter: [@repat123](https://twitter.com/repat123 "repat123 on twitter")

[![Flattr this git repo](https://camo.githubusercontent.com/7e3f46a36526479d701ef7f90a0f8c3ac2fbab3087446e2a9fceed75cd1ab802/687474703a2f2f6170692e666c617474722e636f6d2f627574746f6e2f666c617474722d62616467652d6c617267652e706e67)](https://flattr.com/submit/auto?user_id=repat&url=https://github.com/repat/plentymarkets-rest-client&title=plentymarkets-rest-client&language=&tags=github&category=software)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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 ~87 days

Recently: every ~124 days

Total

7

Last Release

2437d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84e22bc101569c76933e807fea96418e96be1ad179c2e0a9081d3064d708f23a?d=identicon)[fzsombor](/maintainers/fzsombor)

---

Top Contributors

[![repat](https://avatars.githubusercontent.com/u/516807?v=4)](https://github.com/repat "repat (21 commits)")[![daniel-mannheimer](https://avatars.githubusercontent.com/u/1114328?v=4)](https://github.com/daniel-mannheimer "daniel-mannheimer (6 commits)")[![fzsombor](https://avatars.githubusercontent.com/u/12544038?v=4)](https://github.com/fzsombor "fzsombor (5 commits)")[![hepisec](https://avatars.githubusercontent.com/u/15111012?v=4)](https://github.com/hepisec "hepisec (3 commits)")

---

Tags

apiclientsdkrestPlentymarketspm

### Embed Badge

![Health badge](/badges/fzsombor-plentymarkets-rest-client/health.svg)

```
[![Health](https://phpackages.com/badges/fzsombor-plentymarkets-rest-client/health.svg)](https://phpackages.com/packages/fzsombor-plentymarkets-rest-client)
```

###  Alternatives

[repat/plentymarkets-rest-client

REST Client for Plentymarkets

1510.0k](/packages/repat-plentymarkets-rest-client)[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.3M14](/packages/xeroapi-xero-php-oauth2)[cybercog/youtrack-rest-php

YouTrack REST API PHP Client.

37149.2k3](/packages/cybercog-youtrack-rest-php)[artesaos/laravel-linkedin

Linkedin API integration for Laravel and Lumen 5

5666.5k](/packages/artesaos-laravel-linkedin)[cristianpontes/zoho-crm-client-php

Provides a clean readable PHP API to the Zoho Rest API

5554.0k](/packages/cristianpontes-zoho-crm-client-php)

PHPackages © 2026

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