Object
event_type
Declare events for each Webhook
Each event has a different body value to call.
Sample:
"event_type": "contents_updated"
event_type data available to use:
event_type data available to use:contents_updatedstatus_updatedinventory_updated
event_detail
Including detail information aboutevent_type. The attributes included may differ depending onevent_type and event_detail. Please refer to the sample by event_type and event_detail as below.
Sample
contents_updated
If contents_updated is confirmed in event_type, it means that the content of the specific target has been updated. Please call each content API so that the content can be updated using the ID value of each target.
By the way, if partner dose not have target id (Property, Roomtype, Rateplan) to update, please add the target data.
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_updated is confirmed in event_type, it means that the status of the specific target has been changed. Please proceed the status update for each target's ID.
Available status value :
| status | description |
|---|---|
| enabled | Sales status has been updated to available. |
| disabled | Sales status has been updated to unavailable. |
| deleted | Target has been deleted that cannot service anymore. |
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
Include newly added or changed rates and inventories information. Please add or update rateplan_id rates and inventories as they are.
UPSERT
If it is an update for multiple dates, event_detail answered as Array in one Webhook.
Available Fields
| Field | Description | |
|---|---|---|
date | Check-in date which applies the rate and inventory. | |
basic_price | The original price. | |
sale_price | Actual price to sell, sale_price cannot be grater than basic_price Partners can calcultate the discount rate throgh the difference between basic_price | |
extra_adult | Extra person fee for adult | |
extra_child | Extra person fee for child | |
extra_infant | Extra person fee for infant | |
promotion_type | Returns if there is a specified promotion activities applied to basic_price. Returns the Null if there are no any promotions. | |
vacancy | Actual inventory data of that day. If vacancy is 0, cannot reserve guest booking. |
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"
}