Table of Contents
The tours and staff features have REST routes under wc-sibooking/v1 and hooks. The REST API uses the same authentication as the rest of the plugin’s API (see REST API overview and authentication).
Departures #
A departure is named by its id, or, before it has a row of its own, by <product id>@<YYYYMMDDHHMM> (for example 123@202610181000).
| Route | What it does |
|---|---|
GET /departures | The coming departures, with seats, status and staff. |
POST /departures | Add a one-off departure. |
GET /departures/{key} | One departure. |
PATCH /departures/{key} | Change its capacity, sales, cut-off, minimum or notes, or its time (every booking moves with it). |
POST /departures/{key}/cancel | Cancel it with a refund or an offer to move. |
GET /departures/{key}/manifest | Its manifest. |
GET / POST /departures/{key}/checkins | Read check-ins, or check a guest or a booking in. |
Staff assigned to a departure can read its manifest and check guests in.
Staff and resources #
| Route | What it does |
|---|---|
/staff, /staff/{id}, /staff/{id}/restore, /staff/free | Staff, and who is free for a time. |
/skills, /skills/{code} | The skill list. |
/resources, /resources/{id}, /resources/{id}/restore, /resources/free | Resources, and which are free. |
/jobs, /jobs/{ref}, /jobs/{ref}/assignments, /jobs/{ref}/auto-assign | Jobs and their assignments. A departure’s job is departure:{id}. |
/assignments, /assignments/{id}, …/accept, …/decline, …/check-in, …/note | Assignments, and what staff do on My schedule. |
/conflicts, /unassigned | Clashes, and jobs still missing someone. |
/board, /board/changes, /board/candidates, /board/assign, /board/reassign, /board/unassign, /board/auto-fill, /board/apply-fill | The Staff schedule. |
POST /my-schedule/scan | Answer a scanned or typed code. |
Hooks #
| Hook | Type | When |
|---|---|---|
sibooking_departure_changed | action | A departure row was written (added, updated, moved, status). |
sibooking_departure_time_changed | action | A departure’s time was changed and its bookings moved. |
sibooking_departure_cancelled | action | A departure was cancelled and its guests refunded or offered another date. |
sibooking_departure_cancelled_notify | action | Tell a customer their departure was cancelled (the Departure cancelled email listens). |
sibooking_departure_below_minimum | action | A departure is short of its minimum, 24 hours before its deadline or at it. |
sibooking_departure_guaranteed | action | A departure is guaranteed to run. |
sibooking_departure_customer_moved | action | A customer moved their booking to another departure in My Account. |
sibooking_departure_card_returned | filter | How much of a cancelled departure’s gift card part the gift card plugin put back on its card; the rest is noted to re-issue by hand. |
sibooking_departure_phone | filter | The phone number “Call us to book” shows. |
sibooking_departure_schema | filter | The schema.org Event markup of a tour’s page. |
sibooking_participant_checked_in, sibooking_participant_no_show | action | A guest was checked in, or marked a no-show. |
sibooking_participant_names_saved | action | A booking’s guest names were saved. |
sibooking_participant_sign_url | filter | Where staff open a guest’s waiver to sign on their phone. |
sibooking_staff_assigned, sibooking_staff_unassigned, sibooking_staff_assignment_changed | action | An assignment was made, cancelled or changed. |
sibooking_staff_assignment_accepted, sibooking_staff_assignment_declined, sibooking_staff_checked_in | action | A staff member accepted, declined or checked in on My schedule. |
sibooking_staff_booking_job | filter | A booking’s staff job before it is saved. |
sibooking_staff_job_types | filter | The kinds of jobs that need people or resources. |
sibooking_staff_requirement_saved | action | A product’s Staff & resources requirement was saved. |
sibooking_staff_scan, sibooking_staff_scan_enabled | filter | Answer a code scanned on My schedule; show the Scan button. |
sibooking_staff_locations, sibooking_staff_scope_locations, sibooking_staff_opening_hours | filter | Locations and opening hours (Multi Location Inventory answers them). |
sibooking_staff_understaffed_hours | filter | How many hours ahead an understaffed job is reported (48). |
sibooking_my_schedule_cards | filter | Add a card to the top of My schedule. |
The plugin’s docs/hooks.md has every parameter.
