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
| Event | Description | Category |
|---|---|---|
inventory.updated | Inventory levels changed | Inventory |
inventory.low_stock | Stock fell below threshold | Inventory |
order.created | New order received | Orders |
order.picked | Order picking completed | Orders |
order.shipped | Order shipped from warehouse | Orders |
receipt.completed | Inbound receipt processed | Receiving |
transfer.completed | Inventory transfer finished | Transfers |
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}`)
);
}