Upload and attach a product image
ecommerce_uploadAndAttachAProductImageV1Fetch or attach a product image from a URL or upload key in a single call. Optionally set it as the product's thumbnail. The image is virus-scanned, validated, and saved to CDN.
Instructions
Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. Image downloads require HTTPS on port 443 without embedded credentials. At most one redirect is allowed, and its destination must meet the same requirements. Private or reserved network destinations, unsupported URLs and longer redirect chains are rejected. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product's primary image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store_id | Yes | The ID of the store the product belongs to. | |
| image_url | No | Publicly reachable URL of a raster image (JPEG, PNG, GIF or WebP), maximum 15MB. Fetching the image requires HTTPS on port 443 without embedded credentials. At most one redirect is allowed; its destination must meet the same URL requirements. Private or reserved network destinations, unsupported URLs and longer redirect chains are rejected. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. Provide either this or object_name. | |
| product_id | Yes | The ID of the product to attach the image to. | |
| object_name | No | Key returned by the upload-url endpoint. Provide this instead of image_url to attach an uploaded image. | |
| is_thumbnail | No | When true, the image becomes the product's thumbnail (primary image). When omitted, it becomes the thumbnail only if the product does not have one yet. |