BigblueDevelopers

Inventory update

Sent when stock changes for one or more products. Up to 100 rows per request.

Bigblue sends this event when stock changes, for example when an inbound shipment is received, an order is reserved or shipped, a return arrives or the warehouse corrects a count.

Headers

X-Bigblue-Event-Type: INVENTORY_UPDATE
X-Bigblue-Hmac-SHA256: <base64 HMAC-SHA256 of the raw body>
Content-Type: application/json
User-Agent: Bigblue-Webhook-Engine

Body

update_timestringrequired

When Bigblue created this event, RFC 3339 UTC.

inventoriesInventoryUpdate[]required

Changed rows. Up to 100 per request. Larger changes are split across several requests.

InventoryUpdate

productstring

Product ID. Bundles aren't included. Calculate them from their components.

warehousestring

Warehouse ID.

product_namestring

Product name.

barcodestring

Product barcode.

availableinteger

Units you can sell now.

reservedinteger

Units reserved for unshipped orders. This field isn't in ListInventories.

damagedinteger

Damaged units.

quality_controlinteger

Units held for inspection.

expiredinteger

Expired units.

backorderedinteger

Units ordered that stock couldn't cover.

Counts per lot. Only for products with track_lots. Up to 100 lots.

There is no in_warehouse field. It equals available + reserved.

Example

{
  "update_time": "2026-03-17T09:12:04Z",
  "inventories": [
    {
      "warehouse": "FR-CDG-001",
      "product": "BGBL-ESPSRT-SMAL",
      "product_name": "Espresso T-shirt, Small",
      "barcode": "3401579800127",
      "available": 410,
      "reserved": 18,
      "damaged": 2,
      "quality_control": 0,
      "expired": 0,
      "backordered": 0
    },
    {
      "warehouse": "FR-CDG-001",
      "product": "BGBL-COFBEA-1KGX",
      "product_name": "Coffee beans 1 kg",
      "barcode": "3401579811116",
      "available": 348,
      "reserved": 24,
      "damaged": 4,
      "quality_control": 480,
      "expired": 12,
      "backordered": 0,
      "lots": [
        {
          "lot_code": "L2026-02",
          "lot_expiration_date": "2027-02-28",
          "in_warehouse": 372,
          "damaged": 4,
          "expired": 12
        }
      ]
    }
  ]
}

Handling the event

Each row has the current values. Overwrite what you have stored. Don't add or subtract.

async function onInventoryUpdate(body: InventoryUpdatePayload) {
  for (const row of body.inventories) {
    await db.stock.upsert({
      where: { product_warehouse: { product: row.product, warehouse: row.warehouse } },
      update: {
        available: row.available,
        reserved: row.reserved,
        damaged: row.damaged,
        qualityControl: row.quality_control,
        expired: row.expired,
        backordered: row.backordered,
        updateTime: body.update_time,
      },
      create: { /* ... */ },
    });
  }
}

Before your first event

Events are only created after you register an INVENTORY_UPDATE webhook. Past changes aren't sent. Load your current stock with ListInventories after registering.

On this page