Webhook Specifications
Object
event_type
Declares the event for each webhook. The Body values called vary depending on each event.
Example:
"event_type": "contents_updated"
Available event_type values:
contents_updatedstatus_updatedinventory_updated
event_detail
Contains detailed content about event_type. Attributes included may vary depending on event_type and event_detail. Please refer to the Sample for each event_type / event_detail below.
For inventory_updated, it responds as event_details plural Array.
Sample
contents_updated
If contents_update is confirmed in event_type, it means the content of the specified target has been updated. Please call each content API to update content using the id of each target.
If there are no property, roomtype, or rateplan to update, please add them as new.
UPSERT
target = property Sample
{
"event_type": "contents_updated",
"event_detail": {
"target": "property",
"property_id": 32124
},
"timestamp": "2021-01-27T10:39:12+09:00"
}
target = roomtype Sample
{
"event_type": "contents_updated",
"event_detail": {
"target": "roomtype",
"property_id": 32124,
"roomtype_id": 111111
},
"timestamp": "2021-01-27T10:39:12+09:00"
}
target = rateplan Sample
{
"event_type": "contents_updated",
"event_detail": {
"target": "rateplan",
"property_id": 32124,
"roomtype_id": 111111,
"rateplan_id": 1234567
},
"timestamp": "2021-01-27T10:39:12+09:00"
}
status_updated
If status_update is confirmed in event_type, it means the status of the specified target has changed. Please process the status update for the id of each target.
Supported statuses:
| status | description |
|---|---|
| enabled | Means the sales status has been changed to active. Please update to active status. |
| disabled | Means the sales status has been changed to inactive. Please update to inactive status. |
| deleted | Means permanently deleted so it can no longer be sold. Please update to deleted status or inactive status. |
target = property Sample / disabled case
{
"event_type": "status_updated",
"event_detail": {
"target": "property",
"property_id": 32124,
"status": "disabled"
},
"timestamp": "2021-01-27T10:39:12+09:00"
}
target = roomtype Sample / enabled case
{
"event_type": "status_updated",
"event_detail": {
"target": "roomtype",
"property_id": 32124,
"roomtype_id": 111111,
"status": "enabled"
},
"timestamp": "2021-01-27T10:39:12+09:00"
}
target = rateplan Sample / deleted case
{
"event_type": "status_updated",
"event_detail": {
"target": "rateplan",
"property_id": 32124,
"roomtype_id": 111111,
"rateplan_id": 1234567,
"status": "deleted"
},
"timestamp": "2021-01-27T10:39:12+09:00"
}
inventory_updated
Includes newly added or changed rate and inventory information. Please add or update the rate and inventory information of rateplan_id as is. UPSERT
If updates are for multiple dates, event_detail responds as an Array in one webhook.
Supported Information Fields
| Field | Description |
|---|---|
date | Check-in date to which rate/inventory applies. |
basic_price | Basic rate. |
sale_price | Actual sale price. sale_price cannot be greater than basic_price. The discount rate can be calculated through the difference with basic_price. |
extra_adult | Additional adult cost. |
extra_child | Additional child cost. |
extra_infant | Additional infant cost. |
promotion_type | Returns if there is a specified promotion applied to basic_price. Returns Null if none. |
vacancy | Number of available inventory. If 0, reservation is not possible due to no inventory. |
available case / vacancy >= 1
{
"event_type": "inventory_updated",
"event_details": [
{
"property_id": 32124,
"roomtype_id": 111111,
"rateplan_id": 1234567,
"date": "2022-10-10",
"basic_price": 100000,
"sale_price": 80000,
"extra_adult": 10000,
"extra_child": 0,
"extra_infant": 0,
"promotion_type": null,
"vacancy": 1
}
],
"timestamp": "2021-01-27T10:39:12+09:00"
}
unavailable case / vacancy = 0
{
"event_type": "inventory_updated",
"event_details": [
{
"property_id": 32124,
"roomtype_id": 111111,
"rateplan_id": 1234567,
"date": "2022-10-10",
"basic_price": 100000,
"sale_price": 80000,
"extra_adult": 10000,
"extra_child": 0,
"extra_infant": 0,
"promotion_type": null,
"vacancy": 0
}
],
"timestamp": "2021-01-27T10:39:12+09:00"
}
update array case
{
"event_type": "inventory_updated",
"event_details": [
{
"property_id": 32124,
"roomtype_id": 111111,
"rateplan_id": 1234567,
"date": "2022-10-10",
"basic_price": 100000,
"sale_price": 80000,
"extra_adult": 10000,
"extra_child": 0,
"extra_infant": 0,
"promotion_type": null,
"vacancy": 1
},
{
"property_id": 32124,
"roomtype_id": 111111,
"rateplan_id": 1234567,
"date": "2022-10-11",
"basic_price": 100000,
"sale_price": 80000,
"extra_adult": 10000,
"extra_child": 0,
"extra_infant": 0,
"promotion_type": null,
"vacancy": 1
},
{
"property_id": 32124,
"roomtype_id": 111111,
"rateplan_id": 1234567,
"date": "2022-10-12",
"basic_price": 100000,
"sale_price": 70000,
"extra_adult": 10000,
"extra_child": 0,
"extra_infant": 0,
"promotion_type": null,
"vacancy": 0
},
{
"property_id": 32124,
"roomtype_id": 337222,
"rateplan_id": 7654321,
"date": "2022-10-10",
"basic_price": 100000,
"sale_price": 80000,
"extra_adult": 10000,
"extra_child": 0,
"extra_infant": 0,
"promotion_type": null,
"vacancy": 0
}
],
"timestamp": "2021-01-27T10:39:12+09:00"
}