Reschedule a booking
POST /api/v1/bookings/{bookingId}/reschedule
Moves an hourly booking by date/time/duration, or an overnight booking by arrival and departure dates.
The price survives. priceAmount absent from the body is not written — the frozen price stays.
Sending it is an explicit renegotiation.
The booking is excluded from its own collision check: moving it by one hour on the same villa is not a conflict. Moving into the past is allowed — recording a slot that shifted yesterday is real work — and opening hours and collisions still apply.
Authorization
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Allowed |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
propertyId | uuid | yes | Target villa, active, in the same organization |
date | string | SHOOT | Local day YYYY-MM-DD |
startMinute | integer | SHOOT | Minutes from local midnight |
durationMinutes | integer | SHOOT | Must be priced for the target villa |
checkInDay | string | OVERNIGHT | Arrival day YYYY-MM-DD |
checkOutDay | string | OVERNIGHT | Departure day, strictly after arrival |
priceAmount | integer or null | no | Explicit new price; absent/null keeps the frozen price |
Example
curl -X POST -H "x-api-key: $VILLASLOT_API_KEY" -H "content-type: application/json" \
-d '{"propertyId":"1f0a…","date":"2026-09-13","startMinute":600,"durationMinutes":120}' \
"https://villaslot.app/api/v1/bookings/5b2c…/reschedule"For an existing overnight booking, send:
{
"propertyId": "<target-villa-uuid>",
"checkInDay": "2026-09-10",
"checkOutDay": "2026-09-12"
}The server reads the booking kind and the target villa's current checkInMinute /
checkOutMinute. A 14:00 / 11:00 villa produces two civil nights from the 10th at
14:00 to the 12th at 11:00 in the organization timezone. The minimum-night rule and
stay conflict checks apply; overnight stays keep a zero buffer and require no hourly
rate. Historical times remain unchanged until a reschedule succeeds. The same
transaction preserves the payment ledger and records the before/after history.
Mixing both payload shapes or sending one for the other booking kind is rejected.
Response
200 OK— the moved booking.
What it refuses
409 Conflict— the target slot, or its buffer, is taken;detailnames what blocks.422 Unprocessable Entity— the booking is neither a hold nor confirmed, the target villa is not bookable, the duration has no rate on it, the dates are invalid or shorter than the minimum stay, or the payload does not match the stored booking kind.401 Unauthorized— missing or invalid key, or a key whose bearer left the organization.404 Not Found— unknown id, or an id belonging to another organization. The two are deliberately indistinguishable.429 Too Many Requests— over 120 requests in a minute for this key.