Guides
Trin for trin-vejledninger til opsætning og brug af systemet.
Guides - Work hours: Create/edit/delete work hour
-
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
- Create a webhook
- 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
- Customer: Master data updated
- Cash register: Cash reconciliation
- Online paid/cancelled orders with customer attached
- Work hours: Create/edit/delete work hour
- Event: Create/edit/delete
- Event participant: Sign up/cancel/edit
- Questionnaire: Finish/edit
- Voucher: Completed transaction
- SSO - Single Sign On
- API and webhooks
Work hours: Create/edit/delete work hour
This webhook can be used to send data when a work hour is created, changed and/or deleted. On the individual webhook you choose under "Run at" whether it should run at Create work hour, Edit work hour or Delete work hour. Only one of them can be chosen per webhook, so one webhook is created for each action. 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. Example of JSON that can be sent: |
Create work hour: |
{
"action": "CREATED",
"workHourId": [workHourId],
"calendar": {
"calendarId": [calendarId]
},
"employee": {
"employeeId": [employeeId]
},
"workType": {
"workTypeId": [workTypeId]
},
"activeTime": [
[activeTime_begin]{
"from": "[activeTimeFrom]",
"to": "[activeTimeTo]"
}[lineBreak][activeTime_end]
],
"activeWeekdays": [
[activeWeekdays_begin]"[activeWeekday]"[lineBreak][activeWeekdays_end]
],
"customerGroup": {
"customerGroupId": [customerGroupId]
},
"excludeWeekNumbers": [[excludeWeekNumbers_begin][excludeWeekNumber][lineBreak][excludeWeekNumbers_end]],
"dateLimited": [dateLimited],
"dateLimitedFrom": "[dateLimitedFrom]",
"dateLimitedTo": "[dateLimitedTo]",
"bookCustomer": [bookCustomer],
"bookQuickbook": [bookQuickbook],
"priority": [priority]
}
Edit work hour: |
{
"action": "EDITED",
"workHourId": [workHourId],
"calendar": {
"calendarId": [calendarId]
},
"employee": {
"employeeId": [employeeId]
},
"workType": {
"workTypeId": [workTypeId]
},
"activeTime": [
[activeTime_begin]{
"from": "[activeTimeFrom]",
"to": "[activeTimeTo]"
}[lineBreak][activeTime_end]
],
"activeWeekdays": [
[activeWeekdays_begin]"[activeWeekday]"[lineBreak][activeWeekdays_end]
],
"customerGroup": {
"customerGroupId": [customerGroupId]
},
"excludeWeekNumbers": [[excludeWeekNumbers_begin][excludeWeekNumber][lineBreak][excludeWeekNumbers_end]],
"dateLimited": [dateLimited],
"dateLimitedFrom": "[dateLimitedFrom]",
"dateLimitedTo": "[dateLimitedTo]",
"bookCustomer": [bookCustomer],
"bookQuickbook": [bookQuickbook],
"priority": [priority]
}
Delete work hour: |
{
"action": "DELETED",
"workHourId": [workHourId]
}
![]() |
The replacement codes [activeTimeFrom], [activeTimeTo], [activeWeekday] and [excludeWeekNumber] must be written exactly as in the example, with the same uppercase and lowercase letters. The block markers and [lineBreak] are not case sensitive. When deleting, only [workHourId] can be used. |
The replacement codes in the examples above will be replaced with the following data when the specific webhook runs:
|
In addition to the above, you can also use replacement codes from the following category to build your own: |
