Overview
This article explains the implementation steps for developing your own booking engine (reservation site) by using AirHost API to obtain inventory and price information.
Detail
Implementation image
Please make sure to design your system so that a copy of the inventory and price data obtained from the AirHost API is stored in your in-house database. You cannot implement a system that retrieves real-time data via API each time.
Processing Steps
Initial data acquisition
Call GET /properties to get information for all properties and keep a copy in the local DB.
Call GET /availabilities to get inventory and price information for each room type and rate plan, and store a copy in the local DB.
Keeping data up to date
In order to keep the facility and reservation information stored in the local DB up to date, a Push Webhook (POST /webhooks) call is received and the inventory and price updates of the availabilities.update Event are reflected in the local DB. A URL must be registered, so please let the AirHost development team know when you implement and test it.
Full Scan
You can ensure data consistency by retrieving the latest inventory and pricing information using GET /availabilities about once a day.
Displaying information to booking engines
Please use the data in the local DB to display facility information on your own reservation site and inventory and price information on the reservation calendar. If you design it to call the AirHost API every time, it will not work due to access restrictions.
Creating reservation data
By calling POST /stays, you can register the reservation confirmed on the booking site to AirHost via API.
Reservations created via POST /stays can also be updated via PUT /room_reservations/{id}. *Other reservations, such as OTA reservations, cannot be updated.
Registering and Updating Accommodation Rates
In
POST /staysandPUT /room_reservations/{id}, you cannot specify the accommodation rate separately for each day.Specify the total accommodation fee for the entire reservation in
booking_fee. The registered amount will be distributed evenly across the stay dates in AirHost.The evenly distributed rates are reflected in the daily accommodation rates displayed on the AirHost reservation details screen and in the automatically calculated accommodation tax. If the actual daily rates differ, there may be a discrepancy between the calculated and expected tax amounts.
chargesis a field used to register individual charges, such as additional fees. It cannot be used instead ofbooking_feeto set or adjust the accommodation rate for each day.
API Documentation and Available Endpoints
API documentation: https://airhost.stoplight.io/docs/airhost-public-api-doc/branches/japanese/b8pf0iy7p7mrw-
※ The APIs available under the “Booking Engine API” package are limited to the following APIs.
Feed (availabilities.update event のみ) |
|
Pull Latest Updates | GET |
Commit Feeds Cursor | POST |
Push webhook notification | POST |
Property |
|
List Properties | GET |
Retrieve a Property | GET |
Product |
|
List room types and rates under a given property | GET |
Room Reservation |
|
Update a Room Reservation(API で作成した予約のみ対象に、宿泊人数、チェックイン/アウト日、請求金額などを更新可能) | PUT |
Stay |
|
List Stays(作成した予約のみ) | GET |
Create a Stay | POST |
Retrieve a Stay(作成した予約のみ) | GET |
Availability and Rates |
|
Query availabilities of given room type | GET |
Even when connecting your own booking engine (reservation site) using the AirHost API, you can still set the multiplier in AirHost.
Please see the help page below for details.

