Skip to content

product/image/removed ​

Overview ​

PropertyValue
Webhook typeproduct/image/removed
Kafka topicproduct.image.removed
DirectionPlatform → Your endpoint

Description ​

Fired when an image is removed from a product.

Trigger Conditions ​

  • An operator deletes a product 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": "product/image/removed",
    "date": "2024-03-15T10:23:45.000Z"
  },
  "body": { ... }
}

The body field contains the removed image object with the parent product nested.

Note on organizationId resolution: This event uses an organizationIdAccessor pattern — the organizationId is read from data.product.organizationId.

Body — Property Table ​

Root Object ​

FieldTypeNullableDescription
productProductNoThe parent product (see Product table)
idstring (uuid)NoUnique image identifier
namestringNoImage file name
typestringNoMIME type
descriptionstringYesOptional description or alt text
bucketstringYesObject storage bucket name
destinationstringYesStorage path/key within the bucket
sourceFilestringYesOriginal upload file name
downloadUrlstringNoURL that was used to access the image (may no longer be valid after removal)
metadataobjectYesArbitrary metadata (JSON)
createdAtstring (ISO 8601)NoOriginal creation timestamp
updatedAtstring (ISO 8601)NoLast update timestamp

Product Object ​

FieldTypeNullableDescription
idstring (uuid)NoUnique product identifier
organizationIdstring (uuid)NoOrganization that owns this product
titlestringYesProduct display name
slugstringYesURL-friendly identifier
statusenumYesDRAFT, ACTIVE, ARCHIVED, DISABLED, HOLD
modelenumNoPRODUCT or BUNDLE
createdAtstring (ISO 8601)NoCreation timestamp
updatedAtstring (ISO 8601)NoLast 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/removed",
    "date": "2024-03-15T11:00:00.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-15T11:00:00.000Z"
    }
  }
}

Notes ​

  • This event uses organizationIdAccessor: (data) => data.product.organizationId.
  • The downloadUrl in the payload may no longer be accessible after the image is removed from storage.

HappyColis API Documentation