Public Documentation
API Notes (Lightweight)
High-level technical notes for teams integrating operational workflows with CalendarVU while preserving tenant safety, payment boundaries, and booking integrity.
Documentation
- API access is tenant-scoped by organization and active location.
- Permission gates are enforced per endpoint and should match staff role design.
- Billing and Stripe operations include action-level permission checks and redaction behavior.
- Protocol template writes enforce tenant-scoped ID validation for referenced products and resource types.
- Class and program sales-order pricing can now resolve from linked commerce products rather than manual amount entry.
- Promo resolution now supports scheduled specials, intro-offer eligibility, auto-apply behavior, and membership intro price-plan selection.
Integration Boundary
Stripe card data should always flow through Stripe-secure collection methods (SetupIntent plus Stripe-hosted/Elements flows).Tenant Scope and Permissions
Requests are evaluated against active organization and location context.
Endpoints may return redacted fields when roles do not include required financial-detail permissions.
- Use authenticated context for protected endpoints.
- Keep role-permission mapping aligned with operational responsibilities.
- Example: give front desk booking and payment visibility, while reserving refund and financial-detail access for managers.
Billing and Stripe Operational Endpoints
Billing views aggregate payments, invoices, failed collections, and transaction perspectives.
Client profile routes provide Stripe identity, payment methods, action flows such as retry and refund, and a broader operational payload that includes reservations, emergency contacts, memberships, packs, credits, purchases, and alerts.
Idempotency and Reliability
When triggering financial operations, use idempotent request strategies in clients to avoid accidental duplicate actions.
Client Profile, Search Create, and Waiver APIs
Client create and update endpoints now support operational identity fields such as preferred name, status, home studio, and notes.
Emergency contact and waiver endpoints are tenant-scoped and designed to support fast front desk workflows without bypassing compliance checks.
- Search and create: GET /clients?q=... and POST /clients
- Emergency contacts: GET/POST/PUT/DELETE /clients/{client}/emergency-contacts
- Profile aggregate: GET /billing/clients/{client}/profile
- Client waiver state: GET /clients/{client}/waiver-status
- Record acceptance: POST /clients/{client}/waiver-acceptance
- Waiver admin config: GET/POST/PUT /waivers/current
Protocol Template and Sequential Booking APIs
Protocol endpoints support template CRUD and protocol-aware slot search plus booking create/reschedule actions.
Chain booking orchestration uses lock plus transaction semantics to avoid partial multi-step bookings.
- Read: GET /protocol-templates
- Write: POST/PUT /protocol-templates
- Search: GET /bookings/slots with protocol_template_id
- Booking: POST /bookings with protocol_template_id
- Admin segment ops: PATCH /bookings/{booking}/segments/{segment}/reschedule or /reassign
- Example: an integrator can build a concierge workflow that requests one protocol slot and receives a full itinerary candidate.
Class, Program, Retail, and Sales Order APIs
CalendarVU now exposes operational APIs for class templates, class sessions, roster management, attendance, program enrollments, retail stock workflows, and mixed sales orders.
These APIs are designed to add class and commerce operations without forcing all staff into one overloaded scheduling surface.
- Class offerings and templates: GET/POST /class-offerings and /class-templates
- Class sessions and roster actions: GET/POST /class-sessions plus /class-sessions/{classInstance}/registrations
- Attendance and instructor changes: PATCH /class-registrations/{classReservation}/attendance and /class-sessions/{classInstance}/instructor
- Programs and enrollments: GET/POST /programs, POST /programs/{program}/generate-sessions, POST /programs/{program}/enroll
- Retail catalog and stock: GET/POST /retail-items and POST /retail-items/{retailItem}/adjust-stock
- Mixed checkout source of truth: GET/POST /sales-orders
- Operational visibility and gating: GET/PUT /operational-mode
Commerce-Linked Pricing and Entitlement Targeting
Class templates and programs can carry `commerce_product_id`, allowing downstream sales-order pricing to resolve from the linked active price plan.
Entitlement rules can also target linked commerce-backed items so memberships and packs can apply to selected class or program offerings directly.
- Use one-time commerce products for class-template and program-linked pricing.
- Use entitlement rules on service, category, or commerce-product targets depending on what the purchase should cover.
- Expect setup-driven route and screen suppression when optional operational areas are disabled for the location.
Specials, Promo Resolution, and Intro Pricing
Promo resolution now evaluates both code-driven and auto-applied offers for booking checkout and sales-order flows.
Offer metadata can include first-purchase style eligibility, date windows, client redemption limits, and an optional intro recurring price plan for membership sales.
- Promo CRUD: GET/POST/PUT/DELETE /promo-offers
- Booking decision preview: GET /checkout/decision with optional `base_amount` and `promo_code`
- Booking checkout processing: POST /checkout/process with optional `promo_code`
- Mixed-cart sales: POST /sales-orders with optional `promo_code` and `commerce_product` line support
- Applied-offer persistence is written onto invoices, payments, subscriptions, and sales-order lines for downstream visibility
Public Docs Direct Access Routing
The documentation pages are public Vue routes mounted under the `/calendar/` base, so direct access to `/calendar/docs` and nested docs routes depends on SPA fallback behavior in your web server.
If the server sends docs URLs to PHP instead of the built frontend entrypoint, deep links and page refreshes can fail even though the routes are already public in the app.
- Keep `/calendar/api/*` routed to Laravel and PHP.
- Serve `/calendar/docs/content/*` and `/calendar/docs/images/*` as static frontend assets.
- For `/calendar/docs` and `/calendar/docs/*`, fall back to `/calendar/index.html` when no static file exists.
- Example nginx shape: `location ^~ /calendar/api/ { rewrite ^/calendar(/.*)$ $1 break; try_files $uri $uri/ /index.php?$query_string; }` and `location ^~ /calendar/ { try_files $uri $uri/ /calendar/index.html; }`.