variant/image/removed
Overview
| Property | Value |
|---|---|
| Webhook type | variant/image/removed |
| Kafka topic | variant.image-removed |
| Direction | Platform → Your endpoint |
Description
Fired when an image is removed from a variant.
Trigger Conditions
- An operator deletes a variant image 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": "variant/image/removed",
"date": "2024-03-15T10:23:45.000Z"
},
"body": { ... }
}The body field contains the removed image object with the parent variant nested.
Note on
organizationIdresolution: This event uses anorganizationIdAccessorpattern — theorganizationIdis read fromdata.variant.organizationId.
Body — Property Table
Root Object (VariantImage)
| Field | Type | Nullable | Description |
|---|---|---|---|
id | string (uuid) | No | Unique image identifier |
name | string | No | Image file name |
type | string | No | MIME type |
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 | URL (may no longer be valid after removal) |
metadata | object | Yes | Arbitrary metadata (JSON) |
variant | Variant | No | The parent variant (see Variant table) |
createdAt | string (ISO 8601) | No | Original creation timestamp |
updatedAt | string (ISO 8601) | No | Last update timestamp |
Variant Object
| Field | Type | Nullable | Description |
|---|---|---|---|
id | string (uuid) | No | Unique variant identifier |
organizationId | string (uuid) | No | Organization that owns this variant |
productId | string (uuid) | No | Parent product identifier |
title | string | Yes | Variant display name |
reference | string | No | Internal reference code |
sku | string | No | Stock keeping unit |
model | enum | No | PRODUCT or BUNDLE |
status | enum | Yes | DRAFT, ACTIVE, ARCHIVED, DISABLED, HOLD |
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": "variant/image/removed",
"date": "2024-03-15T11:00:00.000Z"
},
"body": {
"id": "f7a8b9c0-d1e2-3456-fabc-789012345678",
"name": "tshirt-white-m-side.jpg",
"type": "image/jpeg",
"description": "Side view of the white t-shirt size M",
"bucket": "happycolis-media",
"destination": "variants/d4e5f6a7/tshirt-white-m-side.jpg",
"sourceFile": "tshirt-white-m-side.jpg",
"downloadUrl": "https://cdn.example.com/variants/d4e5f6a7/tshirt-white-m-side.jpg",
"metadata": null,
"createdAt": "2024-03-15T10:23:45.000Z",
"updatedAt": "2024-03-15T10:23:45.000Z",
"variant": {
"id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"productId": "e5f6a7b8-c9d0-1234-efab-345678901234",
"title": "Classic White T-Shirt — Size M",
"reference": "REF-TSHIRT-WHITE-M",
"sku": "TSHIRT-WHITE-M",
"model": "PRODUCT",
"status": "ACTIVE",
"createdAt": "2024-03-15T09:00:00.000Z",
"updatedAt": "2024-03-15T11:00:00.000Z"
}
}
}Related Events
variant/image/created— fired when an image is added to a variant
Notes
- This event uses
organizationIdAccessor: (data) => data.variant.organizationId. - The
downloadUrlin the payload may no longer be accessible after the image is removed from storage.