Shopware 6 Admin API
Shopware 6 Admin API for shop operators: search any entity with Shopware criteria, maintain products (texts, SEO fields, stock, prices, property options), categories, Shopping Experiences layouts down to single slots, and the media library with upload from a URL, plus sales channels, promotions and SEO URLs. OAuth2 client credentials from a Shopware integration; generic writes, deletes and bulk sync install switched off.
7 天免费 · 无需信用卡 · EU 托管
问 Shopware 任何事
通过 AnythingMCP 对 Shopware 6 Admin API 试一个真实提示 — Claude 调用工具并返回答案。在你的消息上按 Enter 即可在 Cloud 安装。
在 Cloud 上安装 ShopwareClaude 是 AI,可能会出错。请核对回答。
2 分钟设置
- 1在 cloud.anythingmcp.com 开始免费试用。
- 2在连接器商店点击 Shopware 6 Admin API。提示时粘贴凭据。
- 3生成 MCP API 密钥,将 AI 客户端指向生成的 MCP URL。
配置 Shopware 6 Admin API
直接来自连接器定义:在哪里获取凭据、需要哪些权限,以及该适配器调用的是哪个 API。 由连接器作者以英文提供。
Shopware 6 Admin API
This connector uses the Admin API (/api) of a Shopware 6 shop, the API the Shopware Administration itself uses: search and read every entity, maintain products (texts, SEO fields, stock, prices, properties), categories, Shopping Experiences layouts and the media library. For the public storefront API with a sales channel access key, use the separate Shopware 6 Store API connector.
Setup (about 3 minutes)
- In the Shopware Administration open Settings > System > Integrations and click Add integration.
- Give it a name and either switch on Administrator or assign a role with the permissions the AI should have (a role with only read rights keeps every write tool failing with 403).
- Copy the Access key ID into
SHOPWARE_ACCESS_KEY_IDand the Secret access key intoSHOPWARE_SECRET_ACCESS_KEY. The secret is shown only once; create a new key in the integration if it is lost. SHOPWARE_URLis the shop's address without a path, e.g.https://shop.example.com. Do not add/apior/admin.- Install and run
shopware_6_admin_get_versionto check the credentials.
AnythingMCP fetches a short-lived bearer token at the shop's /api/oauth/token with the OAuth2 client-credentials grant and renews it on its own.
Ids are 32 hex characters without dashes. Find them with the search tools; never guess them.
Search criteria. Every search tool takes Shopware's criteria: term, ids, filter (equals, equalsAny, contains, prefix, suffix, range, not, multi), sort, associations (with nested criteria), includes, limit, page and total_count_mode. Pass includes (e.g. {"product": ["id", "productNumber", "name", "stock"]}) whenever you do not need the full records: a product without includes is large. Filter on related fields with dot paths, e.g. categories.id, properties.id, manufacturer.name.
Languages. Texts are translated per language. Reads and writes use the shop's system language unless you pass language_id, sent as the sw-language-id header: a read then returns that translation (fields not translated are null, the translated object shows the fallback), a write changes that translation. List languages with shopware_6_admin_search_entities and entity language. Create records in the system language first.
Variants are products with a parentId; they inherit empty fields from the parent. Pass inheritance: true to shopware_6_admin_search_products or shopware_6_admin_get_product to see the inherited values.
Tools
- Info:
shopware_6_admin_get_version. - Products:
shopware_6_admin_search_products,shopware_6_admin_get_product,shopware_6_admin_update_product,shopware_6_admin_add_product_property,shopware_6_admin_remove_product_property,shopware_6_admin_create_property_option. - Categories:
shopware_6_admin_search_categories,shopware_6_admin_create_category,shopware_6_admin_update_category. - Layouts (Shopping Experiences):
shopware_6_admin_search_cms_pages,shopware_6_admin_get_cms_page(sections, blocks and slots),shopware_6_admin_create_cms_page,shopware_6_admin_update_cms_page,shopware_6_admin_create_cms_block,shopware_6_admin_update_cms_slot. - Media:
shopware_6_admin_search_media,shopware_6_admin_create_mediathenshopware_6_admin_upload_media_from_url,shopware_6_admin_update_media,shopware_6_admin_create_media_folder. Uploading by URL needs Shopware'senable_url_upload_feature(on by default) and a public URL. - Sales channels, promotions, SEO URLs:
shopware_6_admin_search_sales_channels,shopware_6_admin_search_promotions,shopware_6_admin_search_seo_urls. - Any entity:
shopware_6_admin_search_entities,shopware_6_admin_get_entity, and, installed switched off,shopware_6_admin_create_entity,shopware_6_admin_update_entity,shopware_6_admin_delete_entityandshopware_6_admin_sync(bulk upsert and delete).
Writes change the live shop. The product, category, layout, slot and media tools change what shoppers see as soon as the shop's cache is refreshed: name the record and the new values, and wait for the user's yes before any write. shopware_6_admin_remove_product_property only unlinks an option and is undone with shopware_6_admin_add_product_property; shopware_6_admin_upload_media_from_url replaces an existing file. The generic writes, deletes and the Sync API are installed switched off: a workspace admin turns them on deliberately.
Writes answer with an empty 204 when nothing is returned (updates, uploads, deletes); read the record back to confirm. The create tools return the new record with its id.
Docs: https://developer.shopware.com/docs/guides/integrations-api/ and the Admin API reference at https://shopware.stoplight.io/docs/admin-api.