Skip to main content
Webhooks

Webhook Notifications

Receive real-time notifications when events occur in your warehouse management system.

Overview

Webhooks allow your application to receive real-time HTTP POST requests when specific events occur in your WMS. This eliminates the need for polling and enables immediate reaction to warehouse events.

Real-time Updates

Webhooks are delivered within seconds of an event occurring, enabling immediate inventory sync and order processing.

Available Events

EventDescriptionCategory
inventory.updatedInventory levels changedInventory
inventory.low_stockStock fell below thresholdInventory
order.createdNew order receivedOrders
order.pickedOrder picking completedOrders
order.shippedOrder shipped from warehouseOrders
receipt.completedInbound receipt processedReceiving
transfer.completedInventory transfer finishedTransfers

Webhook Payload

Each webhook delivery includes a JSON payload with event details and relevant data.

Example: inventory.updated
{
  "id": "evt_1234567890",
  "type": "inventory.updated",
  "timestamp": "2024-12-04T10:30:00Z",
  "data": {
    "sku": "WIDGET-001",
    "warehouse_id": "WH-001",
    "location": "A-01-01",
    "previous_quantity": 100,
    "new_quantity": 85,
    "change_reason": "order_fulfillment",
    "order_id": "ORD-2024-1234"
  },
  "signature": "sha256=..."
}

Verifying Webhooks

Always verify webhook signatures to ensure requests are from Synaptis and haven't been tampered with.

Node.js Verification
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expectedSignature = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(`sha256=${expectedSignature}`)
  );
}

Next Steps