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

MethodPathDescription
GET/reservation-resource-availabilityList availability
GET/reservation-resource-availability/:idGet an availability block
POST/reservation-resource-availabilityCreate an availability block
PATCH/reservation-resource-availability/:idUpdate an availability block
DELETE/reservation-resource-availability/:idDelete an availability block

The availability object

json

Fields

FieldTypeDescription
idintegerRead-only. Unique ID.
organization_idintegerOwning organization. Required on create; must be the API key's organization.
resource_idintegerResource these hours belong to. Required on create.
day_of_weekinteger0 = Sunday, 1 = Monday … 6 = Saturday. Required on create.
start_timestringBlock start, local time of the service, HH:mm or HH:mm:ss (returned as HH:mm:ss). Required on create.
end_timestringBlock end, same format. Required on create. A slot fits only if it ends by this time.
breaksarrayItems { "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_fromstring (YYYY-MM-DD) | nullStored only: not applied by slot calculation or booking validation.
valid_untilstring (YYYY-MM-DD) | nullStored only: not applied by slot calculation or booking validation.
is_activebooleanDefault true. Inactive blocks are ignored.
created_atstring (date-time)Read-only. Creation time.
updated_atstring (date-time)Read-only. Last update time.
deleted_atstring (date-time) | nullRead-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

Report an issue with this documentation

Please log in to report issues with our documentation.