> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopware

> Manage Shopware 6 shop data - search products and orders, create products, and transition order states via the Admin API

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: OAuth 2.0 (client credentials).
* **Connection**: Veryfront mints machine-to-machine tokens from the client ID and secret in the project's environment variables.
* **Docs**: [https://shopware.stoplight.io/docs/admin-api/authentication](https://shopware.stoplight.io/docs/admin-api/authentication)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable                 | Required | Description                                                                                                                                      |
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `SHOPWARE_CLIENT_ID`     | Yes      | Access key ID of the integration (Admin > Settings > System > Integrations) [Docs](https://shopware.stoplight.io/docs/admin-api/authentication). |
| `SHOPWARE_CLIENT_SECRET` | Yes      | Secret access key of the integration (shown once at creation) [Docs](https://shopware.stoplight.io/docs/admin-api/authentication).               |
| `SHOPWARE_SHOP_DOMAIN`   | Yes      | Bare hostname of your Shopware shop without protocol, e.g. my-shop.example.com (the token endpoint and all tools live on this host)              |

## Setup

1. **Get a Shopware 6 shop**: Use an existing Shopware 6 instance, start a free Shopware cloud trial at [https://www.shopware.com](https://www.shopware.com), or run a local instance (e.g. via Docker/devenv) for testing. Note the shop hostname and set it as SHOPWARE\_SHOP\_DOMAIN.
2. **Create an integration**: In the shop administration go to Settings > System > Integrations and click Add integration. Give it a name and (if write tools are needed) enable write access / an appropriate role.
3. **Save the access keys**: Copy the Access key ID as SHOPWARE\_CLIENT\_ID and the Secret access key as SHOPWARE\_CLIENT\_SECRET. The secret is shown only once.
4. **Verify access**: Tokens are issued from https\://\<your-shop-domain>/api/oauth/token via the client\_credentials grant (access tokens expire after 600 seconds (10 minutes) and are refreshed automatically). Run Search Products to confirm the integration works.

* Integration credentials come from Admin > Settings > System > Integrations - not from a central Shopware portal
* The OAuth token endpoint is per-shop and resolved from the SHOPWARE\_SHOP\_DOMAIN env var (https\://\<SHOPWARE\_SHOP\_DOMAIN>/api/oauth/token), so each shop issues its own tokens
* Admin API search endpoints are POST requests with a criteria body; entity responses are wrapped in a data key
* Order state transitions are constrained by the state machine - only transitions valid from the current state succeed

Provider API reference: [https://shopware.stoplight.io/docs/admin-api/8d53c59b2e6bc-shopware-admin-api](https://shopware.stoplight.io/docs/admin-api/8d53c59b2e6bc-shopware-admin-api)

## Tools

| Tool                   | Access | Description                                                                                             |
| ---------------------- | ------ | ------------------------------------------------------------------------------------------------------- |
| Search Products        | Read   | Search products with the Admin API search criteria (term, filters, sorting, paging)                     |
| Search Orders          | Read   | Search orders with the Admin API search criteria (filters, sorting, paging)                             |
| Search Customers       | Read   | Search customers with the Admin API search criteria (term, filters, sorting, paging)                    |
| Get Order              | Read   | Get full details of a single order by ID                                                                |
| Get Product            | Read   | Get full details of a single product by ID                                                              |
| Create Product         | Write  | Create a new product (requires name, productNumber, stock, taxId, and a price array)                    |
| Update Product         | Write  | Partially update a product, e.g. change its price, stock, or visibility                                 |
| Transition Order State | Write  | Move an order to its next state via a state machine transition (e.g. process, complete, cancel, reopen) |

## Example prompts

* Search my Shopware shop for the most recent orders and summarize their states and totals.
* Search my Shopware products and give me an overview of the catalog including stock levels.
* Search Shopware for a product by name or product number and show its details.
