Webhook
Setting up a webhook enables hotelkit to send data back to the partner.
Requirements and setting up the Webhook
The webhook must be an URI set which is requestable via https.
Technically a valid webhook must match this regular expression:
^(https:\/\/)(www)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$
Data will be sent per JSON. Therefore, the webhook must be able to accept and handle JSON data. The webhook URI can be set via PUT /setup/partner endpoint.
In this documentation the webhook will be set to https://examplePartner.com/hotelkit.
Return of the Webhook
Every request sent to the webhook must be answered with a response.
When the partner handled the request successfully a 200 Response must be returned.
On error case a Response in the range between 400 – 599 must be returned. In that case hotelkit will try to undo the action internally and display to the user that the connection to the partner failed. There will be no second attempt to send the request.
Pushing of Actions
If given at the message import, the taken action will be sent back to the partner.
This enables the partner to treat the item with the same process as if the status was changed in the partners own system. Read more about this in the Message Import and the Use Case – Task Management.