Skip to content

stock_reference/sku_updated

Overview

PropertyValue
Webhook typestock_reference/sku_updated
Kafka topicstock-reference.sku-updated
DirectionPlatform → Your endpoint

Description

Fired when the SKU (Stock Keeping Unit) of a stock reference is changed. This is a dedicated event for SKU changes because SKU is a critical identifier used in order lines, integrations, and WMS systems.

Trigger Conditions

  • An operator manually updates the SKU on a stock reference
  • A product variant SKU is synchronized to its linked stock reference

Message Envelope

json
{
  "header": {
    "organizationId": "org_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "messageId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "webhookId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "type": "stock_reference/sku_updated",
    "date": "2024-03-15T10:23:45.000Z"
  },
  "body": { ... }
}

The body field contains the full stock reference with the updated SKU.

Body — Property Table

StockReference Object

FieldTypeNullableDescription
idstring (uuid)NoUnique stock reference identifier
organizationIdstring (uuid)NoOrganization that owns this stock reference
locationIdstring (uuid)YesWarehouse location
productVariantIdstring (uuid)NoAssociated product variant
referencestringNoInternal reference code
skustringNoUpdated stock keeping unit identifier
statusenumNoDRAFT, VALID, ON_HOLD, INVALID
modelenumNoPRODUCT or BUNDLE
physicalQuantityintegerNoTotal physical quantity
usableQuantityintegerNoAvailable quantity
reservedQuantityintegerNoReserved quantity
criticalThresholdintegerNoAlert threshold
lastSnapshotAtstring (ISO 8601)YesTimestamp of the last inventory snapshot
lastSnapshotValueintegerYesQuantity at last snapshot
heightfloatYesProduct height
widthfloatYesProduct width
lengthfloatYesProduct length
distanceUnitenumYesUnit for dimensions
weightfloatYesProduct weight
weightUnitenumYesUnit for weight
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": "stock_reference/sku_updated",
    "date": "2024-03-15T10:23:45.000Z"
  },
  "body": {
    "id": "d4e5f6a7-b8c9-0123-defa-234567890123",
    "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "locationId": "e5f6a7b8-c9d0-1234-efab-345678901234",
    "productVariantId": "f6a7b8c9-d0e1-2345-fabc-456789012345",
    "reference": "REF-TSHIRT-WHITE-M",
    "sku": "TSHIRT-WHT-M-V2",
    "status": "VALID",
    "model": "PRODUCT",
    "physicalQuantity": 150,
    "usableQuantity": 140,
    "reservedQuantity": 10,
    "criticalThreshold": 5,
    "lastSnapshotAt": "2024-03-15T08:00:00.000Z",
    "lastSnapshotValue": 145,
    "height": 2.0,
    "width": 20.0,
    "length": 30.0,
    "distanceUnit": "CM",
    "weight": 0.25,
    "weightUnit": "KG",
    "createdAt": "2024-03-10T09:00:00.000Z",
    "updatedAt": "2024-03-15T10:23:45.000Z"
  }
}

Notes

  • The organizationId is read directly from data.organizationId.
  • Downstream systems (WMS integrations, 3PLs) should listen to this event to update their SKU mapping tables, as SKU changes may break inbound/outbound matching.
  • Both stock_reference/sku_updated and stock_reference/updated may fire for the same SKU change.

HappyColis API Documentation