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

Change Booking Room Rate

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

Change the price of one room: per night, the same price for every night, and/or the room discount. Room totals, booking totals and accounting line items are recalculated the same way as editing the price 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)

Body Parameters (JSON) — at least one of them:

  • days_breakdown (optional): Array of { day: YYYY-MM-DD, price: number >= 0 }. Send only the nights to change — the other nights keep their current price. Each day must be a night of the room’s stay (checkin_date up to the day before checkout_date; for a same-day booking the only night is checkin_date) and must not repeat.
  • price_per_night (optional): Number >= 0 — the same price for every night. Cannot be combined with days_breakdown.
  • room_discount (optional): Number >= 0 — discount amount for this room. The effective discount (the one sent, or the room’s current discount when omitted) must not exceed the new room price (sum of nights) — lower it in the same request when lowering the price.
  • If the room has no stored nightly prices, send every night in days_breakdown (or use price_per_night); otherwise 422.
  • days_breakdown accepts at most 366 items.

Important Notes:

  • Allowed room statuses: reserved, confirmed, holding, checked_in. Others → HTTP 422 BOOKING_ROOM_INVALID_STATUS.
  • Bookings from OTA channels are not blocked; the price on the OTA reservation itself is not changed.
  • Partner webhook booking.updated is sent 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). Validation errors → HTTP 422 with errors.

tenant_id
required
string
booking_id
required
string
room_id
required
string
ChangeBookingRoomRateRequest

Đổi giá một phòng — POST /bookings/{booking_id}/rooms/{room_id}/rate.

Gửi days_breakdown (chỉ các đêm cần đổi — đêm còn lại giữ giá hiện tại) HOẶC price_per_night (cùng giá cho mọi đêm), có thể kèm room_discount. Ít nhất một trường.

object
booking_id
required
string
<= 8 characters
room_id
required
string format: uuid
price_per_night
number | null
<= 999999999999
room_discount
number | null
<= 999999999999
days_breakdown
array | null
>= 1 items <= 366 items
object
day
required
string format: date
price
required
number
<= 999999999999
object
success
required
boolean
data
required
object
id
required
string
amount
required
number
room_fee
required
number
room_discount
required
number
room_charge
required
number
booking_rooms
required
Array<object>
object
id
required
string
room_fee
required
number
room_discount
required
number
room_charge
required
number
days_breakdown
required
Array<object>
object
day
required
string
price
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?