All skills
wix avatar

/wix-headless

@8f7fa5d official
by Wix.comwix/skills33 stars
33

Connect Wix business services (Stores, Bookings, CMS, Blog, Events, Forms, and more) to a Wix Headless frontend — infer the needed capabilities, install the apps, seed backend content, and produce an SDK-integration guide. For managed (Wix-hosted) projects it can also build the frontend: scaffold a new site (create) or wire an existing/brought-in design (connect), then build and release. Works across managed, self-managed, and stripe project types. Triggers: set up a Wix Headless backend, add Wix business features to my app, build or host a Wix site, connect/implement this design with Wix.

Use this Skill: https://skilld.dev/gh/wix/skills/wix-headless

This session only. Nothing lands on disk.

referencesinline-recipessetup-restaurant-experiences.md

≈1.9k tokens on demand. Your agent reads this file only when SKILL.md points to it.

RECIPE: Business Recipe – Experiences Setup for Wix Table Reservations (Experiences API)

Standard call shape (every curl below). <AUTH> = Authorization: Bearer <TOKEN> and wix-site-id: <SITE_ID>. Body-bearing requests also need Content-Type: application/json.

When to use experiences (and when NOT to)

An experience is a reservation that is itself a curated dining occasion at the restaurant — it books seats at the restaurant's own reservation location but overrides the location's defaults with its own name, description, per-guest payment policy, party-size, schedule, and booking form. Reach for it when the brief names a chef's table, cheese pairing, or tasting-menu evening.

  • Experience vs plain reservation: a plain reservation just books a table; an experience books a named, scheduled, often paid occasion. Same booking mechanism, different intent.
  • Experience vs bookings: the separate bookings vertical is for a service/appointment/class with a provider (spa, tutor, studio). If a restaurant hosts and seats the occasion, it's an experience — not a booking. (See CAPABILITIES.md — "Experiences vs bookings".)

Prerequisites

  • The Table Reservations app is installed (SETUP.md §2). Experiences are a feature of that app — there is no separate app to install.
  • A reservation location exists — the install auto-provisions the default one (setup-restaurant-reservations.md STEP 1). Discover it and take its id; every experience is created against that reservationLocationId. No menu dependency.

The docs are the source of truth for the payload — read them, don't guess

Read these .md twins directly (first priority; append .md to the article URL). This recipe deliberately does not re-inline the full schema — it changes, and the docs carry the complete, current field tree:

Endpoint: POST https://www.wixapis.com/table-reservations/experiences/v1/experiences.

The flow

  1. Discover the reservation location (setup-restaurant-reservations.md STEP 1) → keep reservationLocationId.
  2. Create one experience per named occasion. Build the body from the request (occasion name, per-guest price, party size, days/times, duration) per the Create Experience doc. Keep each returned experience.id. Set configuration.visible: true so it shows on the live site.
  3. Per the "simple seeds" default, create only the occasions the brief names (typically 1–3); don't invent a full calendar.

Minimal shape (the doc has the complete tree — this is only the skeleton to orient against):

{ "experience": {
  "reservationLocationId": "<reservationLocationId>",
  "configuration": {
    "displayInfo": { "name": "…", "shortDescription": "…" },
    "paymentPolicy": { "paymentPolicyType": "PER_GUEST", "perGuestOptions": { "price": "55.00" } },
    "onlineReservations": {
      "partySize": { "min": 2, "max": 8 },
      "minimumReservationNotice": { "number": 24, "unit": "HOURS" },
      "maximumReservationNotice": { "number": 60, "unit": "DAYS" },
      "approval": { "mode": "AUTOMATIC" },
      "maxGuests": { "number": 16 },
      "businessSchedule": { "durationInMinutes": 90, "entries": [
        { "recurrence": "WEEKLY", "weeklyOptions": { "startDaysAndTimes": [ { "day": "FRIDAY", "time": "18:30" } ] } }
      ] }
    },
    "visible": true
  }
} }

