Reservation resource availability
Weekly recurring working hours of a resource: one row per time block per weekday. A day can have several rows (for example 09:00–12:00 and 13:00–17:00). These rows define the available slots of every service the resource is linked to, and a reservation is only accepted on a resource inside one of its blocks.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /reservation-resource-availability | List availability |
GET | /reservation-resource-availability/:id | Get an availability block |
POST | /reservation-resource-availability | Create an availability block |
PATCH | /reservation-resource-availability/:id | Update an availability block |
DELETE | /reservation-resource-availability/:id | Delete an availability block |
The availability object
json
Fields
| Field | Type | Description |
|---|---|---|
id | integer | Read-only. Unique ID. |
organization_id | integer | Owning organization. Required on create; must be the API key's organization. |
resource_id | integer | Resource these hours belong to. Required on create. |
day_of_week | integer | 0 = Sunday, 1 = Monday … 6 = Saturday. Required on create. |
start_time | string | Block start, local time of the service, HH:mm or HH:mm:ss (returned as HH:mm:ss). Required on create. |
end_time | string | Block end, same format. Required on create. A slot fits only if it ends by this time. |
breaks | array | Items { "start_time", "end_time" }. Default []. Stored only: slot calculation and booking validation do not exclude breaks. To leave a gap, create two blocks instead. |
valid_from | string (YYYY-MM-DD) | null | Stored only: not applied by slot calculation or booking validation. |
valid_until | string (YYYY-MM-DD) | null | Stored only: not applied by slot calculation or booking validation. |
is_active | boolean | Default true. Inactive blocks are ignored. |
created_at | string (date-time) | Read-only. Creation time. |
updated_at | string (date-time) | Read-only. Last update time. |
deleted_at | string (date-time) | null | Read-only. Set when the block is deleted. |
Replacing a resource's schedule
The app replaces a schedule by listing the resource's rows, deleting each one and creating the new blocks. You can also update a single block.
Related
- Reservation resources
- Reservation resource exceptions: date-specific closures and special hours
- Reservation available slots
Report an issue with this documentation
Please log in to report issues with our documentation.