Loading...

Webhooks

A webhook is a kind of messenger that automatically notifies an external system when changes occur within its system.

For apps to exchange data, they need to be able to communicate with each other. One way communication between online services can occur is through a webhook.

A webhook can be described as a trigger that initiates an automatic message from one software system to another, activated when specific events or activities occur. Webhooks are also known as web callbacks or HTTP push APIs and work by notifying the system that an action is necessary.

Software developers will be familiar with what a webhook is, but for those less technical, a webhook can be likened to a thread stretched between two spider webs.

If one of the threads in the web starts to vibrate, the thread between the two webs (the webhook) picks it up and notifies the other web that a change has occurred in the first one.

The data must be sent in either JSON or XML format, and the exchange of data between systems occurs via a webhook URL provided by the receiving system.

Simply put, this webhook URL can be compared to a telephone number the sender’s system can call when an action occurs in the system.

Below you can see a visual representation of how webhooks work, by pulling information from an event in one system and automatically sending this data to another system.

How a webhook communicates and acts between systems connecting them

When using webhooks, there’s no need to request data to be sent, as data is sent automatically whenever new data becomes available. This process happens automatically as soon as it’s activated, enabling efficient and prompt data exchange between systems. This means you don’t have to manually seek out the information.

What is the difference between APIs and webhooks?

Both webhooks and an API (Application Programming Interface) are used for communication and data exchange between technologies, making it challenging to distinguish between the two.

An API allows for active data retrieval upon request, while a webhook automatically sends data when a specific event occurs.

An API is request-based, meaning you have to ask an API to exchange data, known as an API call.

Conversely, webhooks are event-based, meaning a webhook exchanges data by itself when certain criteria are met or scenarios occur, thus enabling automation of data transfer between different systems.

In short, webhooks receive information, whereas an API retrieves it. APIs require an active request for information, whereas webhooks automatically pull data triggered by events.

Example of webhooks

Let’s take an example.

You’ve found a pair of sunglasses on a webshop that you want to buy, but they’re sold out.

If you choose to keep checking the webshop repeatedly to see if they’re back in stock, this can be likened to retrieving data through an API.

If, however, you decide to set up an email agent that notifies you when the sunglasses are back in stock, this can be likened to retrieving data through a webhook.

Example of webhooks in Shipmondo

In Shipmondo, webhooks can send automated updates in your shipping process. Let’s look at an example.

For instance, when an event occurs on an order, such as when the status of an order is updated from “Initiated” to “Shipped”. This means that when an event about your order occurs, Shipmondo automatically gets the information and acts accordingly.

This way, you don’t need to manually check the status of each order. Instead, you receive updates automatically via webhook, enabling you to keep track of all your orders.

This allows you to keep your customers updated about their order status and delivery progress, improving customer experience and enhancing efficiency in your shipping process.

Set up webhooks in Shipmondo

Instead of retrieving data through API calls, you can set up webhooks in Shipmondo, so data about your shipments, orders, and drafts are automatically transferred from your Shipmondo account to your system when an action occurs in Shipmondo, like creating shipments.

This ensures you receive updates about shipments, order status, and changes in drafts without delay. At the same time, you can reduce human errors or manual processes in your data transfer. ​ By implementing webhooks, you get ongoing information about your shipments, orders, or drafts, directly to your system. It’s both automatic and efficient.

Maintaining webhooks

At Shipmondo, we have created documentation that covers both our API and webhooks. We keep it updated regularly.

Our API documentation provides instructions on how to set up new webhooks. This means you can specify the URL to which the webhook should send data and define which events or actions should trigger a data exchange.

Furthermore, you can make changes to the webhooks you’ve already set up. For example, you might want to update the name or status of your webhooks, in this way, you can keep track of your webhooks and improve your overview. Similarly, you can delete a webhook if it’s no longer necessary.

Start shipping in minutes

Create an account and you're good to go

Create a free account