You run a Shopware 6 shop and want to build your own frontend with Vue, React, Next or Nuxt. Welcome to the headless world. Here you separate shop logic from the storefront, pull all data through the API and design the frontend exactly the way you need it. Sounds like a lot of freedom. It is. But without a plan, things get messy fast.
In this article, I'll show you how to approach headless commerce with Shopware 6 in a structured way. You'll learn how the APIs are built, how to connect your frontend framework cleanly to the shop and which traps you'd better avoid. All from the perspective of a developer who likes to laugh but doesn't compromise on architecture.
If you want to dig deeper into headless commerce with Shopware 6, take a look at the official Shopware overview of headless commerce. It gives you a good overall picture of the platform's headless capabilities.
What headless commerce with Shopware 6 means in practice
Headless commerce means a strict separation between backend and frontend. Shopware 6 handles products, prices, customer data, the cart and checkout. Your frontend framework fetches this data through the API and presents it on a website, in an app or on an in-store kiosk. Communication runs through clearly defined endpoints and JSON. No templates from the core. No Twig loops in the Shopware theme.
The big advantage is the freedom on the frontend side. You can build a landing page in Next.js, a mobile app in React Native and an in-house ordering station with Vue. All of them talk to the same Shopware 6 system. The backend remains your single source of truth for commerce data.
If you'd like to review the basics of headless e-commerce at your own pace, a neutral overview such as this introductory article on headless e-commerce helps. It gives you a clear picture of what headless means for architecture and channels.
Shopware headless: an overview of the Shopware 6 architecture
Shopware 6 follows an API-first approach. Almost everything you do in the admin can also be done through an API. For headless, two large areas matter: the Store API and the Admin API. Both use HTTP and JSON, but they serve different purposes and audiences.
Store API – your source for all shop data in the frontend
The Store API delivers what your customer experience needs: category structures, product listings, product details, search results, cart, customer account and checkout. You call this API directly from your frontend framework. With it, you build standard pages such as category, product and search, as well as personalized home pages and dynamic widgets.
What matters here is a clear structure for your calls. You need a central layer in the frontend that encapsulates all Store API calls. No ad hoc fetch calls scattered across every component. Instead, use a dedicated module for product data, one for customers and one for cart and checkout. That way you keep things organized, can add logging and can introduce caching later.
Admin API – the control center for master data and integrations
You typically use the Admin API in a backend context. It manages products, prices, stock levels, customer data and orders from external systems. Typical examples are ERP integrations, PIM connections or a custom backend tool for content management. The Admin API usually requires separate authentication using the client credentials flow.
For your headless frontend, the Admin API matters indirectly. It ensures that your Shopware 6 system always has up-to-date data. You should be familiar with it so you understand how products and content get into the system and why certain fields appear the way they do.

