PHPackages                             team-nifty-gmbh/shopware-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. team-nifty-gmbh/shopware-sdk

ActiveLibrary

team-nifty-gmbh/shopware-sdk
============================

PHP SDK for the Shopware 6 Admin API, built with Saloon

013↑2900%PHPCI passing

Since Mar 24Pushed 1mo agoCompare

[ Source](https://github.com/Team-Nifty-GmbH/shopware-sdk)[ Packagist](https://packagist.org/packages/team-nifty-gmbh/shopware-sdk)[ RSS](/packages/team-nifty-gmbh-shopware-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Shopware 6 Admin API SDK
========================

[](#shopware-6-admin-api-sdk)

PHP SDK for the Shopware 6 Admin API, built with [Saloon](https://docs.saloon.dev).

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

[](#installation)

```
composer require team-nifty-gmbh/shopware-sdk
```

Usage
-----

[](#usage)

### Connect

[](#connect)

```
use TeamNiftyGmbH\Shopware\Shopware;

$shopware = new Shopware(
    baseUrl: 'https://your-shop.example.com/api',
    clientId: 'your-client-id',
    clientSecret: 'your-client-secret',
);
```

### CRUD Operations

[](#crud-operations)

```
// List
$response = $shopware->product()->getProductList(limit: 10, page: 1);
$products = $response->json('data');

// Get single
$response = $shopware->product()->getProduct('product-uuid');
$product = $response->dto(); // Returns TeamNiftyGmbH\Shopware\Dto\Product

// Create
$response = $shopware->product()->createProduct([
    'name' => 'My Product',
    'productNumber' => 'SW-001',
    'stock' => 100,
    'taxId' => 'tax-uuid',
    'price' => [[
        'currencyId' => 'currency-uuid',
        'gross' => 19.99,
        'net' => 16.80,
        'linked' => true,
    ]],
]);

// Update
$shopware->product()->updateProduct('product-uuid', [
    'name' => 'Updated Name',
    'stock' => 50,
]);

// Delete
$shopware->product()->deleteProduct('product-uuid');
```

### Search with CriteriaBuilder

[](#search-with-criteriabuilder)

```
use TeamNiftyGmbH\Shopware\Support\CriteriaBuilder;

$criteria = CriteriaBuilder::make()
    ->equals('active', true)
    ->contains('name', 'shirt')
    ->range('stock', ['gte' => 10])
    ->sort('name')
    ->sortDesc('createdAt')
    ->limit(25)
    ->page(1)
    ->association('manufacturer')
    ->association('categories')
    ->toArray();

$response = $shopware->product()->searchProduct($criteria);
$products = $response->dto(); // Returns array of Product DTOs
```

#### Nested Associations

[](#nested-associations)

```
$criteria = CriteriaBuilder::make()
    ->association('manufacturer', CriteriaBuilder::make()
        ->association('media')
    )
    ->toArray();
```

#### Aggregations

[](#aggregations)

```
$criteria = CriteriaBuilder::make()
    ->equals('active', true)
    ->statsAggregation('price-stats', 'price')
    ->termsAggregation('manufacturers', 'manufacturerId', limit: 10)
    ->toArray();

$response = $shopware->product()->aggregateProduct($criteria);
```

#### Complex Filters

[](#complex-filters)

```
$criteria = CriteriaBuilder::make()
    ->multi('or', [
        ['type' => 'contains', 'field' => 'name', 'value' => 'shirt'],
        ['type' => 'contains', 'field' => 'description', 'value' => 'shirt'],
    ])
    ->not('and', [
        ['type' => 'equals', 'field' => 'active', 'value' => false],
    ])
    ->toArray();
```

### Pagination

[](#pagination)

Iterate over all pages automatically:

```
use TeamNiftyGmbH\Shopware\Requests\Product\GetProductList;

$paginator = $shopware->paginate(new GetProductList(limit: 50));

foreach ($paginator as $response) {
    $products = $response->json('data');

    foreach ($products as $product) {
        // Process each product
    }
}

// Or collect all items
foreach ($paginator->items() as $item) {
    // Each item is a raw array from the API
}
```

### Typed Responses (DTOs)

[](#typed-responses-dtos)

All requests support `$response->dto()` for typed responses using [Spatie Laravel Data](https://spatie-laravel-data.com):

```
// Single entity
$product = $shopware->product()->getProduct('uuid')->dto();
// $product is TeamNiftyGmbH\Shopware\Dto\Product

// List/Search
$products = $shopware->product()->searchProduct($criteria)->dto();
// $products is array
```

### Bulk Operations

[](#bulk-operations)

```
$shopware->bulkOperations()->sync([
    [
        'action' => 'upsert',
        'entity' => 'product',
        'payload' => [
            ['id' => 'uuid-1', 'stock' => 100],
            ['id' => 'uuid-2', 'stock' => 200],
        ],
    ],
]);
```

### Order Management

[](#order-management)

```
// Transition order state
$shopware->orderManagement()->orderStateTransition('order-uuid', 'process');

// Transition delivery state
$shopware->orderManagement()->orderDeliveryStateTransition('delivery-uuid', 'ship');

// Transition payment state
$shopware->orderManagement()->orderTransactionStateTransition('transaction-uuid', 'paid');
```

Available Resources
-------------------

[](#available-resources)

The SDK covers the full Shopware 6 Admin API with 151 resources. Common ones:

ResourceAccessProduct`$shopware->product()`Order`$shopware->order()`Customer`$shopware->customer()`Category`$shopware->category()`Media`$shopware->media()`Sales Channel`$shopware->salesChannel()`Property Group`$shopware->propertyGroup()`Promotion`$shopware->promotion()`Shipping Method`$shopware->shippingMethod()`Payment Method`$shopware->paymentMethod()`Order Management`$shopware->orderManagement()`Bulk Operations`$shopware->bulkOperations()`System Operations`$shopware->systemOperations()`Laravel Integration
-------------------

[](#laravel-integration)

For Laravel projects, use the [laravel-shopware](https://github.com/team-nifty-gmbh/laravel-shopware) package which provides a ServiceProvider, Facade, config, and `shopware6()` helper.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance59

Moderate activity, may be stable

Popularity8

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/315f809551baee16f7c5531f89a864b4d5b59bde8882779c30d4a01ae36e718e?d=identicon)[team-nifty](/maintainers/team-nifty)

---

Top Contributors

[![patrickweh](https://avatars.githubusercontent.com/u/40495041?v=4)](https://github.com/patrickweh "patrickweh (3 commits)")

### Embed Badge

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

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

PHPackages © 2026

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