Bỏ qua để đến nội dung

Cancel Booking Room

API cho đối tácAdd-on
POST
/properties/{tenant_id}/bookings/{booking_id}/rooms/{room_id}/cancel

Cancel one room of a multi-room booking. The room price is removed from the booking totals; the other rooms are not changed. Cancelling the last paying room (a room that is not cancelled and has room_fee > 0) cancels the whole booking, same as in the PMS.

Scope Required: bookings:write

URL Parameters:

  • booking_id (required): The booking code. A group booking (master) code is accepted.
  • room_id (required): The booking room UUID (booking_rooms[].id from Get Booking)

Important Notes:

  • Allowed room statuses: reserved, confirmed, holding, no_show. A checked_in or checked_out room cannot be cancelled → HTTP 422 BOOKING_ROOM_INVALID_STATUS.
  • If cancelling this room would cancel the whole booking but the booking status does not allow cancellation (e.g. in_progress), the request fails with HTTP 422 BOOKING_ROOM_INVALID_STATUS.
  • Retry-safe: cancelling a room that is already cancelled returns 200 without changes.
  • To cancel the whole booking use POST /bookings/{booking_id}/cancel.
  • Bookings from OTA channels are not blocked; the change is not sent back to the OTA reservation itself.
  • Partner webhook: booking.updated (or booking.cancelled when the whole booking is cancelled) for the booking that owns the room.

Response (200): same shape as Get Booking Detail (GET /bookings/{booking_id}), for the booking_id in the URL. Only the main fields are listed below.

Error codes: BOOKING_ROOM_INVALID_STATUS (422, with checkin_status and booking_status), BOOKING_001 (400/500). Invalid room_id → HTTP 422 with errors.room_id.

tenant_id
required
string
booking_id
required
string
room_id
required
string
CancelBookingRoomRequest

Huỷ một phòng trong đơn — POST /bookings/{booking_id}/rooms/{room_id}/cancel. Không có body.

object
booking_id
required
string
<= 8 characters
room_id
required
string format: uuid
object
success
required
boolean
data
required
object
id
required
string
status
required
string
amount
required
number
room_fee
required
number
room_charge
required
number
booking_rooms
required
Array<object>
object
id
required
string
checkin_status
required
string
room_fee
required
number
room_charge
required
number

Validation error

object
message
required

Errors overview.

string
errors
required

A detailed description of each field that failed validation.

object
key
additional properties
Array<string>
Bài này có giúp được bạn không?