Webhooks
Get notifications sent to you when availability or booking changes
To use this capability add octo/webhooks
to your Octo-Capabilities
header.
This capability allows you to create webhooks which will notify a given URL whenever an action happens in Ventrata, e.g. Booking Update, Booking Cancellation, or Availability Change.
Create Webhook
POST
https://api.ventrata.com/octo/webhooks
Create a new webhook
Request Body
Name | Type | Description |
---|---|---|
url | string | The URL to call when the webhook is triggered |
event | string | The event that will trigger the webhook |
Field | Description |
| A fully formed URL. If you want to include basic authentication credentials that is supported also. For example:
|
| The event that will trigger the webhook. Possible values are:
|
| Whether the webhook should be retried if the HTTP endpoint doesn't return a success status (200 to 299), default is |
| Whether the webhook event should attempt to use the language configured by the guest when they booked. This makes sure the data in the webhook body is in the guest's language, default is |
| A object of headers to be used on each webhook request. This can be useful to keep your endpoint secure. |
| A list of capabilities that will be activated before triggering the webhook which will affect the data included in the webhook body. |
An example response will look like this:
We recommend for testing you can use ngrok to create an endpoint which connects to your localhost. You can then make test bookings with the same credentials and see the webhook requests arrive.
Note that you don't set the capabilities in the request body when creating the webhook, you should just include them in the Octo-Capabilities
header when calling the POST /webhooks
endpoint.
When an event is triggered the webhook will perform a POST
HTTP request to the specified URL, the request body will look like this depending on the event type:
This endpoint will return a list of all existing webhooks.
List Webhooks
GET
https://api.ventrata.com/octo/webhooks
List all webhooks
Path Parameters
Name | Type | Description |
---|---|---|
string |
Delete Webhooks
DELETE
https://api.ventrata.com/octo/webhooks/:id
Delete an existing webhook
Path Parameters
Name | Type | Description |
---|---|---|
:id | string | The webhook id |
Last updated