REST ( Representational State Transfer ) is a networked application architectural style. REST APIs are defined over HTTP, and common operations are defined using methods such as GET to read data, POST to write resources, PUT to update, and DELETE to delete. REST APIs in Shopware are designed according to two primary interfaces:
Both APIs are REST-based with the JSON format being used to transfer data and standard HTTP status codes (e.g., 200 for success, 401 unauthorized) to communicated the result of a request. Detailed steps on how to use these APIs, authentication and sample requests are given in the following sections.
The Store API acts as an entry point to the storefront of Shopware and allows developers to create exciting customer experiences. The following are the steps to authorize and submit requests to Store API.
Authentication Against the Store API requires an sw-access-key, which is bound to a sales channel in Shopware. Just do the following:
http://your-shop-url/admin
.Shopware offers a Swagger to discover and test Store API endpoints. To authenticate do the following:
http://your-shop-url/store-api/_info/swagger.html
.After authentication, you are free to call the Store API. As an illustration, a request to get a list of products should be a GET request to
/store-api/product
. You can do it via a browser or a tool (such as Postman):
sw-access-key
and the value of your copied key.http://your-shop-url/store-api/product
to view a JSON response with products data.curl -X GET https://your-shop-url/store-api/product \
-H "accesskey: yourswaccess_key" \
-H "Content-Type: application/json"
This query will result in a JSON output that contains an array of products containing their information such as names, prices and IDs.
Imagine that you wish to show products on a custom frontend. Product data is loaded by making a GET request to
/store-api/product
. The answer can be the following:
{ "elements": [ { "id": "123456789", "name": "Sample Product", "price": { "gross": 19.99 }, "stock": 100 } ], "total": 1 }
The Admin API is meant to be used in backend integrations and gives developers access to manage the core data of Shopware. It implements the secure authentication with OAuth 2.0.
You need to set up an integration in the Shopware admin panel in order to get API credentials to use Admin API:
Get an OAuth 2.0 access token using the credentials of the integration.
POST /api/oauth/token
:
curl -d -X POST "http://your-shop-url/api/oauth/token" \ -H "Content-Type: application/json" -d '{ "grant_type": "client_credentials", "client_id": "youraccesskeyid", "client_secret": "yoursecretaccesskey" }'
The reply contains an access token, which is good within 10 min:
{ "access_token": "youraccesstoken", "expires_in": 600, "token_type": "Bearer" }
Using the access token, you may make authenticated calls to the Admin API. E.g., to get a list of products, make a GET request to
/api/product
:
curl -X GET "http://your-shop-url/api/product" \ -H "Authorization: Bearer youraccesstoken" \ -H "Content-Type: application/json"
To change the stock of a product, make a PATCH request to
/api/product/{product_id}
:
curl -X PATCH \ -H "Authorization: Bearer youraccesstoken" \ -H "Content-Type: application/json" \ -d '{ "stock": 150 }'
GraphQL is a query language that enables clients to specify exactly the data they require, to minimise over-fetching and to be more efficient than REST. GraphQL, unlike REST which makes use of various endpoints, makes use of a single endpoint usually
/graphql
. Shopware however does not feature an official GraphQL API in June 2025. Rather, GraphQL functionality can be realized through community-driven projects such as SwagGraphQL.
SwagGraphQL is a proof-of-concept (POC) plugin by shopwareLabs to provide a GraphQL API on top of the core API of Shopware. It is based on the
webonyx/graphql-php
library to process GraphQL and is integrated into the framework of Shopware 6. It is however, not maintained anymore and was built for early releases of Shopware 6 and should not be used in production without major updates.
To play with SwagGraphQL, do the following:
custom/plugins
folder of your Shopware installation:git clone -q -b main https://github.com/shopwareLabs/SwagGraphQL.git custom/plugins/SwagGraphQL
cd custom/plugins/SwagGraphQL
composer install
cd ../../..
composer require swag-graphql/plugin
bin/console plugin:enable SwagGraphQL
When installed, the GraphQL endpoint can be reached at
http://your-shop-url/graphql/query
. You may communicate with it through such tools as GraphiQL. An example GraphQL request to retrieve products can be as follows:
query { products { id name price } }
The most prominent GraphQL project on Shopware is SwagGraphQL, but there can be other third-party integrations. Projects such as Alumio (Shopware & GraphQL Integration) provide a middleware to integrate Shopware with GraphQL-based systems. Nevertheless, those solutions usually need further setup and might fail to offer a native GraphQL API over Shopware core.
Feature | REST (Shopware Store/Admin API) | GraphQL (through SwagGraphQL) |
---|---|---|
Official Support | Completely supported by Shopware | Unsupported, community driven |
Endpoint Structure | Multiple endpoints (e.g., /store-api/product) | Single endpoint (/graphql/query) |
Data Fetching | Set answer format, possible over-fetching | Accurate data retrieval, query defined by the clients |
Authentication | sw-access-key (Store API), OAuth 2.0 (Admin API) | Plugin dependent |
Production Readiness | Production ready and stable | POC, not intended to be used in production |
The REST APIs provided by Shopware—the Store API and the Admin API—allow you to integrate and expand the platform’s functionality. While Shopware lacks an official GraphQL API, community initiatives like SwagGraphQL offer flexibility for experimental projects. By configuring APIs properly and following best practices, developers can unlock the full potential of the Shopware ecosystem for custom frontends, CRM syncs, and beyond.