Webhooks
In addition to retrieving shipment updates via the GET APIs you can receive them by webhook PUSH. A webhook is an endpoint hosted by you that you have registered to receive shipment updates on. When you have a webhook configured, changes to your shipments will be sent (pushed) to your hosted endpoint via HTTP request as a request body using the same format as the JSON response body for the Get Full Tracking History endpoint: /api/v4/shipments/{shipmentId}/tracking/history.
PUSH
updates are sent on all shipments to include those created by the user (e.g., using the BILL_OF_LADING
(BOL) or BOOKING_NUMBER
(BN)) and those discovered by project44 (e.g., containers for Ocean shipments).
BOL
s and BN
s send very few updates through their lifecycles. These updates only relate to shipment creation and tracking completion. In the payload for each tracking update, the relatedShipments
array includes an overview of all discovered containers and their associated identifiers.
Containers send updates with each new GPS
position or milestone event. The container is identified in the payload with its internal project44 shipment ID
, or Master Shipment ID
(this is the id returned in the 200 OK
response during shipment creation). This ID is specified in the relatedShipments
array of the BOL/booking shipment. Conversely, when receiving push updates, the relatedShipments
array contains the BOL related to the designated container.
Each new event message includes all events related to the shipment. For position updates, only the latest is included in each new message.
For full details on creating a webhook see the Webhook Guide.