Webhook Filters
Granular Webhooks support filtering to reduce the volume of webhook messages you receive. Different webhook types support different filtering options.
Event Webhooks (shipments.v1.event.*)
Event webhooks support filtering by both event types and transportation modes.
Applies to: shipments.v1.event.added, shipments.v1.event.updated, shipments.v1.event.removed
Filter by Event Type
Use includeEvents to only receive notifications for specific event types:
"webhookConfiguration": { "webhookEventType": "shipments.v1.event.added", "shipmentV1Event": { "includeEvents": ["ARRIVAL_AT_STOP", "WARNING"] } }
In this configuration, you will only receive events that have the specified type.
Filter by Transportation Mode
"webhookConfiguration": { "webhookEventType": "shipments.v1.event.added", "shipmentV1Event": { "includeTransportationModes": ["TRUCKLOAD"] } }
Example Scenarios
Let's say you have set up a webhook to listen to TRUCKLOAD updates. Then consider the following scenarios:
| Scenario | Result |
|---|---|
| Uni-modal Ocean shipment (no other route legs) | No webhook updates will be sent |
| Truckload shipment (regardless of other present route legs) | Webhook updates will be sent |
| Multi-modal shipment that contains Truckload segment | All webhook updates will be sent (also for other modes) |
State Webhooks (shipments.v1.state.*)
State webhooks support filtering by transportation modes.
Applies to: shipments.v1.state.added, shipments.v1.state.updated, shipments.v1.state.removed
Filter by Transportation Mode
"webhookConfiguration": { "webhookEventType": "shipments.v1.state.added", "shipmentV1State": { "includeTransportationModes": ["TRUCKLOAD"] } }
Supported Transportation Modes
| Mode |
|---|
| OCEAN |
| RAIL |
| AIR |
| TRUCKLOAD |
| PARCEL |
| LTL |
Other Webhook Types
The following webhook types do not currently support filtering options:
shipments.v1.shipment.createdshipments.v1.shipment.deletedshipments.v1.exception.addedOrUpdated