Update booking settings
PATCH /api/v1/settings/booking
Changes the booking rules. Fields absent from the body keep their current value.
Authorization
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Refused — 403 |
Settings follow the right to change the organization itself.
Request body
| Field | Type | Description |
|---|---|---|
currency | enum | IDR, EUR or USD |
timezone | enum | UTC, Asia/Makassar, Asia/Jakarta, Asia/Singapore, Asia/Dubai, Europe/Paris, Europe/London, America/New_York |
bufferMinutes | integer | 0 to 480, the gap kept between two shootings |
holdExpirationHours | integer | 1 to 720 |
holdBlocksSlot | boolean | Whether a hold occupies the slot |
publicBookingEnabled | boolean | Opens the public booking page |
minimumNights | integer | 1 to 30, for overnight stays |
turnoverGuardEnabled | boolean | Protects the check-out / check-in window |
turnoverGuardMinimumMinutes | integer | Minimum duration of a shoot that overlaps the window: 60 to 480, in whole hours (60, 120… 480) |
Example
bash
curl -X PATCH -H "x-api-key: $VILLASLOT_API_KEY" -H "content-type: application/json" \
-d '{"bufferMinutes":45}' \
"https://villaslot.app/api/v1/settings/booking"Response
200 OK— the saved settings.
What it refuses
403 Forbidden— the key bearer is amember.422 Unprocessable Entity— an unsupported currency or timezone, or a value outside its range.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.
Notes
- Changing the timezone changes how future
date/startMinutepairs are read. It does not move a single existing booking: those are stored as instants. - Changing the buffer applies to future bookings only; each booking keeps the buffer frozen on its line.
Airbnb conflict policies
airbnbReservedPolicy accepts warn (default) or block. Independently, airbnbUnavailablePolicy accepts ignore, warn (default), or block. Omitted fields preserve the stored policies, including requests from older clients. OWNER/ADMIN permissions apply.