PHPackages                             shopware-sdk/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. shopware-sdk/sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shopware-sdk/sdk
================

Shopware SDK

2541PHP

Since May 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/shopware-sdk/sdk)[ Packagist](https://packagist.org/packages/shopware-sdk/sdk)[ RSS](/packages/shopware-sdk-sdk/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Shopware SDK
============

[](#shopware-sdk)

[![codecov](https://camo.githubusercontent.com/5a57253398b0884f89cdb75043c78e95ae4c545f9ba00bc28986231dce9247ec/68747470733a2f2f636f6465636f762e696f2f67682f73686f70776172652d73646b2f73646b2f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/shopware-sdk/sdk)

Sponsor by [![](https://camo.githubusercontent.com/62ff3d06cf5b6bd144b7d212caf92f864f3aae3554253e4c84ad85b8ec4e4fff/68747470733a2f2f7777772e76616c616e7469632e636f6d2f77702d636f6e74656e742f7468656d65732f76616c616e7469632f696d672f6c6f676f2d76616c616e7469632e737667)](https://www.valantic.com/cx)

---

> Shopware SDK is currently being developed

Elevate your integration with the Shopware API through the swifter SDK API, designed specifically for seamless connectivity with external systems.

🔄 Time to evolve! Abandon the use of arrays and embrace the power of objects. 🔄

🛠️ The Shopware SDK is your go-to tool for this transformation. 🛠️

🔍 Can't find all the API endpoints? No worries! If you spot any omissions, kindly create an issue or submit a PR.

Your contributions are always welcome! 🤗

Table of Contents
-----------------

[](#table-of-contents)

1. [How to use](#how-to-use)
    1. [Composer](#composer)
    2. [Initialize the SDK](#initialize-the-sdk)
2. [Extending the SDK](#extending-the-sdk)
    1. [Create a new service](#create-a-new-service)
    2. [Replace or extends a default service](#replace-a-default-service)
3. [Work locally](#work-locally)

How to use
----------

[](#how-to-use)

### Composer

[](#composer)

> As the Shopware SDK is currently under development, we have not yet assigned a version. Once it's completed, we will create a version on Packagist.

Add this code in your composer.json

```
"require": {
    ...
    "shopware-sdk/sdk": "dev-main"
}
```

### Initialize the SDK

[](#initialize-the-sdk)

```
$config = new \ShopwareSdk\Config(
    'http://my.shopware.com',
    'SWIAxxxxxxxxxxxxxxxxxxZVTG',
    'eWd3Qnc1R0U3ZmFjUDxxxxxxxxxxxxxxxxJCT3JzS3hvUHNyN0w',
);

$adminApi = new \ShopwareSdk\AdminApi($config);

$currencies = $adminApi->currency->getAll();
var_dump($currencies);
```

Output:

```
array(2) {
  [0]=>
  object(ShopwareSdk\Model\Currency)#3 (5) {
    ["id"]=>
    string(36) "c6d8c3f0-8b1e-4b0e-9b2e-8c3f0b1e4b0e"
    ["name"]=>
    string(3) "USD"
    ["isoCode"]=>
    string(3) "USD"
    ["symbol"]=>
    string(1) "$"
    ["factor"]=>
    int(100)
  }
  [1]=>
  object(ShopwareSdk\Model\Currency)#4 (5) {
    ["id"]=>
    string(36) "c6d8c3f0-8b1e-4b0e-9b2e-8c3f0b1e4b0e"
    ["name"]=>
    string(3) "EUR"
    ["isoCode"]=>
    string(3) "EUR"
    ["symbol"]=>
    string(1) "€"
    ["factor"]=>
    int(100)
  }
}
```

Extending the SDK
-----------------

[](#extending-the-sdk)

### Create a new service

[](#create-a-new-service)

It may be that a service is not there and you need it. Then you can simply create it and register it for AdminApi.

#### Example:

[](#example)

We create a NewService and extend AbstractService to access the method request.

```
namespace App\ShopwareSdk\Service;

use ShopwareSdk\Service\AbstractService;

class NewService extends AbstractService
{
    protected const URL = '/api/new_service/';

    public function getAll(): NewServiceCollection
    {
        return $this->request('GET', self::URL, NewServiceCollection::class);
    }
}
```

Now when we create the AdminApi we just have to say under which name the service can be accessed.

```
use App\ShopwareSdk\Service\NewService;

$config = new Config(
    'https://shopware.test',
    'clientId',
    'clientSecret',
    [
        'newService' => NewService::class,
    ]
);

$adminApi = new AdminApi($config);
```

Now we can access the service through the AdminApi.

```
/** @var NewService $newService */
$newService = $adminApi->newService;
$newService->getAll();
```

### Replace or extends a default service

[](#replace-or-extends-a-default-service)

It could be that you want to extend or change the existing service. E.g. you want to add new methods or maybe change the model class.

#### Example:

[](#example-1)

We create a ProductService and extend ProductService to add new method.

```
namespace App\ShopwareSdk\Service;

use ShopwareSdk\Service\ProductService;

class MyProductService extends ProductService
{
    public function getNewFancyMethod(): NewServiceCollection
    {
        return $this->request('GET', self::URL, NewServiceCollection::class);
    }
}
```

Now we just have to tell our Config that the Product-Service is our ProductService.

```
use App\ShopwareSdk\Service\MyProductService

$config = new Config(
    'https://shopware.test',
    'clientId',
    'clientSecret',
    [
        'product' => MyProductService::class,
    ]
);

$adminApi = new AdminApi($config);
```

Now we can reach the service via the AdminApi.

```
/** @var MyProductService $newService */
$product = $adminApi->product;
$product->getNewFancyMethod();
```

Work locally
------------

[](#work-locally)

Start shopware-demo shopware instance and set client credentials

```
docker run --rm -p 8000:80 dockware/play

python3 .github/api_sw_client.py
```

*Python Library:* `pip install requests`

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 96.4% 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/a0c7fd22b91b022d1052999c8838762fb17f410afc935499e0dd8e520b689c78?d=identicon)[wesolowski](/maintainers/wesolowski)

---

Top Contributors

[![wesolowski](https://avatars.githubusercontent.com/u/1388643?v=4)](https://github.com/wesolowski "wesolowski (27 commits)")[![Klizzy](https://avatars.githubusercontent.com/u/15422170?v=4)](https://github.com/Klizzy "Klizzy (1 commits)")

### Embed Badge

![Health badge](/badges/shopware-sdk-sdk/health.svg)

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

###  Alternatives

[lybc/php-gb2260

452.0k](/packages/lybc-php-gb2260)[ryannielson/shareable

A Laravel 4 package to make it easy to add social sharing buttons to your application.

222.8k](/packages/ryannielson-shareable)

PHPackages © 2026

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