Shopware icon

Shopware

Shopware

Actions778

Media → Create Media

AI-generated

Overview

This node operation allows creating a media entity in the Shopware system. It supports specifying detailed media attributes such as ID, user ID, media folder ID, MIME type, file extension, upload time, file name, file size, metadata, media type, configuration, alt text, title, URL, path, privacy settings, custom fields, timestamps, translations, and various related entities like tags, thumbnails, user details, categories, product manufacturers, product media, downloads, order line item downloads, avatar users, media folder details, property group options, mail template media, document base configs, shipping methods, payment methods, product configurator settings, order line items, CMS blocks, CMS sections, CMS pages, documents, app payment methods, and app shipping methods. This operation is useful for integrating and managing media assets within Shopware, enabling automation of media creation with rich metadata and associations.

Use Case Examples

  1. Uploading a new product image with detailed metadata and associating it with specific categories and tags.
  2. Creating a media entry for a user-uploaded document with custom fields and privacy settings.
  3. Automating the creation of media assets linked to CMS pages and blocks for dynamic content management.

Properties

Name Meaning
Response Data format for response. Empty if none is provided.
Id Unique identifier for the media entity.
User Id Identifier of the user associated with the media.
Media Folder Id Identifier of the media folder where the media is stored.
Mime Type MIME type of the media file.
File Extension File extension of the media file.
Uploaded At Timestamp when the media was uploaded.
File Name Name of the media file.
File Size Size of the media file in bytes.
Meta Data Additional metadata for the media in JSON format.
Media Type Type of the media in JSON format.
Config Configuration settings for the media in JSON format.
Alt Alternative text for the media.
Title Title of the media.
Url URL of the media. Runtime field, cannot be used as part of the criteria.
Path Path of the media file.
Has File Indicates if the media has an associated file. Runtime field, cannot be used as part of the criteria.
Private Indicates if the media is private.
Custom Fields Custom fields for the media in JSON format.
Created At Timestamp when the media was created.
Updated At Timestamp when the media was last updated.
Translated Translation data for the media in JSON format.
Extensions Extensions data for the media in JSON format.
Tags Tags associated with the media in JSON format.
Thumbnails Thumbnail images associated with the media in JSON format.
User User details associated with the media in JSON format.
Categories Categories associated with the media in JSON format.
Product Manufacturers Product manufacturers associated with the media in JSON format.
Product Media Product media associated with the media in JSON format.
Product Downloads Product downloads associated with the media in JSON format.
Order Line Item Downloads Order line item downloads associated with the media in JSON format.
Avatar Users Avatar users associated with the media in JSON format.
Media Folder Media folder details associated with the media in JSON format.
Property Group Options Property group options associated with the media in JSON format.
Mail Template Media Mail template media associated with the media in JSON format.
Document Base Configs Document base configurations associated with the media in JSON format.
Shipping Methods Shipping methods associated with the media in JSON format.
Payment Methods Payment methods associated with the media in JSON format.
Product Configurator Settings Product configurator settings associated with the media in JSON format.
Order Line Items Order line items associated with the media in JSON format.
Cms Blocks CMS blocks associated with the media in JSON format.
Cms Sections CMS sections associated with the media in JSON format.
Cms Pages CMS pages associated with the media in JSON format.
Documents Documents associated with the media in JSON format.
App Payment Methods App payment methods associated with the media in JSON format.
App Shipping Methods App shipping methods associated with the media in JSON format.

Output

JSON

  • id - Unique identifier of the created media entity
  • userId - Identifier of the user associated with the media
  • mediaFolderId - Identifier of the media folder where the media is stored
  • mimeType - MIME type of the media file
  • fileExtension - File extension of the media file
  • uploadedAt - Timestamp when the media was uploaded
  • fileName - Name of the media file
  • fileSize - Size of the media file in bytes
  • metaData - Additional metadata for the media
  • mediaType - Type of the media
  • config - Configuration settings for the media
  • alt - Alternative text for the media
  • title - Title of the media
  • url - URL of the media
  • path - Path of the media file
  • hasFile - Indicates if the media has an associated file
  • private - Indicates if the media is private
  • customFields - Custom fields for the media
  • createdAt - Timestamp when the media was created
  • updatedAt - Timestamp when the media was last updated
  • translated - Translation data for the media
  • extensions - Extensions data for the media
  • tags - Tags associated with the media
  • thumbnails - Thumbnail images associated with the media
  • user - User details associated with the media
  • categories - Categories associated with the media
  • productManufacturers - Product manufacturers associated with the media
  • productMedia - Product media associated with the media
  • productDownloads - Product downloads associated with the media
  • orderLineItemDownloads - Order line item downloads associated with the media
  • avatarUsers - Avatar users associated with the media
  • mediaFolder - Media folder details associated with the media
  • propertyGroupOptions - Property group options associated with the media
  • mailTemplateMedia - Mail template media associated with the media
  • documentBaseConfigs - Document base configurations associated with the media
  • shippingMethods - Shipping methods associated with the media
  • paymentMethods - Payment methods associated with the media
  • productConfiguratorSettings - Product configurator settings associated with the media
  • orderLineItems - Order line items associated with the media
  • cmsBlocks - CMS blocks associated with the media
  • cmsSections - CMS sections associated with the media
  • cmsPages - CMS pages associated with the media
  • documents - Documents associated with the media
  • appPaymentMethods - App payment methods associated with the media
  • appShippingMethods - App shipping methods associated with the media

Troubleshooting

  • Ensure all required fields, especially 'Id', are provided and correctly formatted.
  • Verify JSON fields like 'metaData', 'mediaType', 'config', and others are valid JSON strings before sending.
  • Check API credentials and base URL configuration for connectivity issues.
  • If the media creation fails, review the response for error messages related to permissions or data validation.

Discussion