Shopware icon

Shopware

Shopware

Actions778

Product Media → Update Product Media

AI-generated

Overview

This node operation updates a Product Media entity in the Shopware system. It allows users to modify details of product media such as media ID, position, associated product information, and custom fields. This operation is useful for managing and organizing media assets linked to products, ensuring that product images, videos, or other media are correctly updated and associated with the right product versions.

Use Case Examples

  1. Updating the position of a product image to change its display order on the product page.
  2. Modifying the media details linked to a product, such as updating tags or custom fields for better categorization.
  3. Changing the associated product or version for a media item to reflect product updates or corrections.

Properties

Name Meaning
Id Identifier for the product_media entity to update. This is required to specify which product media record to modify.
_response Data format for the response. This can be used to specify the desired response format or left empty.
versionId Version identifier for the product media, used to specify the version of the media being updated.
Product Id Identifier of the product to which the media is linked. Required to associate the media with the correct product.
Product Version Id Version identifier for the product, specifying which version of the product the media is associated with.
Media Id Identifier of the media asset being linked or updated. Required to specify the media item.
Position Position of the media in the product media list, used to order media items.
Custom Fields Custom fields in JSON format for additional metadata or custom data related to the product media.
Created At Timestamp indicating when the product media was created.
Updated At Timestamp indicating when the product media was last updated.
Product JSON object representing detailed product information associated with the media. This can include nested product data and related entities.
Media JSON object representing detailed media information, including extensions, tags, thumbnails, and related entities.
Cover Products JSON array representing products that use this media as a cover image, including detailed nested product data.

Output

JSON

  • id - The identifier of the updated product media.
  • versionId - The version identifier of the updated product media.
  • productId - The identifier of the product associated with the media.
  • productVersionId - The version identifier of the product associated with the media.
  • mediaId - The identifier of the media asset linked to the product media.
  • position - The position of the media in the product media list.
  • customFields - Custom fields associated with the product media.
  • createdAt - Timestamp when the product media was created.
  • updatedAt - Timestamp when the product media was last updated.
  • product - Detailed product information associated with the media.
  • media - Detailed media information linked to the product media.
  • coverProducts - Products that use this media as a cover image.

Dependencies

  • Shopware API with appropriate credentials

Troubleshooting

  • Ensure all required fields (Id, Product Id, Media Id) are provided to avoid validation errors.
  • Check API credentials and permissions to ensure the node can update product media in Shopware.
  • Verify JSON format for complex fields like Custom Fields, Product, Media, and Cover Products to prevent parsing errors.
  • Timeouts or network issues may occur; adjust timeout and proxy settings in Request Options if needed.

Discussion