Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
SHOPWARE_CLIENT_IDYesAccess key ID of the integration (Admin > Settings > System > Integrations) Docs.
SHOPWARE_CLIENT_SECRETYesSecret access key of the integration (shown once at creation) Docs.
SHOPWARE_SHOP_DOMAINYesBare 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, 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

Tools

ToolAccessDescription
Search ProductsReadSearch products with the Admin API search criteria (term, filters, sorting, paging)
Search OrdersReadSearch orders with the Admin API search criteria (filters, sorting, paging)
Search CustomersReadSearch customers with the Admin API search criteria (term, filters, sorting, paging)
Get OrderReadGet full details of a single order by ID
Get ProductReadGet full details of a single product by ID
Create ProductWriteCreate a new product (requires name, productNumber, stock, taxId, and a price array)
Update ProductWritePartially update a product, e.g. change its price, stock, or visibility
Transition Order StateWriteMove 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.