Skip to main content

Webhooks

Webhooks allow your application to receive real-time HTTP notifications when events occur in ZenFlow. Instead of polling the API, webhooks push data to your server as soon as something happens.

How It Works

  1. Subscribe to one or more topics (events)
  2. When an event occurs, ZenFlow sends a POST to your URL
  3. Your server responds with 2xx to acknowledge receipt
  4. If delivery fails, ZenFlow retries with exponential backoff

Subscribe to Webhooks

To receive notifications, create a webhook specifying your URL and the events you’re interested in:
Save the secret returned in the response. You’ll need it to verify signatures. It won’t be shown again.

Available Topics

Orders

Triggered when a new order is created in ZenFlow.Payload:
Triggered when order details are modified (state, items, etc).Payload:
Triggered when an order is cancelled.Payload:
Triggered when an order completes fulfillment (picked and ready for shipping).Payload:

Products

Triggered when a new product is created.Payload:
Triggered when product details are modified.Payload:
Triggered when a product is deleted.Payload:

Stock

Triggered when a product’s stock level changes at a location.Payload:
reason values:
  • order_fulfillment - Order picking
  • manual_adjustment - Manual adjustment
  • stock_receipt - Goods receipt
  • transfer - Location transfer
  • return - Return
  • inventory_count - Inventory count
Triggered when a product’s stock falls below the configured minimum threshold.Payload:
Triggered when a stock movement is recorded (receipt, dispatch, transfer).Payload:

Picking Flows

Triggered when an operator starts a picking flow.Payload:
Triggered when a picking flow completes successfully.Payload:
Triggered when a picking flow is cancelled.Payload:

Payload Structure

All payloads follow this base structure:

Verifying Webhooks

Always verify webhook signatures to ensure requests come from ZenFlow.

Signature Format

ZenFlow includes a signature in the X-Webhook-Signature header:
  • t: Unix timestamp when the webhook was sent
  • v1: HMAC-SHA256 signature

Verification Process

Retry Policy

If webhook delivery fails, ZenFlow retries with exponential backoff: A delivery is considered failed if:
  • Your server returns a non-2xx status code
  • Connection times out (30 seconds default)
  • SSL/TLS errors occur

Best Practices

Respond Quickly

Return 200 immediately, process async

Handle Duplicates

Use event ID for idempotency

Verify Signatures

Always validate webhook signatures

Use HTTPS

Only use HTTPS webhook URLs

Async Processing

Managing Webhooks

View Delivery History

Test Your Webhook

This sends a test event to verify your endpoint is working.

Rotate Secret

If your webhook secret is compromised:
Update your server with the new secret before the old one expires.