Any questions

We are happy to help!

Question about Gecko Booking?

If you are unsure whether Gecko Booking is right for you, or if you have other questions, we would love to hear from you!

All good!
Please enter your name.
All good!
Please enter your email.
All good!
All good!
Please enter your question.

Fields marked with an * are required


Guides

Trin for trin-vejledninger til opsætning og brug af systemet.

Guides - Booking: Create/edit/delete

Booking: Create/edit/delete

This webhook can be used to send data from bookings when they are created, changed and/or deleted.

On the individual webhook you choose under "Run at" whether it should run at Create booking, Edit booking and/or Delete booking. When the action is performed, the webhook is added to a queue that is processed every 5 minutes. It can therefore take up to about 5 minutes before the webhook is sent.

There is no replacement code that tells which of the three actions was performed. It is therefore recommended to create one webhook for each action and write the action yourself as text in the JSON, as in the examples below.

Example of JSON that can be sent when a booking is created:


		{
"action": "CREATED",
"bookingId": [bookingId],
"bookingDate": "[bookingDate_YYYY-MM-DD]",
"bookingStartTime": "[bookingRealTimeFrom]",
"bookingEndTime": "[bookingRealTimeTo]",
"serviceId": "[serviceId]",
"serviceName": "[serviceName]",
"calendarId": "[calendarId]",
"calendarName": "[calendarName]",
"customerId": "[customerId]"
}

Example of JSON that can be sent when a booking is edited. Here you can also get the values from before the change:


		{
"action": "EDITED",
"bookingId": [bookingId],
"bookingDate": "[bookingDate_YYYY-MM-DD]",
"bookingStartTime": "[bookingRealTimeFrom]",
"bookingEndTime": "[bookingRealTimeTo]",
"serviceId": "[serviceId]",
"serviceName": "[serviceName]",
"calendarId": "[calendarId]",
"calendarName": "[calendarName]",
"customerId": "[customerId]",
"changedFrom": {
"date": "[changedBooking_FromDate_YYYY-MM-DD]",
"time": "[changedBooking_FromTime]",
"calendarName": "[changedBooking_FromCalendarName]",
"serviceName": "[changedBooking_FromServiceName]"
}
}

When a booking is deleted, the same example as for creation can be used, with the text "DELETED". The values are then those of the deleted booking.


If the booking has no customer, [customerId] is the calendar's own Id. If the booking has no service, [serviceId] and [serviceName] are empty. Bookings that are created, edited or deleted through the API do not trigger this webhook.


The replacement codes in the examples above will be replaced with the following data when the specific webhook runs:

  • [bookingId] is replaced with the booking's unique Id.
  • [bookingDate_YYYY-MM-DD] is replaced with the booking's date in the format YYYY-MM-DD. Also available as [bookingDate_DD-MM-YYYY] in the format DD-MM-YYYY.
  • [bookingRealTimeFrom] is replaced with the booking's start time in the format HH:MM.
  • [bookingRealTimeTo] is replaced with the booking's end time in the format HH:MM.
  • [serviceId] is replaced with the unique Id of the booking's service. Empty if the booking has no service.
  • [serviceName] is replaced with the name of the booking's service. Empty if the booking has no service.
  • [calendarId] is replaced with the unique Id of the calendar the booking is in.
  • [calendarName] is replaced with the name of the calendar the booking is in.
  • [customerId] is replaced with the customer's unique Id.
  • [servicesTotalPrice] is replaced with the total price of the booking's service and any additions. The price is the item's price, including VAT if the item is not exempt from VAT. Can only be used when the webhook runs at Create booking and Edit booking.
  • [bookingBookedLocation] is replaced with "Online" if the booking was created online, otherwise "Backend". Can only be used when the webhook runs at Create booking and Edit booking.
  • [deleteReason] is replaced with the reason for the deletion, and [deleteReasonComment] is replaced with the comment for the deletion. Both are empty if no reason was given. Can only be used when the webhook runs at Delete booking.
  • [changedBooking_FromDate_YYYY-MM-DD] is replaced with the booking's date before the change in the format YYYY-MM-DD. Also available as [changedBooking_FromDate_DD-MM-YYYY] and [changedBooking_FromDate].
  • [changedBooking_FromTime] is replaced with the booking's time before the change as an interval, for example "14:30 - 15:30". [changedBooking_FromTime_Start] is replaced with the start time before the change.
  • [changedBooking_FromCalendarName] is replaced with the name of the calendar the booking was in before the change.
  • [changedBooking_FromServiceName] is replaced with the name of the booking's service before the change.

The codes with "changedBooking_From" are only filled in when the webhook runs at Edit booking.

The customer's order totals, customer tags and previous/next booking can also be used when the booking has a customer. They are described in Customer - Master data updated.


You can build your own data by using replacement codes from the following categories:


 


Try a Free and Non-Binding Demo of Gecko Booking & Administration

Fill out the form, and you will receive a demo as soon as possible.

All good!
Please enter the company name.
All good!
Please enter your phone number.
All good!
Please enter your name.

Fields marked with an * are required