Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Sirvoy
  • Login
  • Contact
English (US)
US English (US)
FR French
DE German
ES Spanish
NL Dutch
SE Swedish
FI Finnish
NO Norwegian
DA Danish
  • Home
  • My Account
  • Export & API

Adding a Booking Event Webhook

Written by johana

Updated at January 6th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Setup Guides Import Bookings
  • About Sirvoy
    General Technical Security & Backups
  • Rooms & Room Types
    Rooms & Room Types Categorizing Room Types Offer Add-Ons or Extras
  • Booking Engines
    Website Builder Installing on Your Website Adjusting the Booking Engine Design & CSS Input Fields Review Your Booking Feature Tracking
  • Channel Manager
    Setting Up New Channels Mapping Your Room Types General Rates & Availability Updates Overbookings
  • Financials
    Setting Up a Payment Solution Managing Payments Invoices & Receipts Accounting Taxes & Surcharges
  • Bookings
    Modify Booking View Bookings Message Templates & Automated Messaging Communication Scheduling Housekeeping and Tasks
  • Rates & Restrictions
    Rates & Discounts Restrictions Promotion & Coupon Codes
  • My Account
    Customize Your Account Subscription Statistics Export & API
+ More

Table of Contents

Key details Technical Requirements: Managing Booking Notifications and Webhook Failures IP Whitelisting JSON Format Examples

 

Adding a booking event webhook sends booking details in JSON format to a URL whenever a booking is created, modified, canceled, or restored.

Key details

  • Technical knowledge required: Setting up and managing webhooks requires technical expertise. Consult a web developer if needed.
  • Activation: Activate the booking event webhook at Settings -> Sirvoy account -> Booking event webhook.
  • Webhook limit: Only one webhook can be active per Sirvoy account.
  • Callback triggers: A booking event webhook sends a callback to a specified URL every time a booking is created, modified, canceled, or restored.

Technical Requirements:

  • Response code: The receiving server must respond with a `200 OK` status code. If not, the call will be retried ten times with exponential back-off up to 10 times before it is discarded
  • HTTPS and TLS: We only support HTTPS using TLS version 1.2 or higher to ensure data privacy and confidentiality. Ensure your HTTPS certificate is valid; otherwise, no data will be sent.
  • Health check: Your server must respond to HTTP GET requests with `200 OK` for health checks. No data will be sent using HTTP GET, but it ensures your endpoint is active.

Managing Booking Notifications and Webhook Failures

We send a notification for each booking update and events can be delivered out of order. Use the “generatedAt” timestamp to build an accurate timeline of events. Each notification will contain the full JSON representation of the booking at that point in time.

If your endpoint starts to fail and doesn’t return successful status codes on our calls we will notify you via email. If it continues to fail for one week, the webhook will be removed, after a final notification.

IP Whitelisting

To ensure successful webhook callbacks, permit the following IP ranges 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, supporting both IPv4 and IPv6. If you add both IPv4 and IPv6 addresses to your domain name, the callback will be made to the first server to respond.

JSON Format Examples

Example JSON structure for new bookings:

{
	"version": "2.0",
	"generatedAt": "2024-05-31T12:11:53.639+00:00",
	"event": "new",
	"propertyId": 1,
	"bookingId": 26006,
	"channelBookingId": null,
	"bookingDate": "2024-05-31T12:09:16+00:00",
	"arrivalDate": "2024-06-01",
	"departureDate": "2024-06-04",
	"cancelled": false,
	"eta": "10:00",
	"totalAdults": 4,
	"guest": {
    	"firstName": "John",
    	"lastName": "Doe",
    	"businessName": "Acme",
    	"address": "Fancy street",
    	"postcode": "11-111",
    	"city": "York",
    	"state": "NY",
    	"country": "US",
    	"phone": "+16033336666",
    	"email": "guest@email.com",
    	"passportNo": "XX11122223333",
    	"language": "en",
    	"message": "Additional comment added by guest"
	},
	"guestReference": "2103001",
	"internalComment": null,
	"couponCode": null,
	"bookingSource": "Front desk",
	"bookingIsCheckedIn": false,
	"bookingIsCheckedOut": false,
	"bookingIsConfirmed": true,
	"customFields": [
    	{
        	"name": "Custom text field name",
        	"value": "text added by guest"
    	},
    	{
        	"name": "Custom checkbox unchecked",
        	"value": false
    	},
    	{
        	"name": "Custom checkbox checked",
        	"value": true
    	}
	],
	"rooms": [
    	{
        	"RoomTypeName": "Basic room",
        	"RoomTypeDescription": "Basic room",
        	"RoomName": "101",
        	"RoomId": 2,
        	"arrivalDate": "2024-06-01",
        	"departureDate": "2024-06-04",
        	"adults": 2,
        	"quantity": 3,
        	"price": 100,
        	"roomTotal": 300,
        	"guestName": null,
        	"comment": null,
        	"ledgerAccount": null
    	},
    	{
        	"RoomTypeName": "Fancy room",
        	"RoomTypeDescription": "Fancy room",
        	"RoomName": "182",
        	"RoomId": 83,
        	"arrivalDate": "2024-06-01",
        	"departureDate": "2024-06-04",
        	"adults": 2,
        	"quantity": 3,
        	"price": 100,
        	"roomTotal": 300,
        	"guestName": null,
        	"comment": null,
        	"ledgerAccount": null
    	}
	],
	"additionalItems": [
    	{
        	"description": "Breakfast",
        	"specificDate": null,
        	"quantity": 12,
        	"price": 20,
        	"itemTotal": 240,
        	"ledgerAccount": null
    	}
	],
	"bookedCategory": null,
	"currency": "EUR",
	"totalPrice": 840,
	"totalSurcharges": 84,
	"totalPriceIncludingSurcharges": 924,
	"payments": [],
	"invoices": []
}

 

