Purpose: learn the basics about webhooks and how you can configure them in your Sendcloud panel.
For more information on Sendcloud webhooks, please see the Webhooks sections in our API documentation.
What are webhooks?
Webhooks make it possible for applications to communicate with each other in 'real time'. Another way for applications to communicate is via an API. As opposed to an API that works with polling, a webhook receives data as soon as the application handles it. No request needs to be made as it's an automatic process. Therefore you don't have to worry about a delay in communication.
Webhook: a webhook doesn't pull data but is getting data pushed from the application as soon as it occurs.
Example: receiving tracking updates from Sendcloud
(See images below for reference)
- When you receive tracking update via the API it goes as followed:
Your application tries pulling tracking data from Sendcloud through interval. It will do so even when no new data is available.
- When you want to receive tracking updates via a webhook it goes as followed:
Sendcloud pushes the tracking updates to your application as soon as it's available in Sendcloud.
Webhook Integration Object: this webhook comes into play when a new API integration is added to Sendcloud. It gets triggered when an API integration is connected, deleted, or updated. Click here to see what's in the payload of this webhook.
Webhook Parcel Status Changed Object: this webhook comes into play when a parcel status changes; no matter what the change in status is. Click here to see what's in the payload of this webhook.
Webhook Refund Requested Object: this webhook comes into play when a refund is requested. Click here to see what's in the payload of this webhook.
How to setup webhooks in Sendcloud?
In order to have Sendcloud actively communicate parcel updates (such as tracking updates), you need to create an API endpoint. Whenever an update occurs, Sendcloud will make a request through that endpoint. For more information, see the Webhooks section in our API documentation.
- Copy the webhook url from your application to your clipboard
- Go to your Sendcloud panel and open your integration settings by going to Settings > Integrations > Configure
- Select the box at Webhook feedback enabled
- Find the Webhook url field (see image below) and paste you webhook url in there
- Test your webhook by clicking on the
Test API webhookbutton
- Click on
Done! Your webhook is now set up and the payload should start coming in at your application. You can use this to set up triggers that lead to certain actions. An example would be to connect your tracking emails to the incoming tracking updates. This way you'll be able to give instant updates to your customers.
For return parcels, you will receive webhook updates only if the outgoing shipment was created through the API Shop.
Click here to go to our Sendcloud API reference and see the payload of the webhook.