Shopware icon

Shopware

Shopware

Actions778

Category → Create Category

AI-generated

Overview

This node operation allows users to create a new category in the Shopware system. It is useful for e-commerce administrators or developers who want to programmatically add categories with detailed configurations such as parent-child relationships, media associations, product assignments, SEO settings, and custom fields. For example, a user can create a category with a specific name, assign it a parent category, add media assets, and define SEO URLs all in one API call.

Use Case Examples

  1. Creating a new product category with a parent category and media assets.
  2. Adding a category with custom fields and SEO metadata for better search engine visibility.
  3. Setting up nested product categories with detailed product assignments and visibility settings.

Properties

Name Meaning
Response Data format for response, either basic or detailed.
Id Unique identifier for the category (required).
Version Id Version identifier for the category.
Parent Id Identifier of the parent category to establish hierarchy.
Parent Version Id Version identifier of the parent category.
After Category Id Identifier of the category after which this category should be placed.
After Category Version Id Version identifier of the category after which this category should be placed.
Media Id Identifier for associated media asset.
Display Nested Products Boolean flag to display nested products within the category.
Auto Increment Auto increment number for ordering or identification.
Breadcrumb Breadcrumb navigation data as JSON.
Level Depth level of the category in the hierarchy.
Path Path string representing the category location.
Child Count Number of child categories.
Type Type of the category.
Product Assignment Type Type of product assignment to the category.
Visible Boolean flag indicating if the category is visible.
Active Boolean flag indicating if the category is active.
Cms Page Id Switched Runtime field indicating if CMS page ID is switched; not used in criteria.
Visible Child Count Runtime field indicating count of visible child categories; not used in criteria.
Name Name of the category (required).
Custom Fields Custom fields data as JSON.
Slot Config Slot configuration data as JSON.
Link Type Type of link associated with the category.
Internal Link Internal link URL or identifier.
External Link External link URL.
Link New Tab Boolean flag to open link in a new tab.
Description Description text for the category.
Meta Title Meta title for SEO purposes.
Meta Description Meta description for SEO purposes.
Keywords SEO keywords associated with the category.
Cms Page Id Identifier for the CMS page associated with the category.
Cms Page Version Id Version identifier for the CMS page.
Product Stream Id Identifier for the product stream associated with the category.
Custom Entity Type Id Identifier for a custom entity type.
Created At Timestamp of category creation.
Updated At Timestamp of last update to the category.
Translated Translated fields data as JSON.
Parent Parent category data as JSON.
Children Child categories data as JSON.
Media Media assets data as JSON.
Products Products assigned to the category as JSON.
Nested Products Nested products data as JSON.
Tags Tags associated with the category as JSON.
Cms Page CMS page data as JSON.
Product Stream Product stream data as JSON.
Navigation Sales Channels Navigation sales channels data as JSON.
Footer Sales Channels Footer sales channels data as JSON.
Service Sales Channels Service sales channels data as JSON.
Main Categories Main categories data as JSON.
Seo Urls SEO URLs data as JSON.

Output

JSON

  • id - Unique identifier of the created category.
  • name - Name of the created category.
  • parentId - Identifier of the parent category, if any.
  • mediaId - Identifier of associated media, if any.
  • active - Boolean indicating if the category is active.
  • visible - Boolean indicating if the category is visible.
  • createdAt - Timestamp when the category was created.
  • updatedAt - Timestamp when the category was last updated.
  • customFields - Custom fields data of the category.
  • seoUrls - SEO URLs associated with the category.

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure all required fields like 'Id' and 'Name' are provided to avoid validation errors.
  • Check JSON formatting for fields like 'breadcrumb', 'customFields', 'slotConfig', and other JSON typed inputs to prevent parsing errors.
  • Verify API credentials and base URL configuration to avoid authentication or connection issues.
  • If the category creation fails, review the API response for specific error messages related to field constraints or permissions.

Discussion