[ overview ]
This article explains the development procedure for developing an in-house system that retrieves reservation information from the AirHost API and provides functions that are not provided by AirHost PMS, such as accounting and cleaning management.
Basically, reservation information is read-only. It is not an API for creating a check-in app. If you would like to use advance check-in or self-check-in, please use the check-in option provided by AirHost.
Note 1 : You can retrieve all reservation information including OTA reservations using AirHost API. However, you can only update reservation information created from your system via API.
Note 2: If you are planning to send messages to guests, please understand that this is difficult to achieve. The reason is that for OTAs such as Airbnb, Booking.com, and Rakuten Travel, where messages can only be sent and received via API, email address information is not included in the reservation information.
Note 3 : It is possible to obtain reservation information, but it is not possible to obtain guest information obtained during advance check-in or message exchanges with guests.
[Details]
Implementation image
Please make sure to design your system so that a copy of the facility and reservation data obtained from the AirHost API is kept in your internal 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 /stays to get the reservation data and keep a copy in the local DB.
Keeping data up to date
To keep the facility and reservation information stored in the local DB up to date, call GET /feeds at intervals such as every 5 minutes to check the "event" information and update it in the local DB as necessary.
Full Scan
You can ensure data consistency by retrieving all future bookings with GET /stays about once a day.
Displaying information on an internal system page
Please use the data in the local DB to display information on your company's internal system. If you design it to call the AirHost API every time, it will not work due to access restrictions.
Creating reservation data
You can also create reservations from your internal system via the API by calling POST /stays.
Reservations created via POST /stays can also be updated via PUT /room_reservations/{id}. *Other reservations, such as OTA reservations, cannot be updated.
API Documentation and Available Endpoints
API documentation: https://airhost.stoplight.io/docs/airhost-public-api-doc/branches/japanese/b8pf0iy7p7mrw-
*The only APIs available in the "API for internal systems" package are listed below.
GET /properties
POST /stays
GET /feeds (all events available except availabilities.update)
POST /commit_feeds
GET /stays (gets all reservations, including OTA reservations)
POST /stays
PUT /room_reservations/{id} (only for reservations created with POST /stays)