Webhooks enable real-time communication between your web application and ShipEngine. They allow ShipEngine to automatically send data to your app as soon as a specific event occurs.
In ShipEngine, the following webhook events are available:
-
Tracking: get updates on any tracking event.
-
Batch Completed: get updates for completed batches.
-
Rate Updated: get updates when a shipment rate has been updated.
-
Carrier Connected: get updates when a carrier is connected.
-
Report Complete: get updates when a requested report is ready.
-
Order Source Refresh Complete: get updates when an order source has been refreshed.
-
Sales Order Imported (Beta): get updated information for imported sales orders.
The following are required to set up and run webhooks in ShipEngine:
-
You must be in the Production environment of the ShipEngine dashboard to set up webhooks. Otherwise, the buttons and features will not be available.
-
Connect a carrier account first
-
A carrier account must be connected to your ShipEngine account for automatic tracking updates to work correctly.
For example, if you want to track FedEx packages, you must have a FedEx account connected to ShipEngine.
-
-
Connect an order source
-
If you want to build an Order Source Refresh or Sales Order Imported webhook, you must have an order source connected.
-
You can create webhooks in your ShipEngine dashboard or via the API. Learn more about creating a webhook via the API.
To set up a webhook in the dashboard:
-
Select Webhooks from the left-side menu.
-
Click the Add new webhook button.
-
Select the webhook event type from the Webhook event drop-down menu.
-
Enter the URL that you want webhooks to be delivered to in the Webhook URL field.
-
Ensure the Status is toggled to On, and click the checkmark to save your webhook.
You now have an active webhook!
To completely remove a webhook from your account, you can use your ShipEngine account dashboard or the Delete Webhook endpoint.
Stop Tracking for Specific Tracking Number
To stop tracking webhook updates for a specific tracking number, use the Stop Tracking Updates endpoint.
To remove a webhook from the dashboard:
-
Each webhook returns a unique payload that includes information specific to each event. For the full schema of each webhook, see our guide Webhooks Schemas.
-
ShipEngine can track labels created outside of our API as long as we have an integration with the carrier. To set up automatic tracking updates for labels created outside of ShipEngine, you must start tracking updates at the Start Tracking endpoint.
-
It is possible to successfully create a webhook in the ShipEngine sandbox environment. However, the sandbox does not create real labels that will be shipped, which means there will be no events for the webhook.