Skip to content

bookings: document booking gotchas on a minimally-provisioned site#385

Draft
omrimn wants to merge 1 commit into
wix:mainfrom
omrimn:bookings-bare-site-gotchas
Draft

bookings: document booking gotchas on a minimally-provisioned site#385
omrimn wants to merge 1 commit into
wix:mainfrom
omrimn:bookings-bare-site-gotchas

Conversation

@omrimn

@omrimn omrimn commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What

Three additive notes to the Bookings vertical docs (references/bookings/INSTRUCTIONS.md + SERVICES_DATA.md), all hit and verified live while wiring Wix Bookings into a headless project on a site where Bookings had just been installed via the apps-installer (no dashboard/CLI business setup):

  1. createBooking → "Resource settings conflict for resource type …" (or No available slot) even though listAvailabilityTimeSlots returned bookable slots. The current doc says "omit resource — Wix auto-assigns." That shortcut fails here because the default staff isn't bound to a location. Fix: pass resource._id (the staff/Business-Owner resourceId) and location: { _id: <slot.location._id>, locationType: "OWNER_BUSINESS" } explicitly.

  2. Root cause — no business location. A bare apps-installer install leaves locations/v1/locations/query returning [], and the APPOINTMENT service gets the placeholder location id 123e4567-…, which can't resolve at booking time. Added a failure-mode row: create a default business location first via POST /locations/v1/locations (timeZone is required), then book against OWNER_BUSINESS.

  3. Free service (NO_FEE) rejects payment.options.online: true ("applicable only to FIXED or VARIED"). Use inPerson: true instead. Added to the seed failure-modes table next to the existing payment.options row.

Scope / framing

These are framed as edge-case notes for the apps-installer-on-a-bare-site path. Sites set up through the Bookings dashboard or the CLI already have a business location and a location-bound default staff, so the existing "omit resource" guidance still holds for them — these notes just cover the case where it doesn't.

Provenance

Each was reproduced against a live site while building a headless Bookings integration end-to-end (createBooking → confirmBooking → booking visible in the dashboard). Docs-only change — no code paths touched.

When Wix Bookings is installed via the apps-installer on a bare site (no
dashboard/CLI business setup), three things bite that the current docs don't
cover — all verified live:

- createBooking fails with "Resource settings conflict for resource type …"
  (or "No available slot") even though listAvailabilityTimeSlots returned
  bookable slots, because the default staff isn't bound to a location. The
  "omit resource, Wix auto-assigns" shortcut doesn't apply here; pass
  resource._id AND location { _id, locationType: "OWNER_BUSINESS" } explicitly.
- The root cause is that the site has no business location (locations/v1 query
  returns []), so the APPOINTMENT service's placeholder location can't resolve.
  Create a default business location first (timeZone is required).
- A free service (payment.rateType NO_FEE) rejects payment.options.online:true
  ("applicable only to FIXED or VARIED") — use inPerson:true instead.

Framed as edge-case notes for the apps-installer-on-a-bare-site path; sites set
up via the dashboard/CLI already have a location and aren't affected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant