PHPackages                             macropage/plentyone-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. macropage/plentyone-php-sdk

ActiveLibrary[API Development](/categories/api)

macropage/plentyone-php-sdk
===========================

PlentyOne REST API SDK based on Saloon PHP

04PHP

Since Mar 27Pushed 1mo agoCompare

[ Source](https://github.com/michabbb/plentyone-php-sdk)[ Packagist](https://packagist.org/packages/macropage/plentyone-php-sdk)[ RSS](/packages/macropage-plentyone-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PlentyOne PHP SDK
=================

[](#plentyone-php-sdk)

A lightweight PHP SDK for the [PlentyONE REST API](https://developers.plentymarkets.com), built on [Saloon PHP v3](https://docs.saloon.dev).

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

[](#requirements)

- PHP 8.2+
- Composer

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

[](#installation)

```
composer require macropage/plentyone-php-sdk
```

Quick Start
-----------

[](#quick-start)

```
use PlentyOne\PlentyOneConnector;

$connector = new PlentyOneConnector('https://your-instance.plentymarkets.com/rest');
$connector->login('username', 'password');

// Find a variation by SKU
$response = $connector->variations()->find('YOUR-SKU');
$variation = $response->json('entries.0');

// Get all images for an item
$images = $connector->images()->forItem($variation['itemId'])->json();
```

Authentication
--------------

[](#authentication)

The SDK handles Bearer token authentication automatically. After calling `login()`, the token is stored in memory and sent with every request. If the token expires (24h), the SDK re-authenticates automatically before the next request.

```
$connector = new PlentyOneConnector('https://your-instance.plentymarkets.com/rest');
$connector->login('username', 'password');

// All subsequent calls are authenticated
```

Supported API Calls
-------------------

[](#supported-api-calls)

### Variations

[](#variations)

MethodDescriptionAPI Endpoint`variations()->find(string $numberExact)`Find variation by SKU`GET /rest/items/variations?numberExact=...``variations()->get(int $itemId, int $variationId, ?string $with)`Get a specific variation`GET /rest/items/{id}/variations/{varId}``variations()->list(array $filters)`List variations with filters`GET /rest/items/variations``variations()->documents(int $itemId, int $variationId)`Get file-type properties (documents)`GET /rest/items/{id}/variations/{varId}``variations()->addDocument(int $itemId, int $variationId, int $propertyId, string $fileUrl)`Add or update a document`POST/PUT /rest/properties/relations``variations()->removeDocument(int $itemId, int $variationId, int $propertyId)`Remove a document`DELETE /rest/properties/relations/{id}`**Available filters for `list()`:** `numberExact`, `id`, `isActive`, `page`, `itemsPerPage`, `categoryId`, `isMain`, `with`

### Images

[](#images)

MethodDescriptionAPI Endpoint`images()->forItem(int $itemId)`Get all images of an item`GET /rest/items/{id}/images``images()->forVariation(int $itemId, int $variationId)`Get variation image links`GET /rest/.../variation_images``images()->upload(...)`Upload an image (via URL or base64)`POST /rest/items/{id}/images/upload``images()->updatePosition(int $itemId, int $imageId, int $position)`Change image sort order`PUT /rest/items/{id}/images/{imgId}``images()->delete(int $itemId, int $imageId)`Delete an image`DELETE /rest/items/{id}/images/{imgId}``images()->linkToVariation(int $itemId, int $variationId, int $imageId)`Link image to a variation`POST /rest/.../variation_images``images()->unlinkFromVariation(int $itemId, int $variationId, int $imageId)`Unlink image from a variation`DELETE /rest/.../variation_images/{imgId}`#### Upload via URL

[](#upload-via-url)

```
$response = $connector->images()->upload(
    itemId: 668423,
    uploadUrl: 'https://example.com/image.png',
    position: 0,
    name: 'Product front',
    alternate: 'Alt text for SEO',
);
$imageId = $response->json('id');
```

#### Upload via base64

[](#upload-via-base64)

```
$base64 = base64_encode(file_get_contents('/path/to/image.png'));

$response = $connector->images()->upload(
    itemId: 668423,
    uploadImageData: $base64,
    uploadFileName: 'product.png',
    fileType: 'png',
    position: 0,
);
$imageId = $response->json('id');
```

> **Note:** PlentyONE processes images asynchronously. Right after upload, `width`, `height`, and `size` may still be `0`. The metadata is populated after a few seconds.

### Categories

[](#categories)

MethodDescriptionAPI Endpoint`categories()->list(array $filters)`List categories with filters`GET /rest/categories`**Available filters for `list()`:** `type`, `with`, `page`, `itemsPerPage`, `parentId`, `lang`, `name`, `level`, `plentyId`, `linklist`, `updatedAt`, `tagId`, `metaKeywords`

### Webstores

[](#webstores)

MethodDescriptionAPI Endpoint`webstores()->list()`List all webstores/clients with PlentyID and name`GET /rest/webstores````
$webstores = $connector->webstores()->list()->json();

foreach ($webstores as $ws) {
    echo $ws['storeIdentifier'] . ': ' . $ws['name'] . "\n";
}
```

### Order Referrers (Sales Channels)

[](#order-referrers-sales-channels)

MethodDescriptionAPI Endpoint`referrers()->list()`List all order referrers/sales channels with ID and name`GET /rest/orders/referrers````
$referrers = $connector->referrers()->list()->json();

foreach ($referrers as $r) {
    echo $r['id'] . ': ' . ($r['backendName'] ?? $r['name']) . "\n";
}
```

### Properties

[](#properties)

MethodDescriptionAPI Endpoint`properties()->list(?int $page, ?int $itemsPerPage, ?string $with)`List all properties (paginated)`GET /rest/properties``properties()->groups(?int $page, ?int $itemsPerPage, ?string $with)`List all property groups (paginated)`GET /rest/properties/groups````
// List all properties with names
$response = $connector->properties()->list(page: 1, itemsPerPage: 100, with: 'names');
$properties = $response->json()['entries'];

// List all property groups
$response = $connector->properties()->groups(page: 1, itemsPerPage: 100, with: 'names');
$groups = $response->json()['entries'];
```

### Documents (File-Properties)

[](#documents-file-properties)

Documents (manuals, data sheets, etc.) are stored as properties with `cast: "file"` on variations.

```
// Get all documents for a variation
$docs = $connector->variations()->documents($itemId, $variationId);

// Add a document (creates property link if it doesn't exist)
$connector->variations()->addDocument(
    itemId: 668423,
    variationId: 19408,
    propertyId: 498, // e.g. 498 = manual
    fileUrl: 'https://example.com/manual.pdf',
);

// Remove a document
$connector->variations()->removeDocument(
    itemId: 668423,
    variationId: 19408,
    propertyId: 498,
);
```

Need More?
----------

[](#need-more)

This SDK currently covers variations, images, categories, properties, webstores, order referrers, and document properties. If you need additional endpoints, feel free to fork the repository or submit a pull request.

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance59

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

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

---

Top Contributors

[![michabbb](https://avatars.githubusercontent.com/u/3524595?v=4)](https://github.com/michabbb "michabbb (9 commits)")

---

Tags

e-commercephpplentymarketsplentyonerest-apisaloon-phpsdk

### Embed Badge

![Health badge](/badges/macropage-plentyone-php-sdk/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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