Impala's webhooks can be triggered when a booking is created, updated, or canceled. When one of these events occurs, Impala will make an HTTP request to the URL configured for the webhook. This article covers how to use Impala's webhooks.
What is the structure of the webhook?
The booking date has been changed
The area linked to the booking has been changed
What is the structure of the webhook?
The User-Agent
header for the requests will have a prefix of Impala-Hookshot/
. If you reply to the contents of webhook notifications, make sure to verify their authenticity.
All webhooks follow the same basic structure:
Property | Type | Description |
---|---|---|
type |
string | The constant name of the webhook. |
hotelId |
string | The hotel that this event occurred in. |
events |
array | An array containing all the instances found for this webhook for this hotel. |
A booking has been created
The type of this webhook is BOOKING_CREATED and is triggered whenever Impala detects that the more recent data has one or more bookings that weren't found in older versions of the data. The data associated with this webhook is the booking data.
To configure the webhook you will need to add the URL in the CREATED Webhooks.
A booking has been updated
The type of this Webhook is BOOKING_CHANGED and is triggered when we detect that there has been a change in the booking data, they are however changes that will not trigger the webhook as these are in conflict with other webhook. These are:
status
(if the value isCANCELLED
)areaId
start
end
allocationId
The data associated with this webhook is the booking data. To configure the webhook you will need to add the URL in the CHANGED Webhook.
The booking date has been changed
The type of this Webhook is BOOKING_DATE_CHANGED and is triggered whenever Impala detects that there has been a change to the booking period. The data associated with this webhook is the booking data. To configure the webhook you will need to add the URL in the BOOKING_DATE Webhooks.
The area linked to booking has been changed
The type of this webhook is BOOKING_AREA_CHANGED and is triggered whenever Impala detects there has been a change to the booking area. The data associated with this webhook is the booking data. To configure the webhook you will need to add the URL in the BOOKING_AREA Webhook:
A booking has been canceled
The type of this webhook is BOOKING_CANCELLED and is triggered whenever Impala detects there the booking has been canceled. The data associated with this webhook is the booking data. To configure the webhook you will need to add the URL in the CANCELLED Webhook: