Get opening hours
GET /api/v1/properties/{propertyId}/opening-hours
The weekly opening hours of a villa: one entry per open day.
A day missing from the list is closed — which is not the same as free. Availability will return
no slot for it, and a booking attempt is refused with CLOSED.
Authorization
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Allowed |
Units
dayOfWeekfollowsDate#getDay():0Sunday …6Saturday.openMinuteandcloseMinutecount minutes from local midnight in the organization timezone, never UTC.480is 08:00,1200is 20:00.
Example
bash
curl -H "x-api-key: $VILLASLOT_API_KEY" \
"https://villaslot.app/api/v1/properties/1f0a…/opening-hours"Response
200 OK— the open days.
json
{
"success": true,
"data": [
{"dayOfWeek": 1, "openMinute": 480, "closeMinute": 1200},
{"dayOfWeek": 2, "openMinute": 480, "closeMinute": 1200}
]
}What it refuses
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.