Headless shopware – e-news for ambitious developers – read up and stay sharp – 🛒Headless commerce with Shopware 6 – how to connect your frontend framework and API shop cleanly⚙️
Shopware frontend: choosing the right framework
For headless commerce with Shopware 6, many teams end up with Vue or React. There are Shopware PWA approaches, starter templates and sample projects. Even so, don't let hype or a favorite framework drive the decision. Think first about your team, your maintenance and the surrounding systems.
Typical options are a classic SPA or an SSR variant with Next.js or Nuxt. For e-commerce, I prefer SSR plus hydration because it gives you better control over performance and SEO. Your pages can be rendered server-side and still be as interactive as a single-page app.
A responsive, mobile-first design is essential. Shoppers buy on the go. Most reach for their phone first, not a desktop. Your headless frontend should be designed for small screens from the start. Navigation, filters, search and checkout need to work smoothly on a smartphone. Desktop is almost a bonus after that.
Preparing Shopware 6: integrations and API access
Before you connect your frontend framework to Shopware, set up the API access in the shop properly. In the Shopware 6 admin, you'll find Integrations under Settings and System. There you create your own API clients, assign keys and define permissions. This lets you clearly separate which application can access what.
A customer-facing frontend usually needs access to sales channels, products, categories, prices and media. An internal tool may need different permissions. It's better to create several integrations and give each one only what it actually needs. That keeps your system lean and reduces risk.
The official Shopware documentation is a good starting point for API concepts and integrations. It also covers how to set up integrations and how to work with the API day to day.
Which Shopware API do you need: Store API or Admin API?
Before you write the first line of code, it is worth spending a minute on this question. Shopware 6 provides two separate APIs, and your choice determines authentication, permissions and what is possible at all. Both are REST APIs and use JSON, so if you are looking for the Shopware REST API, you mean one of these two.
The Store API is the public-facing side. It serves exactly what a storefront needs: categories, products, search, cart, checkout and customer account. It is bound to a sales channel and authenticates with that channel's access key. For a custom frontend, it is almost always the right choice: it is designed for read access and customer sessions and delivers data that is already prepared for display.
The Admin API is the back end. It reaches practically all of your data and has write access: creating products, setting stock levels, changing orders. It authenticates through an integration with an access ID and secret access key (OAuth 2.0, client credentials). There is no way around it for connecting an inventory management system or an ERP, but it has no place in a browser-based frontend.
The short rule of thumb: What the customer sees comes from the Store API. What the back office changes goes through the Admin API. Mixing the two leads to either a permissions problem or a security hole. And if you call the Admin API one record at a time for bulk writes, you will wait a long time. That is what the sync endpoint is for: it accepts many records in a single request.
Your first request: from access token to product list
Getting started with a headless frontend usually takes three steps. You set up API access, test your first requests with a tool such as Insomnia or Postman, and then move these calls into your frontend framework. Take your time with this part. Careful work here saves you many hours of debugging later.
In the simplest case, you first get an access token for the Store API of your sales channel. Then you fetch a product list for a category. In the frontend, you build a first product overview on top of that. Once it works, you can add pagination, filters and sorting. Step by step, not all at once.
// stark vereinfachtes Beispiel für einen Fetch Call im Frontend
const response = await fetch('https://dein-shop.de/store-api/product', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'sw-access-key': 'DEIN_SALES_CHANNEL_KEY'
},
body: JSON.stringify({
filter: [
{ type: 'equals', field: 'product.active', value: true }
],
includes: {
product: ['id', 'name', 'cover', 'calculatedPrice']
}
})
});
const data = await response.json();
You can see that you can specify filters, includes and other parameters. This lets you control which data you receive and how large your payload gets. That matters a lot for performance and clarity. Only fetch data that the frontend actually uses.
Structuring the API layer in your frontend
When you work with headless commerce, consistently encapsulate the API calls in your frontend. Create a dedicated service layer for Shopware. This layer contains only functions such as getProducts, getProductById, search, addToCart, updateCart or placeOrder. Components never access Fetch or Axios directly; they always go through these service functions.
This lets you control authentication, error handling, logging and caching in one place. If endpoints change or new parameters are added, you only need to make adjustments in one spot. Your components stay lean and focus on rendering and user interactions. That makes the project more robust and easier to maintain.
Optimizing performance in a headless setup
Headless commerce gives you a lot of design freedom. At the same time, you carry more responsibility for performance yourself. Shopware 6 gives you a well-structured API, but how fast your pages feel depends largely on your frontend. Pay attention to load time, rendering path and data volume from the start.
Use caching on multiple levels: browser cache, framework cache and an API cache. For products and categories, you can keep frequently used data in the frontend and refresh it only when needed. Use lazy loading for images and for parts of the page that only become relevant later. Add skeleton states so users can see that something is happening.
A monitoring tool also helps. Measure Time to First Byte, Largest Contentful Paint and the key Core Web Vitals. If you check these regularly, you will spot early when a new feature is slowing down your site. That way you can make adjustments before your conversion rate suffers.
Clean error handling and debugging of your API calls
A headless architecture without good error handling quickly feels broken to users. Every API call should have a clear strategy for error messages. From a frontend perspective, there are roughly three categories: technical errors, such as network problems or timeouts; business logic errors, such as invalid voucher codes; and unexpected system errors in the shop.
Each category needs its own response in the UI. A technical error can be handled with a short notice and a retry button. Business logic errors need a clear explanation of what went wrong and how the user can fix it. System errors should be logged and, where possible, reported centrally so the team can respond quickly.
Log both the request and the response in an environment you have access to. Do not include sensitive data such as plain-text passwords or full credit card details. Focus on endpoints, status codes and relevant IDs. This lets you reproduce and fix problems in a targeted way.
Common pitfalls in headless commerce with Shopware 6
Many problems in headless projects are less about code and more about coordination. Some people work on the frontend, others on the ERP or the PIM. Shopware 6 sits in the middle. Without clear API ownership and clean interface documentation, things quickly get messy. Make sure you have a shared API document and clearly defined responsibilities.
Another classic is an excessive number of requests. Each product card loads details, images and prices separately. The same applies to navigation and filters. Always check which information you can bundle into a single call. Use includes and search endpoints. Think early about aggregations, facets and the design of your listings.
A final pitfall is neglecting SEO. Just because your frontend is headless does not mean it can be invisible to search engines. Use server-side rendering or static site generation, and build cleanly structured headings, meta tags and readable URLs. Keep content and commerce separate but coordinated. Your blog, guides and product pages in particular should be planned together.
Practical ideas: what you can build with headless and Shopware 6
With a headless setup based on Shopware 6, you can build far more than a classic storefront. You can develop an in-store product advisor for tablets, a configurator for complex products or a community platform connected directly to the cart and checkout. All of them access the same Shopware data.
Things get interesting when you combine personalized home pages, dynamic campaign areas and cross-channel content. Users then see products on the home page that match their behavior. At the same time, you can run tests and try out variants in the background. The result is a continuously improving customer experience that is still powered by a single central system.
If you like, you can also draw inspiration from a developer guide, such as a German Shopware API guide for developers. It shows how other teams model the interfaces and integrate them into their architecture.
More on Shopware 6:






















{% endif %}
{% if title and title != "" %}
{{ title }}
{% endif %}
{% if excerpt and excerpt != "" %}