Bookable people and places (add-on)
The people, rooms and equipment whose time can be taken, their working hours, their time off and the locations they work at.
A bookable is anybody or anything whose time can be taken. Its outside calendars are never answered as addresses: a read gives a masked list with the label, the host and the last six characters, because a calendar's secret address is a password that happens to look like a link. See People and places and Opening hours.
List the accounts a bookable can be tied to
/api/v1/kahunacart/bookings/setup/accounts
The sign-in accounts a person can be tied to, so somebody who works here can be given the account they use at the front desk. The username is the value a bookable stores. Username and display name only — nothing else about anybody.
List bookables
/api/v1/kahunacart/bookings/setup/bookables
Everyone and everything whose time can be taken — the people, the rooms, the equipment — with how many identical ones there are of each.
Parameters
| Name | Type | Description |
|---|---|---|
| enabled_only optional | boolean | Leave out the ones that have been switched off. |
| type optional | string |
Only one kind.
One of:
person, space, equipment, property |
Add a bookable
/api/v1/kahunacart/bookings/setup/bookables
Add somebody or something whose time can be booked.
Parameters
| Name | Type | Description |
|---|---|---|
| type required | string |
What kind of thing this is.
One of:
person, space, equipment, property |
| slug required | string | The short name it is referred to by, in lower case. |
| name optional | string | What to call it on screen. |
| units optional | integer | How many identical ones there are. Ten lanes is one record with ten units. |
| timezone optional | string | The zone it works in, when that is not the shop's. |
| schedule_id optional | integer | Which set of hours it works. |
| location_id optional | integer | Where it is. |
| user_id optional | string | The account that signs in as this person. |
| enabled optional | boolean | Whether it takes bookings at all. |
| position optional | integer | Where it comes in the order things are filled up in. |
Update a bookable
/api/v1/kahunacart/bookings/setup/bookables/{id}
Change somebody or something that can be booked. Switching one off is how a person who has left stops taking new bookings while their old ones stay readable.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The record. |
| name optional | string | What to call it on screen. |
| units optional | integer | How many identical ones there are. |
| timezone optional | string | The zone it works in. |
| schedule_id optional | integer | Which set of hours it works. |
| location_id optional | integer | Where it is. |
| user_id optional | string | The account that signs in as this person. |
| enabled optional | boolean | Whether it takes bookings at all. |
| position optional | integer | Where it comes in the order things are filled up in. |
Remove a bookable
/api/v1/kahunacart/bookings/setup/bookables/{id}
Remove somebody or something that can be booked. Refused while future bookings are sitting on it, naming how many — switch it off instead.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The record. |
List working hours
/api/v1/kahunacart/bookings/setup/schedules
The named sets of working hours, each with its own weekly pattern and the dates that are different.
Add a set of working hours
/api/v1/kahunacart/bookings/setup/schedules
Add a set of working hours.
Parameters
| Name | Type | Description |
|---|---|---|
| slug required | string | The short name it is referred to by. |
| name optional | string | What to call it on screen. |
| timezone optional | string | The zone the hours are written in. |
| days optional | object | The working week, as mon/tue/wed/thu/fri/sat/sun each holding a list of from and to times. |
| overrides optional | object | Dates that are different, each holding its own list of times. An empty list closes the day. |
Update a set of working hours
/api/v1/kahunacart/bookings/setup/schedules/{id}
Change a set of working hours.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The set of hours. |
| name optional | string | What to call it on screen. |
| timezone optional | string | The zone the hours are written in. |
| days optional | object | The working week. |
| overrides optional | object | Dates that are different. |
Remove a set of working hours
/api/v1/kahunacart/bookings/setup/schedules/{id}
Remove a set of working hours. Anybody still pointed at it falls back to their location's hours, or to the service's.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The set of hours. |
List time off
/api/v1/kahunacart/bookings/setup/time-off
The whole days one person or thing is away. Both ends are inclusive and they are dates rather than moments, because a day off is a day where the person is.
Parameters
| Name | Type | Description |
|---|---|---|
| bookable_id required | integer | Whose time off to show. |
Book time off
/api/v1/kahunacart/bookings/setup/time-off
Book somebody or something out for whole days.
Parameters
| Name | Type | Description |
|---|---|---|
| bookable_id required | integer | Who or what is away. |
| from required | string | The first day away, as a date. |
| to required | string | The last day away, as a date. The same as from for a single day. |
| note optional | string | Why, for whoever reads the diary. |
Change time off
/api/v1/kahunacart/bookings/setup/time-off/{id}
Change a stretch of time off.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The stretch of time off. |
| from optional | string | The first day away. |
| to optional | string | The last day away. |
| note optional | string | Why. |
Remove time off
/api/v1/kahunacart/bookings/setup/time-off/{id}
Take a stretch of time off back out, so those days can be booked again.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The stretch of time off. |
List locations
/api/v1/kahunacart/bookings/setup/locations
Where bookings happen, each with its address and its own hours.
Add a location
/api/v1/kahunacart/bookings/setup/locations
Add a place bookings happen.
Parameters
| Name | Type | Description |
|---|---|---|
| slug required | string | The short name it is referred to by. |
| name optional | string | What to call it on screen. |
| address optional | string | The address, written the way it should be printed. |
| timezone optional | string | The zone it is in. |
| schedule_id optional | integer | The hours it is open. |
Update a location
/api/v1/kahunacart/bookings/setup/locations/{id}
Change a place bookings happen.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The place. |
| name optional | string | What to call it on screen. |
| address optional | string | The address. |
| timezone optional | string | The zone it is in. |
| schedule_id optional | integer | The hours it is open. |
Remove a location
/api/v1/kahunacart/bookings/setup/locations/{id}
Remove a place bookings happen.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The place. |