INSTRUCTIONS.md
Wix Bookings Skill
Overview
This skill provides a real client-only Wix Bookings front end. The browser communicates with Wix directly using a public WIX_CLIENT_ID. It handles appointment and class booking flows through an API.
Source files (in this skill)
The skill uses shared transport and helpers:
| File | What it covers |
|---|---|
wix-bookings-services.js |
Service listing, slot availability, media URL helper |
wix-bookings-checkout.js |
Create booking, hosted checkout, bookAndCheckout convenience |
When to use
- User wants a Wix Bookings appointment site or requests to connect Wix Bookings.
- Replacing mock services with live Wix data.
- Adding service listings, slot picker, booking creation, or checkout.
Prerequisites
- A Wix site with Wix Bookings installed and at least one appointment service created.
- The site's public headless
WIX_CLIENT_ID. - The site must accept payments for paid services, and the deployed app domain must be allow-listed for checkout.
The API (copy as-is; do not re-derive it)
This skill ships only the REST layer; no UI components are included. Use the following snippets:
- Client Token Management:
src/rest/wix-client.js - Services & Availability:
src/rest/wix-bookings-services.js - Booking & Checkout:
src/rest/wix-bookings-checkout.js
How to wire it (UI is the project's choice)
- Service List: Use
queryServices()to list services, render details such as name, tagline, media, and price. - Slot Picker: Use
listSlotsForService()for available slots based on service type. - Booking Form: Collect buyer's information (name, contact).
- Confirmation/Return: Handle post-checkout confirmation automatically.
Hard rules (do not violate)
- Book only via
createBooking()andcheckoutBooking(). - Never hand-build any URLs; do not mock services or slots.
- Verify
WIX_CLIENT_IDis set before use.
Point the user to their dashboard
Provide deep links for users to manage their bookings:
- Booking Services: Booking Services Dashboard
- Staff: Staff Management Dashboard
Verification checklist (before declaring done)
- Check
WIX_CLIENT_IDbinding. - Verify visitor tokens.
- Validate service rendering.
- Validate slot availability.
- Check participant limits and require validation before booking.
- Ensure booking confirmations are handled appropriately.