Adding a webhook or callback URL gives the hotel the possibility of receiving booking details in JSON format through a URL.

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

The webhook/callback feature is triggered from:

  • The Sirvoy Booking Engine
  • The Review booking form
  • Bookings managed by front desk under “New Bookings”
  • Sales Channel bookings

It can be activated in Settings -> Your account -> Callback URL.

The receiving server has to respond with HTTP code 200 (OK), otherwise the call will be retried every 30 minutes up to 10 times.

  • If you seem to get no incoming parameters, (or the equivalent depending on the programming language you use) this is the way to go:
    $jsonBooking = json_decode(file_get_contents(‘php://input’));
  • Callbacks are made as a HTTP POST via HTTPS.
  • To ensure that any sensitive data is kept encrypted end-to-end, only HTTPS endpoints may be used.

Below is an example of the JSON format:

{
   "version":"1.0",
   "generatedTime":"2017-08-01T09:40:01+00:00",
   "event":"new",
   "propertyId":8409,
   "bookingId":25947,
   "channelBookingId":null,
   "bookingDate":"2017-08-01T09:39:31+00:00",
   "arrivalDate":"2017-08-10",
   "departureDate":"2017-08-11",
   "eta":null,
   "totalAdults":2,
   "guest":{
      "firstName":"Glenn",
      "lastName":"Svensson",
      "businessName":null,
      "address":"Storav\u00e4gen 18",
      "postcode":"30252",
      "city":"Halmstad",
      "country":"SE",
      "phone":"0706770000",
      "email":"test@test.se",
      "passportNo":null,
      "language":"sv",
      "message":null
   },
   "internalComment":null,
   "couponCode":null,
   "bookingSource":"Front desk",
   "bookingIsProvisional":null,
   "bookingProvisionalId":null,
   "bookingIsCheckedIn":true, 
   "bookingIsCheckedOut":false,
   "rooms":[
      {
         "RoomTypeName":"N typ2 ",
         "RoomTypeDescription":null,
         "RoomName":"100011",
         "arrivalDate":"2017-08-10",
         "departureDate":"2017-08-11",
         "adults":"2",
         "quantity":"1",
         "price":"10",
         "roomTotal":10,
         "guestName":null,
         "comment":null
      }
   ],
   "additionalItems":[
      {
         "description":"St\u00e4dning",
         "specificDate":null,
         "quantity":"1",
         "price":"0",
         "itemTotal":null
      }
   ],
   "currency":"SEK",
   "totalPrice":10
}