Introduction

This is a simple guide for a better understading of webhooks.

👍

TLDR

A web application implementing Webhooks will send a HTTP request to a URL when certain things happen. This can be as simple as providing your URL and wait for our notifications on orders status changes.

Introduction

Webhooks are one of a few ways web applications can communicate with each other. It allows you to send real-time data from one application to another whenever a given event occurs.

For example, let’s say you’ve created an order using the Abbiamo API. You ideally want to be able to know when your order status has changed from created to dispatched, or from dispatched to start delivery. It will allow your team to monitor and get real time updates on the order status.

Technically

Webhooks are sometimes referred to as “Reverse APIs,” as they give you what amounts to an API spec, and you must design an API for the webhook to use. The webhook will make an HTTP request to your app (POST), and you will then be charged with interpreting it.

Therefore, instead of trying to poll for state changes on orders, you will wait for the data from webhook to come to your registered endpoint with the schema given on our webhook API reference.

API vs Webhooks

Although these two are very different in the way they operate, there seems to be an air of confusion around them. Simply put, an API is a common interface between two different applications, an intermediary that allows two applications to talk to each other. In contrast, Webhooks are typically used to integrate two systems. An API call can be used to request data whereas a Webhook will receive data. In other words, the foundational difference between Webhooks and API calls is that the former is event-based whereas the latter is request-based.