Configuring a Granular Webhook (formerly, Unified Webhook)
What is Granular Webhook
Granular Webhook is a set of new webhook APIs that improve upon an existing implementation:
Delta. The new webhook indicates what exactly has changed in the shipment.
Payload size. Instead of sending the whole shipment payload each time something changes (i.e. ETA), Granular Webhook allows you to configure what kind of information you would like to receive (i.e. such as "event being added") without including the full history of events and positions.
Update Frequency. Though the new webhook sends more updates, the payloads are much smaller and allow you to quickly discard events that you are not interested in, reducing load on your database.
Filtering. You can specify what shipment events you are interested in, which allows to further reduce the volume of inbound requests.
Configuration
To configure a webhook you send a PUT request to project44 API: Create or update a push configuration.
Specify webhookConfiguration.webhookEventType field to use one of the supported Granular Webhook configurations.
Once the webhook is configured you will start receiving the new messages from our system.
Supported Webhook Types
| Webhook Event Type | Description | Documentation |
|---|---|---|
shipments.v1.event.added | Sent when a new event is added to a shipment | Event Added |
shipments.v1.event.updated | Sent when an existing event is updated | Event Updated |
shipments.v1.event.removed | Sent when an event is removed from a shipment | Event Removed |
shipments.v1.state.added | Sent when a new state is added to a shipment | State Added |
shipments.v1.state.updated | Sent when an existing state is updated | State Updated |
shipments.v1.state.removed | Sent when a state is removed from a shipment | State Removed |
shipments.v1.shipment.created | Sent once when a new shipment is created | Shipment Created |
shipments.v1.shipment.deleted | Sent when a shipment is deleted | Shipment Deleted |
shipments.v1.exception.addedOrUpdated | Sent when an exception is added or updated | Exception Added/Updated |
Example Request
PUT /api/v4/webhooks
{ "webhookConfiguration": { "webhookEventType": "shipments.v1.event.added" }, "authParams": {}, "authType": "API_KEY", "authenticationMethods": [ { "parameters": {}, "type": "API_KEY" } ], "configName": "my-event-webhook", "method": "POST", "methodParams": {}, "payloadFormat": "JSON", "url": "https://example.com", "version": 0 }
Filtering Options
Granular Webhooks support filtering by event types and transportation modes. Different filters are available depending on the webhook type.
For detailed filtering configuration, see Webhook Filters.
Including More Information On Webhook Message
By default, each webhook message comes with a minimal context field that is relevant to that message. For example, for shipment events it is only provided with shipment context that includes:
ididentifiersattributes- Created and modified timestamp
- Share link
Example Message
{ "eventId": "333d2a1b-d332-4775-8f8e-960e5f538431", "eventType": "shipments.v1.event.added", "createdDateTime": "2025-03-31T17:01:42.92601441Z", "dataType": "EventChange", "context": { "shipment": { "shipmentId": "ac694c91-e308-4329-9584-ee10acb937b3", "identifiers": [ { "type": "BILL_OF_LADING", "value": "BOL123" } ], "attributes": [], "createdDateTime": "2025-03-31T17:01:42.92601441Z", "lastModifiedDateTime": "2025-03-31T17:01:42.92601441Z", "shipmentShareLink": "..." } }, "data": {} }
You can request additional information to be provided on the message by specifying includeContext configuration on the webhook configuration payload.
"webhookConfiguration": { "shipmentV1Event": { "includeContext": ["SHIPMENT", "ROUTE", "RELATED_SHIPMENTS"] } }
Supported Context Types
| Context Type | Description |
|---|---|
SHIPMENT | (default) High-level shipment information that includes identifiers, attributes and shipment ID. |
ROUTE | Route information of the shipment that includes all stops and route segments. |
RELATED_SHIPMENTS | List of related (parent or child) shipment IDs. |
For detailed examples of each context type, see Context Types.
Example Request
PUT /api/v4/webhooks
{ "authParams": {}, "authType": "API_KEY", "authenticationMethods": [ { "parameters": {}, "type": "API_KEY" } ], "configName": "my-event-webhook", "method": "POST", "methodParams": {}, "payloadFormat": "JSON", "url": "https://example.com", "version": 0, "webhookConfiguration": { "webhookEventType": "shipments.v1.event.added", "shipmentV1Event": { "includeContext": ["SHIPMENT", "ROUTE", "RELATED_SHIPMENTS"] } } }