Booking calendar sync (add-on)
Calendar links for phones and for channels such as Airbnb, the calendar files behind them, and testing an outside calendar.
Making or taking away a link needs kahunacart.bookings.manage. The two .ics routes are public: the token in the path is the credential, and making a link again mints a new token so the old address stops working. See Calendar sync.
Make a calendar link
/api/v1/kahunacart/bookings/setup/bookables/{id}/feed-token
Make a calendar link for one person, room or piece of equipment, so it can be subscribed to from a phone. Running this again mints a new link and the old one stops working, which is how a link that has gone somewhere it should not be is taken back.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The person, room or piece of equipment. |
Take a calendar link away
/api/v1/kahunacart/bookings/setup/bookables/{id}/feed-token
Take a calendar link away with nothing put back. Every phone subscribed to it stops updating.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The person, room or piece of equipment. |
Make a channel link
/api/v1/kahunacart/bookings/setup/bookables/{id}/channel-token
Make the calendar link a channel gets — Airbnb, VRBO, Booking.com — for one property, room or pitch. What comes back down it says "Not available" and the dates and nothing else: no guest, no service, no notes. It is a second link beside the staff one, so taking a channel away leaves everybody's phone working. Running this again mints a new link and the old one stops working.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The property, room or pitch. |
Take a channel link away
/api/v1/kahunacart/bookings/setup/bookables/{id}/channel-token
Take a channel link away with nothing put back. The channel stops hearing about new bookings; nights it has already blocked stay blocked there until somebody clears them at the channel's own end.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The property, room or pitch. |
Test an outside calendar
/api/v1/kahunacart/bookings/setup/bookables/{id}/busy-feeds/test
Fetch an outside calendar right now and say how many busy times are in it over the next few weeks, or what went wrong in plain words. Use it before saving an address as well as after.
Parameters
| Name | Type | Description |
|---|---|---|
| id required | integer | The person, room or piece of equipment the calendar would block time for. |
| url required | string | The calendar address to try. Must be https, and an address pointing at this server or at its own network is refused. |
| days optional | integer | How many days ahead to count busy times over. Thirty by default. |
Subscribe to a bookables calendar
/api/v1/kahunacart/bookings/public/feeds/{token}.ics
One person's own calendar, as a file to subscribe to. Answers text/calendar, and 304 when nothing has changed
Subscribe to a channels calendar
/api/v1/kahunacart/bookings/public/channels/{token}.ics
The same bookable for a channel: whole dates with an exclusive end, the summary Not available, and nothing else. Its own token on its own column, and it carries holds that have reached an order