Guides
Trin for trin-vejledninger til opsætning og brug af systemet.
Guides - Booking: Create/edit/delete
-
Guides
- General
- Booking
- Event
- Cash Register Add-On
- Gift Voucher Add-On
- Marketing Add-On
- Record Add-On
- Form Add-On
- Documents
- Online Payment Add-On
- SMS Add-On
- Integrations
- For developers
- API and webhooks
- REST API
- Webhooks
- Scheduled webhooks
- Event webhooks
- Booking: Create/edit/delete
- Customer: Newsletter subscribe/unsubscribe
- Reward program: Balance update
- Cash register: Completed sale
- Cash register: Completed sale - per line item
- Cash register: Cash reconciliation
- Customer: Master data updated
- Online paid/cancelled orders with customer attached
- Event: Create/edit/delete
- Event participant: Sign up/cancel/edit
- Work hours: Create/edit/delete work hour
- Voucher: Completed transaction
- Questionnaire: Finish/edit
- SSO - Single Sign On
- API and webhooks
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:
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: |
