Skip to main content
This section covers all webhook events related to variant stocks and inventory.

Event Types

The following stock-related events are available:
  • variant_stock.updated - Triggered when variant stock quantity is updated
  • variant_stock.deleted - Triggered when variant stock is removed
  • variant_stock_delta.updated - Triggered when a stock quantity change (delta) occurs

Variant Stock Updated Event

The variant_stock.updated event is triggered when a variant’s stock quantity is updated.

Event Structure

{
  "event_type": "variant_stock.updated",
  "payload": {
    "inventory_id": "INV-123",
    "product_parent_id": "123e4567-e89b-12d3-a456-426614174000",
    "product_variant_id": "123e4567-e89b-12d3-a456-426614174001",
    "product_variant_number": "VAR-123",
    "quantity": 100,
    "inventory_date": "2024-02-12T12:00:00Z",
    "update_source": "manual",
    "available_online": true,
    "stock_updated": true
  }
}

Field Descriptions

FieldTypeDescription
inventory_idstringUnique identifier for the inventory record
product_parent_idstringID of the parent product
product_variant_idstringID of the variant
product_variant_numberstringVariant number
quantitynumberCurrent stock quantity
inventory_datestringTimestamp of the inventory update
update_sourcestringSource of the update (manual, system, etc.)
available_onlinebooleanWhether the stock is available for online purchase
stock_updatedbooleanWhether was updated in the request or not

Variant Stock Deleted Event

The variant_stock.deleted event is triggered when a variant’s stock record is removed.

Event Structure

{
  "event_type": "variant_stock.deleted",
  "payload": {
    "inventory_id": "INV-123",
    "product_parent_id": "123e4567-e89b-12d3-a456-426614174000",
    "product_variant_id": "123e4567-e89b-12d3-a456-426614174001",
    "product_variant_number": "VAR-123"
  }
}

Field Descriptions

FieldTypeDescription
inventory_idstringID of the deleted inventory record
product_parent_idstringID of the parent product
product_variant_idstringID of the variant
product_variant_numberstringVariant number

Variant Stock Delta Updated Event

The variant_stock_delta.updated event is triggered when there’s a change in stock quantity (increment or decrement).

Event Structure

{
  "event_type": "variant_stock_delta.updated",
  "payload": {
    "inventory_id": "INV-123",
    "product_variant_number": "VAR-123",
    "quantity": 5,
    "delta": -20,
    "available_online": true
  }
}

Field Descriptions

FieldTypeDescription
inventory_idstringID of the inventory record
product_variant_numberstringVariant number
quantitynumberNew total stock
deltanumberChange in quantity (positive for increase, negative for decrease)
available_onlinebooleanWhether the stock is available for online purchase