Example JSON structure for creating a cash receipt and applying a payment to an invoice:

{
	"version": "2.0",
	"generatedAt": "2024-05-31T12:15:23.895+00:00",
	"event": "modified",
	"propertyId": 1,
	"bookingId": 26006,
	"channelBookingId": null,
	"bookingDate": "2024-05-31T12:09:16+00:00",
	"arrivalDate": "2024-06-01",
	"departureDate": "2024-06-04",
	"cancelled": false,
	"eta": "10:00",
	"totalAdults": 4,
	"guest": {
    	"firstName": "John",
    	"lastName": "Doe",
    	"businessName": "Acme",
    	"address": "Fancy street",
    	"postcode": "11-111",
    	"city": "York",
    	"state": "NY",
    	"country": "US",
    	"phone": "+16033336666",
    	"email": "guest@email.com",
    	"passportNo": "XX11122223333",
    	"language": "en",
    	"message": "Additional comment added by guest"
	},
	"guestReference": "2103001",
	"internalComment": null,
	"couponCode": null,
	"bookingSource": "Front desk",
	"bookingIsCheckedIn": false,
	"bookingIsCheckedOut": false,
	"bookingIsConfirmed": true,
	"customFields": [
    	{
        	"name": "Custom text field name",
        	"value": "text added by guest"
    	},
    	{
        	"name": "Custom checkbox unchecked",
        	"value": false
    	},
    	{
        	"name": "Custom checkbox checked",
        	"value": true
    	}
	],
	"rooms": [
    	{
        	"RoomTypeName": "Basic room",
        	"RoomTypeDescription": "Basic room",
        	"RoomName": "101",
        	"RoomId": 2,
        	"arrivalDate": "2024-06-01",
        	"departureDate": "2024-06-04",
        	"adults": 2,
        	"quantity": 3,
        	"price": 100,
        	"roomTotal": 300,
        	"guestName": null,
        	"comment": null,
        	"ledgerAccount": null
    	},
    	{
        	"RoomTypeName": "Fancy room",
        	"RoomTypeDescription": "Fancy room",
        	"RoomName": "182",
        	"RoomId": 83,
        	"arrivalDate": "2024-06-01",
        	"departureDate": "2024-06-04",
        	"adults": 2,
        	"quantity": 3,
        	"price": 100,
        	"roomTotal": 300,
        	"guestName": null,
        	"comment": null,
        	"ledgerAccount": null
    	}
	],
	"additionalItems": [
    	{
        	"description": "Breakfast",
        	"specificDate": null,
        	"quantity": 12,
        	"price": 20,
        	"itemTotal": 240,
        	"ledgerAccount": null
    	}
	],
	"bookedCategory": null,
	"currency": "EUR",
	"totalPrice": 840,
	"totalSurcharges": 84,
	"totalPriceIncludingSurcharges": 924,
	"payments": [],
	"invoices": [
    	{
        	"invoiceNumber": "41002",
        	"invoiceDate": "2024-06-01",
        	"dueDate": "2024-06-01",
        	"receiver": "Acme",
        	"address": [
            	"John Doe",
            	"Fancy street",
            	"York, NY 11-111",
            	"United States"
        	],
        	"roundingAmount": 0,
        	"invoiceTotal": 924,
        	"originInvoice": null,
        	"invoiceRows": [
            	{
                	"quantity": 3,
                	"price": 100,
                	"rowTotal": 300,
                	"ledgerAccount": "100",
                	"rowText": "Basic room",
                	"vatRate": 0,
                	"vatAmount": 0,
                	"bookingId": 26006
            	},
            	{
                	"quantity": 3,
                	"price": 100,
                	"rowTotal": 300,
                	"ledgerAccount": "100",
                	"rowText": "Fancy room",
                	"vatRate": 0,
                	"vatAmount": 0,
                	"bookingId": 26006
            	},
            	{
                	"quantity": 12,
                	"price": 20,
                	"rowTotal": 240,
                	"ledgerAccount": "200",
                	"rowText": "Breakfast",
                	"vatRate": 0,
                	"vatAmount": 0,
                	"bookingId": 26006
            	},
            	{
                	"quantity": 1,
                	"price": 84,
                	"rowTotal": 84,
                	"ledgerAccount": "300",
                	"rowText": "surcharge",
                	"vatRate": 0,
                	"vatAmount": 0,
                	"bookingId": 26006
            	}
        	],
        	"payments": [
            	{
                	"paymentId": 28,
                	"createdAt": "2024-05-31T12:15:09+00:00",
                	"valueDate": "2024-06-01",
                	"amount": 924,
                	"ledgerAccount": "3606",
                	"paymentReference": null,
                	"comment": null
            	}
        	]
    	}
	]
}

 

For any questions or further assistance, contact our support team.

reservation notification event hook

Was it worth the read?

Yes
No
Spot something odd? Let us know.

Related Articles

  • A Faster Way to Create Bookings
  • Adding an Alert to a Booking
  • Opening the CSV Export File in MS Excel
  • Opening the CSV Export File in Numbers (Apple)

Need a hand with Sirvoy?

You're in the right place.

  • Sirvoy
  • Login
  • Contact

    ©2025 Sirvoy . All Rights reserved.

    Knowledge Base Software by Helpjuice

    Expand