Webhooks

Modified on Wed, 18 Nov at 12:15 PM

Webhooks are HTTPS based callback mechanisms for web APIs. In Briq, they allow third parties to be notified by a HTTPS call when certain events (called webhooks) occur.
A simple example of this would be the moment a booking is created. Through webhooks, third parties can subscribe to that webhook ('Booking.Create'), and every time a booking is created, they will receive an HTTPS call to a predefined url, with predefined headers and body contents.

Webhook is both the event and the actual callback (or set of callbacks). Webhooks have a name ('BookingUpdated' or 'BookingExpired') and a payload, which is the contextual data for that event (the booking data in the case of a Booking.Updated webhook, the customer data in case of the 'CustomerUpdated' webhook). Every time the event occurs, the webhook is triggered, meaning that the webhook framework starts processing the event and the corresponding payload.

Supported Webhooks

Booking EventsDescription
Booking.CreatedTriggered when a new booking is created.
Booking.UpdatedTriggered every time a booking is updated.
Booking.StatusUpdatedTriggered when a booking status changes.
(Example from Pending to Active or Error)
Booking.DeletedTriggered when a booking is deleted.
Booking.ExecutedTriggered when a booking has been executed.
Booking.ExpiredTriggered when a booking expires.
Booking.CancelledTriggered when a booking status turns to Cancelled.
Booking.ReminderSend a message X hours before check-in time to remind a consumer about a booking.
Booking.DayOfVisitSync a calendar on the morning with all the bookings of that day.
Booking.CheckInTriggered when attendance is switched to CheckedIn.
Booking.EvaluationTriggered when attendance is switched to CheckedIn.
Booking.PlacedTriggered when a booking is placed.

 

Product EventsDescription
Product.CreatedTriggered when a new product is created.
Product.UpdatedTriggered every time a product is updated.
Product.DeletedTriggered every time a product is deleted.

 

Resource EventsDescription
Resource.CreatedTriggered when a new resource is created.
Resource.UpdatedTriggered every time a resource is updated.

 

Deal EventsDescription
Deal.CreatedTriggered when a new deal is created.
Deal.UpdatedTriggered every time a deal is updated.


Retry policy

The first webhook notification is sent immediately after the event is triggered. We have a retry mechanism in place, and in case status 200 OK is not returned in the first try we will send the notification again later.

According to our retry policy we will try to send the webhook 4 more times with an increasing interval. If after the 5th call we still do not get a 200 OK response (which is after 60 minutes), we will stop trying and the webhook will be marked as Failed.

AttemptInterval
1stImmediately after event is triggered.
2nd1 minute
3rd5 minutes
4th15 minutes
5th60 minutes


Configuration

The configuration for the webhooks is done in briq.app. You will need to set a valid URL for each of the events you would like to receive notifications for. Please contact our team to help you out with configuring the webhooks.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article