Skip to main content

[AirHost API] Overview of "Booking Engine (reservation site)" implementation

J
Written by Joelly See Toh

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

  1. Initial data acquisition

    1. Call GET /properties to get information for all properties and keep a copy in the local DB.

    2. Call GET /availabilities to get inventory and price information for each room type and rate plan, and store a copy in the local DB.

  2. Keeping data up to date

    1. 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.

  3. Full Scan

    1. You can ensure data consistency by retrieving the latest inventory and pricing information using GET /availabilities about once a day.

  4. Displaying information to booking engines

    1. 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.

  5. Creating reservation data

    1. By calling POST /stays, you can register the reservation confirmed on the booking site to AirHost via API.

    2. Reservations created via POST /stays can also be updated via PUT /room_reservations/{id}. *Other reservations, such as OTA reservations, cannot be updated.

  6. Registering and Updating Accommodation Rates

    1. In POST /stays and PUT /room_reservations/{id}, you cannot specify the accommodation rate separately for each day.

    2. 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.

    3. 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.

    4. charges is a field used to register individual charges, such as additional fees. It cannot be used instead of booking_fee to set or adjust the accommodation rate for each day.

API Documentation and Available Endpoints

※ 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.

AI generated image

Please see the help page below for details.

Did this answer your question?