What is a webhook
A webhook is an API concept that’s growing in popularity. As more and more of what we do on the web can be described by events, webhooks are becoming even more applicable. They’re incredibly useful and a resource-light way to implement event reactions.
So, what exactly is a webhook? A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer. The only drawback to webhooks is the difficulty of initially setting them up.
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 (typically a POST), and you will then be charged with interpreting it.
Most of the time a webhook can be implemented in a relative quick and easy way. Sometimes even without programming as there are multiple integration platforms, like Zapier and Microsoft Flow. As compared to polling techniques a webhook is far less resource consuming.
As a webhook is is asynchronic, trigger based, functional logic is limited. A webhook can be very well suited for pushing changed data. Example: a customer changing his/her profile and changing the address. The change needs to be pushed to an external system, like a CRM.This will work fine via a webhook.
In the usecase of a booking application, a check might be required on availability. If the target application is implementing a dialog with their customer, feedback might be needed to that customer to present the availability. Direct communication is needed. In this case the "classical API" is suited better.