Booking Update
Update a Booking
Use this endpoint to modify an existing booking. You can change dates, room, and notes. Updates to dates or room will re-check availability and pricing rules.
Endpoint
PATCH /api/v1/client/bookings/{bookingId}
Example curl
curl
curl "/api/v1/client/bookings/e7b7f6bb-6c0c-4e2c-9b3e-9c6f2a1c0a77" \
-X PATCH \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "origin: https://docs.hostelmate.co" \
--data-raw '{
"booking": {
"dates": [
{ "date": "2025-12-19", "amount": 260 },
{ "date": "2025-12-20", "amount": 260 }
]
},
}'
This is a partial update. Send only the fields you want to change.
Request Payload
Top-level Fields
booking
object
Booking-level updates, such as new nightly dates/amounts.
room
string
Change to a different room or room type ID (UUID).
notes
string
Update internal notes for the booking.
Booking Object (updatable)
dates
array
Replace the nightly pricing array. The server will recompute total as the sum of these amounts.
Dates Item
date
string
Night date (format: YYYY-MM-DD).
amount
integer
Nightly amount in minor units (e.g., fils/cents).
Response (200 OK)
{
"bookingId": "e7b7f6bb-6c0c-4e2c-9b3e-9c6f2a1c0a77",
"status": "confirmed",
"room": "7b9e2f12-34cd-4e89-bf45-4a18f5a8a1f0",
"total": 52000,
"dates": [
{ "date": "2025-12-19", "amount": 26000 },
{ "date": "2025-12-20", "amount": 26000 }
],
"updated": "2025-10-02T11:05:13Z"
}
Validation Rules
The request may include any subset of fields; missing fields are left unchanged.
If
booking.dates
is provided:It must contain at least one item.
date
must be valid (YYYY-MM-DD).amount
must be a non-negative integer.The server recomputes
total
from the provided dates.
If
room
is provided, availability for the existing dates is re-validated.
Error Codes
400
bad_request
Invalid field(s) or payload structure.
404
booking_not_found
No booking with the specified bookingId
.
404
room_not_found
The specified room
does not exist.
409
availability_conflict
New dates/room are not available.
422
pricing_mismatch
dates[].amount
do not comply with rate rules.
500
server_error
Unexpected error.
Last updated
Was this helpful?