commercetools icon

commercetools

Interact with the commercetools API. Operations are auto-generated from the official Postman collection.

Actions671

Store Product → Upload ProductTailoring image by Product Key

AI-generated

Summary

Upload a product tailoring image to a specified product variant within a store by using the product key. The image is fetched by commercetools from a publicly accessible URL and attached to the product variant's images, optionally specifying the filename and whether the change is staged or current.

Inputs

  • Store Product Key (required) — Key identifying the store product to which the image will be uploaded.
  • Store Key (required) — Key identifying the store where the product resides.
  • Product Key (required) — Key of the product to which the tailoring image will be attached.
  • Image URL (required) — Public URL (JPEG, PNG, or GIF, max 10 MB) from which commercetools fetches the image to upload.
  • Filename — Optional filename to associate with the uploaded image.
  • Variant ID — ID of the ProductVariant to which the image will be attached; use 0 to target the Master Variant.
  • SKU — SKU of the ProductVariant as an alternative to specifying Variant ID.
  • Staged — Boolean indicating whether to apply the image to staged (true) or current (false) product data; defaults to true.

Output shape

a single JSON object reflecting the API response after uploading the image

The returned JSON includes details from the commercetools API about the updated product variant including the newly attached tailoring image. Errors during upload will throw or be included if configured to continue on fail.

Links

Discussion