Associate images with a product
Replaces the full set of images on a product with images Distru already hosts. Each URL must be the url of an existing product image, as GET /public/v1/products/{id} returns it, from this product or another one. Distru copies each image and attaches the copy to the product. Any other URL is rejected with a 400. To add a new image, upload the file with POST /public/v1/product-images.
This is a full replacement, not an append: the product's existing images are removed and replaced by exactly what you send. Send an empty array to remove all images; omitting image_urls does the same. The order of the array is the display order: the first URL becomes the product's primary image, and product responses list images in that order. At most 4 URLs are accepted. The operation is all-or-nothing: if any URL is rejected or fails to copy, no images are changed and the response is a 400 with a single human-readable error message.
This affects only the product's images, and updates the product's updated_datetime; it does not touch inventory or push anything to Metrc or BioTrack. On success the response is 204 with no body; re-fetch the product to see the new image URLs.
Required permission: products_permissions_edit (plus access to the product under team restrictions).
BearerAuthorizationBearer <token>API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.
id*stringProduct ID.
The product's new set of images
application/json- body
image_urls?array<string>URLs of existing Distru product images, in display order (first = primary image). At most 4. An empty array, or omitting the field, removes every image from the product.
Images updated successfully
curl -X POST 'https://app.distru.com/public/v1/products/550e8400-e29b-41d4-a716-446655440000/images' \ -H 'Content-Type: application/json' \ -d '{}'