Shopware icon

Shopware

Shopware

Actions778

Cms Block → Create Cms Block

AI-generated

Overview

This node operation creates a CMS Block in the Shopware system. It is useful for users who want to programmatically add new content blocks to their CMS pages, allowing for dynamic content management and customization. For example, a user can create a new CMS Block with specific positioning, type, and styling attributes to be displayed on a website.

Use Case Examples

  1. Creating a new CMS Block with a unique ID, position, and type to add custom content to a webpage.
  2. Setting margins, background color, and media for a CMS Block to match the website's design.
  3. Defining visibility and custom fields for a CMS Block to control when and how it appears to users.

Properties

Name Meaning
Response Data format for the response, either basic or detailed.
Id Unique identifier for the CMS Block.
Position Position of the CMS Block within the section.
Type Type of the CMS Block.
Locked Indicates if the CMS Block is locked.
Name Name of the CMS Block.
Section Position Position of the CMS Block within the section.
Margin Top Top margin of the CMS Block.
Margin Bottom Bottom margin of the CMS Block.
Margin Left Left margin of the CMS Block.
Margin Right Right margin of the CMS Block.
Background Color Background color of the CMS Block.
Background Media Id ID of the background media for the CMS Block.
Background Media Mode Mode of the background media.
Css Class CSS class applied to the CMS Block.
Visibility Visibility settings for the CMS Block.
Section Id Identifier of the section to which the CMS Block belongs.
Custom Fields Custom fields for additional data in the CMS Block.
Version Id Version identifier for the CMS Block.
Cms Section Version Id Version identifier for the CMS section.
Created At Creation timestamp of the CMS Block.
Updated At Last update timestamp of the CMS Block.
Section JSON object representing the section details of the CMS Block.
Background Media JSON object representing the background media details of the CMS Block.
Slots JSON array representing the slots within the CMS Block.

Output

JSON

  • id - Unique identifier of the created CMS Block.
  • position - Position of the CMS Block within the section.
  • type - Type of the CMS Block.
  • locked - Indicates if the CMS Block is locked.
  • name - Name of the CMS Block.
  • sectionPosition - Position of the CMS Block within the section.
  • marginTop - Top margin of the CMS Block.
  • marginBottom - Bottom margin of the CMS Block.
  • marginLeft - Left margin of the CMS Block.
  • marginRight - Right margin of the CMS Block.
  • backgroundColor - Background color of the CMS Block.
  • backgroundMediaId - ID of the background media for the CMS Block.
  • backgroundMediaMode - Mode of the background media.
  • cssClass - CSS class applied to the CMS Block.
  • visibility - Visibility settings for the CMS Block.
  • sectionId - Identifier of the section to which the CMS Block belongs.
  • customFields - Custom fields for additional data in the CMS Block.
  • versionId - Version identifier for the CMS Block.
  • cmsSectionVersionId - Version identifier for the CMS section.
  • createdAt - Creation timestamp of the CMS Block.
  • updatedAt - Last update timestamp of the CMS Block.
  • section - JSON object representing the section details of the CMS Block.
  • backgroundMedia - JSON object representing the background media details of the CMS Block.
  • slots - JSON array representing the slots within the CMS Block.

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure all required fields (Id, Position, Type, Section Id) are provided to avoid validation errors.
  • Check the API credentials and base URL configuration if authentication errors occur.
  • If the response format is not as expected, verify the '_response' property setting (basic or detail).
  • For JSON properties like 'visibility', 'customFields', 'section', 'backgroundMedia', and 'slots', ensure valid JSON format to prevent parsing errors.

Discussion