product/image/created
Overview
| Property | Value |
|---|---|
| Webhook type | product/image/created |
| Kafka topic | product.image.created |
| Direction | Platform → Your endpoint |
Description
Fired when a new image is attached to a product.
Trigger Conditions
- An image is uploaded and associated with a product via the API
Message Envelope
json
{
"header": {
"organizationId": "org_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"messageId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"webhookId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "product/image/created",
"date": "2024-03-15T10:23:45.000Z"
},
"body": { ... }
}The body field contains the image object with the parent product nested.
Note on
organizationIdresolution: This event uses anorganizationIdAccessorpattern — theorganizationIdis read fromdata.product.organizationId.
Body — Property Table
Root Object
| Field | Type | Nullable | Description |
|---|---|---|---|
product | Product | No | The parent product (see Product table) |
id | string (uuid) | No | Unique image identifier |
name | string | No | Image file name |
type | string | No | MIME type (e.g., image/jpeg) |
description | string | Yes | Optional description or alt text |
bucket | string | Yes | Object storage bucket name |
destination | string | Yes | Storage path/key within the bucket |
sourceFile | string | Yes | Original upload file name |
downloadUrl | string | No | Public URL to access the image |
metadata | object | Yes | Arbitrary metadata (JSON) |
createdAt | string (ISO 8601) | No | Creation timestamp |
updatedAt | string (ISO 8601) | No | Last update timestamp |
Product Object
| Field | Type | Nullable | Description |
|---|---|---|---|
id | string (uuid) | No | Unique product identifier |
organizationId | string (uuid) | No | Organization that owns this product |
title | string | Yes | Product display name |
slug | string | Yes | URL-friendly identifier |
status | enum | Yes | DRAFT, ACTIVE, ARCHIVED, DISABLED, HOLD |
model | enum | No | PRODUCT or BUNDLE |
createdAt | string (ISO 8601) | No | Creation timestamp |
updatedAt | string (ISO 8601) | No | Last update timestamp |
Full JSON Payload Sample
json
{
"header": {
"organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"messageId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"webhookId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"type": "product/image/created",
"date": "2024-03-15T10:23:45.000Z"
},
"body": {
"id": "f7a8b9c0-d1e2-3456-fabc-789012345678",
"name": "tshirt-white-front.jpg",
"type": "image/jpeg",
"description": "Front view of the white t-shirt",
"bucket": "happycolis-media",
"destination": "products/d4e5f6a7/tshirt-white-front.jpg",
"sourceFile": "tshirt-white-front.jpg",
"downloadUrl": "https://cdn.example.com/products/d4e5f6a7/tshirt-white-front.jpg",
"metadata": null,
"createdAt": "2024-03-15T10:23:45.000Z",
"updatedAt": "2024-03-15T10:23:45.000Z",
"product": {
"id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Classic White T-Shirt",
"slug": "classic-white-t-shirt",
"status": "ACTIVE",
"model": "PRODUCT",
"createdAt": "2024-03-15T09:00:00.000Z",
"updatedAt": "2024-03-15T10:23:45.000Z"
}
}
}Related Events
product/image/removed— fired when an image is removed from a productproduct/updated— general product update event
Notes
- This event uses
organizationIdAccessor: (data) => data.product.organizationId. downloadUrlis a publicly accessible CDN URL; no authentication is required to download the image.