Earned gotchas (what the docs won't tell you — verified against the live API)

  • ⚠️ Notice fields are FLAT under onlineReservations, not wrapped. Send onlineReservations.minimumReservationNotice and .maximumReservationNotice directly. The Create-Experience doc example nests them inside a noticePeriod object — that wrapper is stale; the required-parameters list (same page) shows them flat, and the flat form is what the API accepts. Follow the parameter tree, not the example blob.
  • Required at create (creation 400s without them): reservationLocationId; configuration.displayInfo.name; configuration.paymentPolicy.paymentPolicyType; configuration.onlineReservations.partySize.min/max, .approval.mode, .minimumReservationNotice.{number,unit}, .maximumReservationNotice.{number,unit}, .maxGuests.number. (Confirm against the doc — the list evolves.)
  • paymentPolicyType: PER_GUEST or FREE. PER_GUEST needs perGuestOptions.price (decimal string, e.g. "55.00"; currency is the site's). FREE needs no price. Creating a PER_GUEST experience succeeds on a free site, but a guest completing a paid experience booking needs the same premium + payment provider that any paid reservation does (below).
  • businessSchedule.entries[] carries the recurrence: WEEKLY with weeklyOptions.startDaysAndTimes[{ day, time }] (day is MONDAY…SUNDAY, time is "HH:mm"), or ONE_TIME with oneTimeOptions. durationInMinutes sits on businessSchedule, not per entry.
  • ⚠️ Booking an experience is PREMIUM-GATED, exactly like turning on online reservations (setup-restaurant-reservations.md STEP 3 → 428 PREMIUM_ONLY on a free site). Creating the experience works on a free site; booking it at runtime needs the site to be premium with online reservations enabled. Record the precondition in the handoff; don't fail the seed over it.
  • Cover image (opt-in): configuration.displayInfo.coverImage takes a Wix Media image ({ id, url, … }) — attach it in the imagery pass (IMAGE_GENERATION.md) only when imagery is on; otherwise omit and the frontend renders a themed block.
  • ⚠️ Heads-up for the booking UI (not a seed step): the experiences sample-flow doc (linked above) tells the frontend to call getScheduledTimeSlots with the experience GUID — that parameter doesn't exist (neither the SDK nor REST scopes slots to an experience), so it silently returns the location's slots. The frontend must instead project bookable times from the experience's own businessSchedule. Full detail: how-to-code-restaurant-reservations.md (Gotcha C).

Keep

Nothing crosses into the handoff — experiences are read live on the frontend (queryExperiences). Track the created experienceId(s) only transiently (to confirm success / attach cover images). Frontend booking contract: how-to-code-restaurant-reservations.md (Experiences section).

Source: SKILL.md on GitHub

1 warning1d3 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    The wix-headless skill is a robust tool for integrating Wix services into headless frontends. It incorporates secure practices for credential management, ensuring tokens remain outside the AI context. While the skill performs remote code execution and has data ingestion surfaces, these actions are carried out through official vendor channels and structured workflows.

  • Socket1d

    1 alert: gptAnomaly

  • Snyk1d

    Risk: LOW · No issues

Signed by skilld at 8f7fa5d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 days ago
What it can do
Runs commands Reads files Edits files
All 16 allowed tools
Bash(curl *)Bash(npx @wix/cli@latest *)Bash(npx @wix/cli *)Bash(npm create @wix/new@latest *)Bash(npm install *)Bash(npm run *)Bash(node *)Bash(cd *)Bash(ls *)Bash(mkdir *)Bash(cp *)Bash(mv *)Bash(uuidgen)ReadWriteEdit
  • wix
  • headless
  • ecommerce
  • astro
  • vite
  • jsx
  • hosting
  • cms
  • bookings

README badge

README badge for wix/skills/wix-headless

Scaffolds a new Wix Headless site from scratch or connects an existing HTML/JSX/Vite project to Wix Headless for hosting and business features (ecommerce, bookings, forms, CMS). Handles discovery, design, feature wiring via the Wix SDK, and deployment; routes on operation type (create vs. connect) and frontend framework (Astro by default, or your own build).

Generated from the current SKILL.md.

Does this skill create a new site or connect an existing one?
Both. Path A creates a new site from scratch based on your description (e.g. 'build me an online store'). Path B connects an existing project (HTML/JSX/Vite app, Claude Design output, etc.) to Wix Headless for hosting and feature wiring.
What happens when I connect an existing project to Wix Headless?
The skill analyzes your project, installs the necessary Wix Business Solutions apps, and wires the Wix SDK directly into your existing source files so each installed app powers its corresponding feature.
What frameworks does this skill support?
For new sites, it defaults to Astro but supports any framework you explicitly name (React, Vue, Svelte, Vite, etc.). For existing projects, it works with HTML, JSX, TSX, Vue, and other web frontends.
Does this skill handle ecommerce, bookings, and content sites?
Yes. It routes to different vertical packs depending on your needs: stores and ecommerce, bookings and appointments, CMS and blogs, forms, and gift cards. All verticals include CMS by default.
How does the skill authenticate with Wix?
It uses the Wix CLI (`npx @wix/cli@latest token`) to generate bearer tokens for API calls. The login flow is safe for non-interactive agents and includes a recovery ladder if needed.

Generated from the current SKILL.md. These answers refresh after source changes.