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

Name
Type
Description

url

string

The URL to call when the webhook is triggered

event

string

The event that will trigger the webhook

{
  "event": "booking_update",
  "url": "https://example.com/webhooks/booking_update"
}
Field
Description

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:

{
 "id": "5c7d6dbb-cd4c-48fd-9709-0ebaa14d7a00",
 "event": "booking_update",
 "url": "https://example.com/webhooks/availability_update",
 "capabilities": [ "octo/pricing" ]
}

For testing, we recommend using ngrok to create an endpoint that 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:

{
 "webhook": {
   "id": "d7876d4c-34c0-4d90-8569-9da49268fa29",
   "event": "transfer_update",
   "url": "https://example.com/webhooks/transfer_update",
   "capabilities": [ "octo/pricing" ]
 },
 "transfer": {
  "id": "67331ca43070a6fb19a24443"
  "status": "AVAILABLE",
  "utcCreatedAt": "2024-11-12T09:15:16.981Z",​
  "utcExpiresAt": "2024-11-15T09:15:16.965Z",​
   "pickUp": {​
      "name": "Aeropuerto Josep Tarradellas Barcelona-El Prat",​
      "googlePlaceId": null,​
      "latitude": 41.2890205,​
      "longitude": 2.0649989,​
      "country": "ES"​
    },​
    "dropOff": {​
      "name": "Alexandra Barcelona Hotel, Curio Collection by Hilton",​
      "googlePlaceId": null,​
      "latitude": 41.3932199,​
      "longitude": 2.1589192,​
      "country": "ES"​
    },​
    "distanceUnit": "KM",​
    "distanceInclude": 18.24,​
    "options": [​
      {​
        "id": "29b38b9b-cbd6-4214-9272-c10393a2d32c",​
        "reference": "5dfb86d284b03e663dd92364",​
        "vehicle": {​
          "seats": 3,​
          "suitcases": 3,​
          "type": "SEDAN",​
          "category": "STANDARD",​
          "name": "Skoda Octavia",​
          "image": "https://app.rhombuss.com/api/public/services/sedan-skoda-octavia.png"​
        },​​
        "cancellationPolicy": [​
          {​
            "type": "FULL_REFUND",​
            "cutoffAmount": 24,​
            "cutoffUnit": "HOURS",​
            "description": "For a full refund, you must cancel at least 24 Hours before the experience's start time."​
          }​
        ]​
      }​
    ]
  }
}

List Webhooks

GET /{host}/webhooks

This endpoint will return a list of all existing webhooks.

Response

[
 {
   "id": "5c7d6dbb-cd4c-48fd-9709-0ebaa14d7a00",
   "event": "booking_update",
   "url": "https://example.com/webhooks/availability_update",
   "capabilities": [ "octo/pricing" ]
 },
 {
   "id": "d7876d4c-34c0-4d90-8569-9da49268fa29",
   "event": "transfer_update",
   "url": "https://example.com/webhooks/transfer_update",
   "capabilities": [ "octo/pricing" ]
 }
]

Delete Webhooks

DELETE/{host}/webhooks/:uuid

Delete an existing webhook

Path Parameters

Name
Value

uuid

The webhook id

Last updated