Params
| Name | Type | Requireness | Default value | Description |
|---|---|---|---|---|
| property_uid | string | required | none | UID of property. |
| checkin_date | string | required | none | YYYY-MM-DD Check-in date. |
| checkout_date | string | required | none | YYYY-MM-DD Checkout date. |
| guest_name | string | required | none | Guest name. |
| guest_email | string | required | none | Guest email |
| guests_count | int | required | none | Number of guests |
| price_total | int | required | none | Total payout. |
| currency | string | required | none | Currency code (3 symbols). |
| description | string | optional | none | Additional information. |
| reservation_code | string | optional | none | Reservation code to update existing booking |
| create_invoice | int | optional | 1 | Is invoice creation needed (1) or not (0) |
| request_to_book | int | optional | 0 | Create the booking as a request to book (1) or as a confirmed booking (0). A request to book gets the Awaiting Acceptance status, does not block the calendar, is accepted with v2/accept-reservation or declined with v2/decline-reservation, and is cancelled automatically if not accepted within about 24 hours; accepting a booking with no saved card confirms it without a charge. Can not be combined with reservation_code. |
| guests | array | optional | none | Additional guests information. Array of BookingGuest objects. |
BookingGuest
| Key | Type | Requireness | Default value | Description |
|---|---|---|---|---|
| guest_name | string | optional | none | Name |
| guest_age | int | optional | none | Age |
| guest_phone | string | optional | none | Phone |
| guest_email | string | optional | none | |
| guest_address | string | optional | none | Address |
Description
Create a new or update (by reservation_code) an existing booking (airgms platform only).
Returns reservation code and platform type (see the corresponding filters section) of the booking.
This endpoint requires the following scope: direct-bookings
Request to book (v2 only)
Send request_to_book = 1 to create the booking as a request to book. The booking is created with the Awaiting Acceptance status. The response is the same as for a confirmed booking.
- A request to book does not block the calendar. Availability is checked again on accept: if the dates were taken in the meantime, the accept fails and the request is declined.
- Accept the request with
v2/accept-reservationand decline it withv2/decline-reservation, not withv2/cancel-booking. - Accepting a booking with no saved card confirms it without a charge.
request_to_book=1can not be combined withreservation_code.
The resulting status per outcome:
- Accepted with
v2/accept-reservationor by the host in the inbox: Accepted. - Declined with
v2/decline-reservation: Declined. - Declined by the host in the inbox: Cancelled.
- Not accepted within about 24 hours: Cancelled.
- Declined automatically because another request for the same dates was accepted: Declined.
- Accept failed because the dates were taken: Declined.
Response sample
{
"data": {
"reservation_code": "AIRGMS5BHJ1F75W2",
"platform_type": "airgms"
}
}