Bookings overview and settings (add-on)
The overview calendar in one call, Troubleshoot, the add-on's settings, and the scripts behind screens other plugins add.
The reads behind the owner's section. Troubleshoot answers every start time the engine considered for a service on a day and what stopped each one it did not offer, which is the quickest answer to "why can nobody book Tuesday". See Bookings and Troubleshoot.
Read the overview calendar
/api/v1/kahunacart/bookings/overview
The diary over a span, as the owner's calendar draws it — everyone and everything that can be booked with the hours they work and the days they are away, every booking between the two instants, and how many are waiting, in conflict, no-shows or cancelled. There is no money in the answer; what a shop took is in KahunaCart's own reports.
Parameters
| Name | Type | Description |
|---|---|---|
| from optional | string | When the span starts. Unix seconds, or a date and time. Three days ago if left out. |
| to optional | string | When the span ends. Unix seconds, or a date and time. A week after the start if left out, and no more than 120 days past it. |
Explain the times offered on a day
/api/v1/kahunacart/bookings/troubleshoot
Every candidate start time on one day for one service, with a tick or the exact reason it is not on offer — too soon, too far ahead, full, booked, held by somebody else, time off, closed, busy on another calendar, or which need failed and why. Answers "why can't my customer book Friday" without anybody guessing.
Parameters
| Name | Type | Description |
|---|---|---|
| product_id required | integer | The booking product to look at. |
| variant_id optional | integer | One option of it, when the lengths differ. The product's own rule if left out. |
| with optional | string | The slug of the person or thing the customer asked for. Everyone who could do it if left out. |
| date optional | string | The day, as YYYY-MM-DD. Today if left out. |
| tz optional | string | Which zone that day is counted in. UTC if left out. |
Read the Bookings settings
/api/v1/kahunacart/bookings/settings
What this add-on is set to do, store-wide — whether the front desk is switched on and where it answers, whether a place that comes free on a full class is offered automatically or by hand and for how long it is held, what a published calendar says about each booking, how long a slot is held in the basket and at the payment page, how the shop writes a time of day, and the defaults a service falls back to when it says nothing of its own. Nothing secret is in it.
Get the script behind an add-on screen
/api/v1/kahunacart/bookings/admin-slots/{id}.js
The script behind a screen another plugin mounted in the Bookings section, such as the Rentals rule editor. The id has to name something a plugin mounted and the file has to resolve inside the plugins directory. No tool: it answers JavaScript.
overview refuses a span longer than 120 days, and answers the first 200 bookings of a span with more, saying so.