ecommerce_uploadAndAttachAProductImageV1
Fetch a raster image from a URL, virus-scan it, and attach it to a product in one call. Set is_thumbnail to make it the primary product image.
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. 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 the raster image (JPEG, PNG, GIF or WebP), maximum 15MB. 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. |