POST

/v1/webhooks

Creates a new webhook subscription for the specified event. Webhooks allow your application to receive real-time notifications when specific events occur in the system. This endpoint enables you to configure automated HTTP POST requests that will be sent to your specified URL whenever the subscribed event is triggered. You can customize which clients trigger the webhook and control the active state of the subscription.

LOGIWA DTC FULFILLMENT SUCCESS

Welcome to Logiwa IO Webhook Platform

Receive real-time event notifications from your Logiwa IO warehouse via webhooks.

Get Started in Minutes

1

Authenticate

Obtain your JWT authentication token from your dashboard

2

Choose Events

Select which events you want to monitor and receive notifications for

3

Create Webhook

Configure your webhook endpoint URL and event subscriptions

4

Receive Events

Start receiving real-time notifications at your endpoint

Ready to get started?

Follow our step-by-step guide to begin receiving webhooks

Parameters

url string required
The destination URL where webhook events will be sent via HTTP POST. Must be a valid HTTPS URL.
Example: "https://api.example.com/webhooks/orders"
Validation: Must be a valid HTTPS URL, maximum length 2048 characters
event string required
The event ID that triggers this webhook. This must be a valid event ID obtained from the /v1/events endpoint. The system validates that the event exists and is active before creating the webhook.
Example: "ShipmentOrderCreated"
Validation: Must be a valid, active event ID from the events list. Call GET /v1/events to retrieve available events.
allowedClientIdentifiers array required
Array of client GUIDs that this webhook should trigger for. Use an empty array to trigger for all clients.
Example: ["a1b2c3d4-e5f6-7890-abcd-ef1234567890", "b2c3d4e5-f6a7-8901-bcde-f12345678901"] or [] for all clients
name string optional
User-friendly name for the webhook. If not provided, a name will be auto-generated based on the event type.
Example: "Order Processing Webhook"
active boolean optional
Whether the webhook is active and should receive events. Defaults to true if not specified.
Example: true

Response Schema

Returns a webhook object if successful. The response includes the generated webhook ID and complete webhook configuration.
id string Unique identifier for the webhook
name string User-friendly name for the webhook
url string Destination URL where webhook events will be sent
event string Event ID that triggers this webhook
description string Optional description of the webhook
headers object Custom headers to include with webhook requests
active boolean Whether the webhook is active and should receive events
created_at timestamp ISO 8601 timestamp of creation
updated_at timestamp ISO 8601 timestamp of last update

Status Codes

201 Created Webhook created successfully
400 Bad Request Invalid parameters or malformed request
401 Unauthorized Invalid or missing authentication token
422 Unprocessable Entity URL validation failed or event type not supported

Example code

curl -X POST https://webhook.logiwa.com/v1/webhooks \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.example.com/webhooks/shipments",
    "event": "ShipmentOrderCreated",
    "allowedClientIdentifiers": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890", "b2c3d4e5-f6a7-8901-bcde-f12345678901"],
    "active": true,
    "name": "Shipment Order Webhook",
    "description": "Webhook for processing new shipment order notifications",
    "headers": {
      "Authorization": "Bearer webhook-token",
      "X-Custom-Header": "logiwa-webhook"
    }
  }'
const response = await fetch('https://webhook.logiwa.com/v1/webhooks', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://api.example.com/webhooks/shipments',
    event: 'ShipmentOrderCreated',
    allowedClientIdentifiers: ['a1b2c3d4-e5f6-7890-abcd-ef1234567890', 'b2c3d4e5-f6a7-8901-bcde-f12345678901'],
    active: true,
    name: 'Shipment Order Webhook',
    description: 'Webhook for processing new shipment order notifications',
    headers: {
      'Authorization': 'Bearer webhook-token',
      'X-Custom-Header': 'logiwa-webhook'
    }
  })
});

const data = await response.json();
console.log(data);
import requests

url = "https://webhook.logiwa.com/v1/webhooks"
headers = {
    "Authorization": "Bearer YOUR_JWT_TOKEN",
    "Content-Type": "application/json"
}
payload = {
    "url": "https://api.example.com/webhooks/shipments",
    "event": "ShipmentOrderCreated",
    "allowedClientIdentifiers": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890", "b2c3d4e5-f6a7-8901-bcde-f12345678901"],
    "active": True,
    "name": "Shipment Order Webhook",
    "description": "Webhook for processing new shipment order notifications",
    "headers": {
        "Authorization": "Bearer webhook-token",
        "X-Custom-Header": "logiwa-webhook"
    }
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data)

Sample Response

Response 201 Created
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Shipment Order Webhook",
  "url": "https://api.example.com/webhooks/shipments",
  "event": "ShipmentOrderCreated",
  "description": "",
  "headers": {},
  "active": true,
  "created_at": "2024-01-10T10:30:00Z",
  "updated_at": "2024-01-10T10:30:00Z"
}