Webhooks
Receive notifications when transfers, or bookings change.
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 RhomTrip, e.g.Transfer Change, Booking Update or Booking Cancellation,
Create Webhooks
POST
/{host}/webhooks
Create a new webhook
Request Body
url
string
The URL to call when the webhook is triggered
event
string
The event that will trigger the webhook
url
A fully formed URL. If you want to include basic authentication credentials that is supported also. For example:
https://user:pass@example.com/webook
https://example.com/webhook
event
The event that will trigger the webhook. Possible values are:
booking_update: Triggered when an existing booking is confirmed, updated, or cancelled.
availability_update: Triggered when availability changes.
transfer_update: Triggered when a transfer changes.
capabilities
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:
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:
List Webhooks
GET
/{host}/webhooks
This endpoint will return a list of all existing webhooks.
Response
Delete Webhooks
DELETE
/{host}/webhooks/:uuid
Delete an existing webhook
Path Parameters
uuid
The webhook id
Last updated