Adding a booking event webhook lets the hotel receive booking details in JSON format through a URL.

Note: This requires some basic knowledge about how to use a webhook. Consider consulting your web developer if you need any assistance.

A booking event webhook sends a callback to a given URL. It is triggered each time a booking is created, modified, or canceled.

The booking event webhook feature is triggered from:

  • The Sirvoy Booking Engine
  • The Review booking form
  • Sales Channel bookings

It can be activated in Settings -> Your account -> Booking event webhook.

The receiving server must respond with response code 200 OK. Otherwise, the call will be retried up to three times every 30 minutes. We only support HTTPS using TLS version 1.2 and up to ensure privacy and confidentiality. The HTTPS certificate must also be valid; otherwise, no data will be sent. The booking data is sent as a POST with the JSON as the request body.

Please also ensure your server responds to HTTP GET requests with 200 OK. This is used as a health check called now and then to ensure your endpoint is active. But no data will ever be pushed to you using HTTP GET.

The webhook callbacks will be made from the IP ranges below. If you want to restrict traffic to your server, all of the below ranges need to be permitted in your firewall:

  • 34.243.166.60
  • 52.18.11.99
  • 63.34.80.48
  • 54.194.0.85
  • 2a05:d018:e34:5300::/56

The servers making the callbacks are dual-stack, having both ipv4 and ipv6 connectivity. If you add both ipv4 and ipv6 addresses to your domain name, the webhook callback will be made to the first server to respond.

Below are some examples of the JSON format generated data when a new booking is created:

 

{
   "version":"1.0",
   "callbackId":2464764,
   "generatedTime":"2021-09-08T11:41:06+00:00",
   "event":"new",
   "propertyId":1,
   "bookingId":26006,
   "channelBookingId":null,
   "bookingDate":"2021-09-08T11:37:42+00:00",
   "arrivalDate":"2021-09-08",
   "departureDate":"2021-09-10",
   "cancelled":false,
   "eta":null,
   "totalAdults":2,
   "guest":{
      "firstName":"John",
      "lastName":"Doe",
      "businessName":"Acme Corporation",
      "address":"123 Main St",
      "postcode":"17101",
      "city":"AnyTown",
      "state":"DE",
      "country":"US",
      "phone":"+17184547453",
      "email":"john.doe@mailservice.us",
      "passportNo":null,
      "language":"en",
      "message":"Your hotel looks nice :)"
   },
   "guestReference":null,
   "internalComment":null,
   "couponCode":null,
   "bookingSource":"Front desk",
   "bookingIsCheckedIn":false,
   "bookingIsCheckedOut":false,
   "bookingIsConfirmed": false,
   "bookingIsProvisional":false,
   "bookingProvisionalId":null,
   "customFields":[
      {
         "name":"Custom field",
         "value":"custom field text filled by guest"
      },
      {
         "name":"Checkbox",
         "value":true
      },
      {
         "name":"new checkbox",
         "value":false
      }
   ],
   "rooms":[
      {
         "RoomTypeName":"Basic room",
         "RoomTypeDescription":"As basic as it gets, with a small window included.",
         "RoomName":"110",
         "RoomId": 52,
         "arrivalDate":"2021-09-08",
         "departureDate":"2021-09-10",
         "adults":2,
         "quantity":2,
         "price":100,
         "roomTotal":200,
         "guestName":null,
         "comment":null,
         "ledgerAccount":null
      }
   ],
   "additionalItems":[
      {
         "description":"Cleaning Fee",
         "specificDate":null,
         "quantity":1,
         "price":0,
         "itemTotal":0,
         "ledgerAccount":null
      }
   ],
   "bookedCategory":null,
   "currency":"EUR",
   "totalPrice":200,
   "totalSurcharges":20,
   "totalPriceIncludingSurcharges":220,
   "payments":[],
   "invoices":[]
}

This is how it can look after a cash receipt is created and a payment is moved to an invoice – the payments and the invoices in this booking are also included in the webhook callback. Any other change also results in a webhook callback with the data. 

This is how the booking event webhook in this example looks now:

{
   "version":"1.0",
   "callbackId":2464765,
   "generatedTime":"2021-09-08T11:45:01+00:00",
   "event":"modified",
   "propertyId":1,
   "bookingId":26006,
   "channelBookingId":null,
   "bookingDate":"2021-09-08T11:37:42+00:00",
   "arrivalDate":"2021-09-08",
   "departureDate":"2021-09-10",
   "cancelled":false,
   "eta":null,
   "totalAdults":2,
   "guest":{
      "firstName":"John",
      "lastName":"Doe",
      "businessName":"Acme Corporation",
      "address":"123 Main St",
      "postcode":"17101",
      "city":"AnyTown",
      "state":"DE",
      "country":"US",
      "phone":"+17184547453",
      "email":"john.doe@mailservice.us",
      "passportNo":null,
      "language":"en",
      "message":"Your hotel looks nice :)"
   },
   "guestReference":null,
   "internalComment":null,
   "couponCode":null,
   "bookingSource":"Front desk",
   "bookingIsCheckedIn":false,
   "bookingIsCheckedOut":false,
   "bookingIsConfirmed": false,
   "bookingIsProvisional":false,
   "bookingProvisionalId":null,
   "customFields":[
      {
         "name":"Custom field",
         "value":"custom field text filled by guest"
      },
      {
         "name":"Checkbox",
         "value":true
      },
      {
         "name":"new checkbox",
         "value":false
      }
   ],
   "rooms":[
      {
         "RoomTypeName":"Basic room",
         "RoomTypeDescription":"As basic as it gets, with a small window included.",
         "RoomName":"110",
         "RoomId": 52,
         "arrivalDate":"2021-09-08",
         "departureDate":"2021-09-10",
         "adults":2,
         "quantity":2,
         "price":100,
         "roomTotal":200,
         "guestName":null,
         "comment":null,
         "ledgerAccount":null
      }
   ],
   "additionalItems":[
      {
         "description":"Cleaning Fee",
         "specificDate":null,
         "quantity":1,
         "price":0,
         "itemTotal":0,
         "ledgerAccount":null
      }
   ],
   "bookedCategory":null,
   "currency":"EUR",
   "totalPrice":200,
   "totalSurcharges":20,
   "totalPriceIncludingSurcharges":220,
   "payments":[],
   "invoices":[
      {
         "invoiceNumber":"41001",
         "invoiceDate":"2021-09-08",
         "dueDate":"2021-09-08",
         "receiver":"Acme Corporation",
         "address":[
            "John Doe",
            "123 Main St",
            "AnyTown, DE 17101",
            "United States"
         ],
         "roundingAmount":0,
         "invoiceTotal":220,
         "originInvoice":null,
         "invoiceRows":[
            {
               "quantity":2,
               "price":100,
               "rowTotal":200,
               "ledgerAccount":"3010",
               "rowText":"Basic room",
               "vatRate":0,
               "vatAmount":0,
               "bookingId": 26005
            },
            {
               "quantity":1,
               "price":20,
               "rowTotal":20,
               "ledgerAccount":"sur1",
               "rowText":"10",
               "vatRate":0,
               "vatAmount":0
            }
         ],
         "payments":[
            {
               "paymentId": 26,
               "createdAt": "2023-10-12T20:43:08+00:00",
               "valueDate": "2023-10-13",
               "amount":220,
               "ledgerAccount":" ",
               "paymentReference":null,
               "comment":null
            }
         ]
      }
   ]
}