PATCH /api/v1/settings/booking
Changes the booking rules. Fields absent from the body keep their current value.
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Refused — 403 |
Settings follow the right to change the organization itself.
| 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 168 |
holdBlocksSlot | boolean | Whether a hold occupies the slot |
publicBookingEnabled | boolean | Opens the public booking page |
minimumNights | integer | 1 to 30, for overnight stays |
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"200 OK — the saved settings.403 Forbidden — the key bearer is a member.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.date / startMinute pairs are read. It does not
move a single existing booking: those are stored as instants.