Webhook Collection
You can create Webhooks to be notified about any changes of the property's ARI or about booking and some OTA specific webhooks. Webhooks are Push-notifications. When any changes happens, we send a POST request with JSON payload to the provided endpoint.
Webhook UI
We have an UI available to view, add and edit webhooks also so you can lessen your development efforts if you wish to manually set up instead of via API.
Link: https://staging.channex.io/webhooks
List of webhook events available
ari
This will send you any ARI changes like changed availability or prices, useful if you allow users to change ARI in the Channex interface or mobile app and also to integrate any RM system
booking
If you wish to get all booking changes then this is the one, you will get notification for any booking revision new, modified and cancelled.
booking_unmapped_room
This will let you know if any bookings were created which were not mapped
booking_unmapped_rate
Similar to unmapped room but this means room is mapped but rate is not
message
If you use the messaging API this is required to push messages to you in real time
sync_error
You can see any sync errors on your dashboard
reservation_request
Airbnb specific, You can see a reservation request and can accept or deny
alteration_request
Airbnb specific, You can see a alteration request and can accept or deny
review
This will let you know if any new review is came.
Webhooks List
Retrieve a list of Webhooks associated with users Properties.
Request:
Pagination
By default, this method returns the first 10 elements. To get more details, you should use Pagination arguments.
Information about count of entities and current pagination position contained at meta
section at response object.
Returns
Success
Method can return a Success result with 200 OK
HTTP Code if operation is successful. Will contain a list of Webhook objects in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized
HTTP Code if wrong Bearer Token provided.
Get Webhook by ID
Retrieve specific webhook associated with User by ID.
Request:
Returns
Success
Method can return a Success result with 200 OK
HTTP Code if operation is successful. Will contain a Webhook object in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized
HTTP Code if wrong Bearer Token provided or User not have access to requested Webhook.
Not Found Error
Method can return a Not Found Error result with 404 Not Found
HTTP Code if Webhook with provided ID is not exists.
Create Webhook
Create a new Webhook.
Request:
Query body (JSON):
Fields
property_id [required]
String with valid UUID of Property object what you would like to associate with created Webhook.
callback_url [required]
Valid URL address. Note: This URL will be called via POST request when trigger event is happened.
event_mask [required]
Non-empty string with event mask.
Take a look a list of supported webhook events at List of webhook events section.
For ari
event event mask support filtering by restriction, room type id and rate plan id. In that case, event mask should looks like: event:restrictions:room_type_ids:rate_plan_ids
where restrictions, room_type_ids and rate_plan_ids can contain several comma separated values.
Real example to listen rate changes at Rate Plan with ID equal to 96a44e07-2158-43e4-8baa-8f6f56922ba8
:
ari:rate:*:96a44e07-2158-43e4-8baa-8f6f56922ba8
request_params [optional]
JSON Object with specific GET arguments for query.
headers [optional]
JSON Object with request headers.
Note: If you would like use URL endpoint protected via authentication, you can define request headers at this field.
Example:{"Authorization": "Basic user:password"}
is_active [optional]
Boolean value.
Note: This field represent active status of Webhook. Only Webhooks with is_active
field equal to true
value can receive notifications.
Receive false
as default value.
send_data [optional]
Boolean value.
Note: This field is a flag to send payload data in push callback. If value is false
we are call callback url without any information about changes.
Receive false
as default value.
Returns
Success
Method can return a Success result with 201 Created
HTTP Code if operation is successful. Will contain a Webhook object in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized
HTTP Code if wrong Bearer Token provided.
Validation Error
Method can return a Validation Error result with 422 Unprocessable Entity
HTTP Code if any validation rule is failed.
Update Webhook
Update a Webhook.
Request:
Query body (JSON):
Fields
This method use same fields as Create Webhook method.
Returns
Success
Method can return a Success result with 200 OK
HTTP Code if operation is successful. Will contain a Webhook object in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized
HTTP Code if wrong Bearer Token provided.
Not Found Error
Method can return a Not Found Error result with 404 Not Found
HTTP Code if Webhook with provided ID is not present at system.
Validation Error
Method can return a Validation Error result with 422 Unprocessable Entity
HTTP Code if any validation rule is failed.
Remove Webhook
Remove a Webhook.
Request:
Returns
Success
Method can return a Success result with 200 OK
HTTP Code if operation is successful. Will contain a Meta object with message in the answer.
Unauthorised Error
Method can return a Unauthorised Error result with 401 Unauthorized
HTTP Code if wrong Bearer Token provided.
Not Found Error
Method can return a Not Found Error result with 404 Not Found
HTTP Code if Webhook with provided ID is not present at system.
Test Webhook
Test a Webhook by sending test query to your endpoint.
Request:
Query body (JSON):
Returns
Success
Method can return a Success result with 200 OK
HTTP Code with body and status code of request results to your endpoint.
Payloads
No Data Version
The message is provided to the provided webhook endpoint, depending on the webhook settings (send_data
). If send_data
is true
, Channex will push the message payload, if false
message payload will be removed and target endpoint will only receive event
, user_id
and property_id
fields.
ARI (Availability, Rates & Restrictions)
Triggered when any changes have happened at the property State or inventory table. We provide information about changed prices, restrictions and availability.
Note: We have included the user ID of who generated the changes, this can be useful if you would like to ignore changes made by your own app.
Booking
Triggered when Channex receives a booking revision (New, Cancelled or Modified).
This event was originally designed to trigger a Pull booking revision operation from the PMS. When this event arrives, we expect the PMS will call api/v1/booking_revisions/:id
, to pull the new revision and ack it.
Alternatively the PMS can call the Feed endpoint also to get list of all unack bookings.
Booking Unmapped Room
Triggered when Channex receives a booking revision but can’t map it with existing Room Types. This can happen if the channel is not mapped correctly or if the OTA provides ID which has no mapping.
This event is designed to notify PMS about potential problems at mapping and usually used to trigger notification to support team at PMS side to investigate problems with mapping.
Please, keep in mind, to prevent any potential problems with overbookings, Mapping Issues should be solved in short time-frame and should have high priority.
Booking Unmapped Rate
Triggered when Channex receives a booking revision but can’t map it with existing Rate Plans.
This trigger will not come if revision has not mapped Room Type error. Booking Unmapped Room event will mute Booking Unmapped Rate, because when we have no mapped Room it also means rate is not mapped.
This event is designed to notify PMS about potential problems at mapping, but in that case, we can map Room (and correctly process Availability changes), but can’t map to Rate Plan.
Message
Triggered when new chat message from a guest is registered at Channex.
Sync Error
Triggered when sync error has happened at a connected channel.
Originally designed to notify PMS about potential problems at existed connections.
Reservation Request
Triggered when Channex receives a Reservation Request from Airbnb.
Contains information about requested reservation.
Where BOOKING_MESSAGE is structure equal to regular Booking Revision structure.
Review
Triggered when Channex receives a Review.
Webhook message sequence
Before you start any integration with webhooks, you should to know -
Sequence of incoming webhook calls can be different from sequence of events which trigger that calls. Webhooks may come out of order.
Explanation
At property A we have 2 state changes event: Change availability for Room Type A from 0 to 1. Change availability for Room Type A from 1 to 0.
This events triggers 2 webhook calls with ari
type. But when Channex sends the first webhook we might catch some network issue at middle level and message failed with a timeout error. This is a temporary error and webhook will be rescheduled. Second webhook had no issues and was sent successfully and would arrive first.
PMS receives webhook #2 with Availability 0. First webhook is queued for 2nd attempt to be sent to the target endpoint and this time all went well and we deliver that webhook.
PMS receive webhook #1 with Availability 1.
As a result, if PMS will interpret incoming results, this can cause problems. Instead use information from payload, we suggest to use webhooks as a trigger to execute logic to pull ARI info from Channex.
So, in case with Availability changes, we suggest instead using data from payload, trigger a pull request to get values for changed dates.
Last updated