@wix/agent-skills 1.31.1 → 1.31.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/wix-app/references/STORES_VERSIONING.md +1 -1
- package/skills/wix-headless-kit/SKILL.md +16 -7
- package/skills/wix-headless-kit/guides/api-run.md +81 -51
- package/skills/wix-headless-kit/guides/existing-site.md +6 -0
- package/skills/wix-headless-kit/install/AGENTS.md +3 -2
- package/skills/wix-headless-kit/install/attach.mjs +32 -27
- package/skills/wix-headless-kit/install/background.mjs +32 -0
- package/skills/wix-headless-kit/install/bootstrap.mjs +28 -11
- package/skills/wix-headless-kit/install/check.mjs +2 -2
- package/skills/wix-headless-kit/install/context.mjs +49 -5
- package/skills/wix-headless-kit/install/deploy.mjs +33 -8
- package/skills/wix-headless-kit/install/env-ignore.mjs +16 -0
- package/skills/wix-headless-kit/install/install.mjs +95 -0
- package/skills/wix-headless-kit/install/pins.json +1 -1
- package/skills/wix-headless-kit/install/proc.mjs +46 -0
- package/skills/wix-headless-kit/install/setup.mjs +16 -25
- package/skills/wix-headless-kit/install/templates.mjs +2 -2
- package/skills/wix-headless-templates/blog/app/components/blog/RichContent.tsx +3 -2
- package/skills/wix-headless-templates/blog/project/package-lock.json +1287 -1299
- package/skills/wix-headless-templates/blog/project/package.json +1 -1
- package/skills/wix-headless-templates/blog/project/src/components/blog/RichContent.tsx +3 -2
- package/skills/wix-headless-templates/blog/rest/authors.ts +5 -5
- package/skills/wix-headless-templates/blog/rest/comments.ts +4 -4
- package/skills/wix-headless-templates/blog/rest/post-likes.ts +3 -3
- package/skills/wix-headless-templates/blog/rest/posts.ts +4 -4
- package/skills/wix-headless-templates/blog/rest/taxonomy.ts +5 -5
- package/skills/wix-headless-templates/blog/seed/seed-blog.mjs +2 -1
- package/skills/wix-headless-templates/bookings/rest/booking.ts +4 -4
- package/skills/wix-headless-templates/bookings/rest/services.ts +4 -4
- package/skills/wix-headless-templates/bookings/seed/seed-bookings.mjs +2 -1
- package/skills/wix-headless-templates/cms/rest/collections.ts +3 -3
- package/skills/wix-headless-templates/cms/rest/items.ts +4 -4
- package/skills/wix-headless-templates/cms/seed/seed-cms.mjs +2 -1
- package/skills/wix-headless-templates/donations/rest/campaigns.ts +4 -4
- package/skills/wix-headless-templates/donations/rest/donate.ts +3 -3
- package/skills/wix-headless-templates/donations/seed/seed-donations.mjs +2 -1
- package/skills/wix-headless-templates/events/rest/events.ts +4 -4
- package/skills/wix-headless-templates/events/rest/orders.ts +4 -4
- package/skills/wix-headless-templates/events/rest/registration.ts +4 -4
- package/skills/wix-headless-templates/events/seed/seed-events.mjs +2 -1
- package/skills/wix-headless-templates/faq/rest/faq.ts +4 -4
- package/skills/wix-headless-templates/faq/seed/seed-faq.mjs +2 -1
- package/skills/wix-headless-templates/forms/rest/forms.ts +4 -4
- package/skills/wix-headless-templates/forms/rest/submissions.ts +4 -4
- package/skills/wix-headless-templates/forms/seed/seed-forms.mjs +2 -1
- package/skills/wix-headless-templates/members/rest/auth.ts +3 -3
- package/skills/wix-headless-templates/members/rest/members.ts +4 -4
- package/skills/wix-headless-templates/members/seed/seed-members.mjs +2 -1
- package/skills/wix-headless-templates/portfolio/rest/portfolio.ts +4 -4
- package/skills/wix-headless-templates/portfolio/seed/seed-portfolio.mjs +2 -1
- package/skills/wix-headless-templates/pricing-plans/rest/plan-access.ts +3 -3
- package/skills/wix-headless-templates/pricing-plans/rest/plans.ts +4 -4
- package/skills/wix-headless-templates/pricing-plans/rest/purchase.ts +3 -3
- package/skills/wix-headless-templates/pricing-plans/seed/seed-pricing-plans.mjs +2 -1
- package/skills/wix-headless-templates/rentals/rest/rentals.ts +4 -4
- package/skills/wix-headless-templates/rentals/seed/seed-rentals.mjs +2 -1
- package/skills/wix-headless-templates/restaurants/rest/menu.ts +4 -4
- package/skills/wix-headless-templates/restaurants/rest/ordering.ts +5 -5
- package/skills/wix-headless-templates/restaurants/rest/reservations.ts +4 -4
- package/skills/wix-headless-templates/restaurants/seed/seed-restaurants.mjs +2 -1
- package/skills/wix-headless-templates/shared/capabilities/site-search/rest/search.ts +4 -4
- package/skills/wix-headless-templates/shared/capabilities/site-search/seed/install.mjs +6 -4
- package/skills/wix-headless-templates/shared/seed/main.mjs +15 -0
- package/skills/wix-headless-templates/shared/seed/wix-cli.mjs +43 -11
- package/skills/wix-headless-templates/storefront/INSTRUCTIONS.md +1 -1
- package/skills/wix-headless-templates/storefront/rest/cart.ts +5 -5
- package/skills/wix-headless-templates/storefront/rest/catalog.ts +5 -5
- package/skills/wix-headless-templates/storefront/seed/SEED.md +27 -9
- package/skills/wix-headless-templates/storefront/seed/seed-store.mjs +2 -1
- package/skills/wix-manage/SKILL.md +3 -3
- package/skills/wix-manage/references/app-installation/install-wix-apps.md +5 -1
- package/skills/wix-manage/references/app-installation/list-installed-apps.md +19 -9
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +3 -0
- package/skills/wix-manage/references/bookings/external-calendar-integration.md +3 -0
- package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +3 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +11 -2
- package/skills/wix-manage/references/cms/cms-publishing-flow.md +63 -16
- package/skills/wix-manage/references/forms/update-form.md +3 -0
- package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +3 -0
- package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +3 -0
- package/skills/wix-manage/references/sites/create-headless-site.md +7 -50
- package/skills/wix-manage/references/sites/manage-oauth-apps.md +4 -4
- package/skills/wix-manage/references/sites/read-site-context.md +4 -0
- package/skills/wix-manage/references/sites/upload-static-site.md +67 -31
- package/skills/wix-manage/references/stores/add-store-pages-to-site.md +3 -0
- package/skills/wix-manage/references/stores/change-store-currency.md +3 -0
- package/skills/wix-manage/references/stores/create-product-catalog-v3.md +3 -0
- package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +3 -0
- package/skills/wix-manage/references/stores/update-product-with-options.md +192 -22
|
@@ -5,6 +5,9 @@ description: Sets up booking policies, cancellation rules, and waitlist configur
|
|
|
5
5
|
|
|
6
6
|
# Technical Step-by-Step Instructions: Configuring Wix Bookings Service Policies (Real-World, API-First)
|
|
7
7
|
|
|
8
|
+
> These calls need the Wix Bookings app on the site (`appDefId` `13d21c63-b5ec-5912-8397-c3a5ddb27a97`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
9
|
+
|
|
10
|
+
|
|
8
11
|
## Description
|
|
9
12
|
|
|
10
13
|
Below are the recommended steps to successfully configure booking, cancellation, and waitlist policies for Wix Bookings services. This recipe covers policy inheritance, service-specific overrides, and common policy configurations for different business models.
|
|
@@ -4,6 +4,9 @@ description: OAuth-based integration with Google Calendar, Microsoft Outlook, an
|
|
|
4
4
|
---
|
|
5
5
|
# Technical Step-by-Step Instructions: Connecting External Calendars (Google, Microsoft, Apple) to Wix Bookings (Real-World, API-First)
|
|
6
6
|
|
|
7
|
+
> These calls need the Wix Bookings app on the site (`appDefId` `13d21c63-b5ec-5912-8397-c3a5ddb27a97`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
## Description
|
|
8
11
|
|
|
9
12
|
Below are the recommended steps to successfully connect and sync external calendars (Google Calendar, Microsoft Outlook, Apple Calendar) with Wix Bookings, with real-world troubleshooting and fixes for common API issues. This recipe covers the complete OAuth flow, sync configuration, and verification procedures.
|
|
@@ -4,6 +4,9 @@ description: Creates resource types and individual resources using Resources API
|
|
|
4
4
|
---
|
|
5
5
|
# Technical Step-by-Step Instructions: Creating Multi-Resource Bookings Services (Rooms, Equipment, Staff) - Real-World, API-First
|
|
6
6
|
|
|
7
|
+
> These calls need the Wix Bookings app on the site (`appDefId` `13d21c63-b5ec-5912-8397-c3a5ddb27a97`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
## Description
|
|
8
11
|
|
|
9
12
|
Below are the recommended steps to successfully create Wix Bookings services that require multiple resource types (e.g., Room + Equipment + Instructor). This recipe covers the **gaps** in individual API documentation: resource architecture planning, entity relationship patterns, availability dependencies, and real-world coordination challenges that aren't clear from reading individual API references.
|
|
@@ -4,6 +4,9 @@ description: "Add, query, update, and delete items in CMS collections, one at a
|
|
|
4
4
|
---
|
|
5
5
|
# CMS Data Items CRUD
|
|
6
6
|
|
|
7
|
+
> These calls need the Wix CMS app on the site (`appDefId` `e593b0bd-b783-45b8-97c2-873d42aacaf4`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
> **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
|
|
8
11
|
|
|
9
12
|
This recipe covers Create, Read, Update, Delete (CRUD) operations for Wix CMS data items, plus count, upsert, truncate, aggregate, and reference-field links.
|
|
@@ -175,6 +178,8 @@ curl -X GET \
|
|
|
175
178
|
|
|
176
179
|
**Endpoint**: `PUT https://www.wixapis.com/wix-data/v2/items/{itemId}`
|
|
177
180
|
|
|
181
|
+
> **Warning**: This replaces the entire item — fields not in `dataItem.data` are deleted. To change only some fields, use [Patch Data Item](#patch-data-item-partial-update---single-item).
|
|
182
|
+
|
|
178
183
|
**Request Body**:
|
|
179
184
|
```json
|
|
180
185
|
{
|
|
@@ -233,6 +238,8 @@ Unlike Update, this only modifies the specified fields — all other fields rema
|
|
|
233
238
|
|
|
234
239
|
> There is no update-by-filter endpoint. To update the items matching a filter, query them first (see [Query Data Items](#query-data-items)), then send their ids to bulk update or bulk patch.
|
|
235
240
|
|
|
241
|
+
> **Note**: This replaces the entire item. Include all fields you want to keep, not just the ones you're changing.
|
|
242
|
+
|
|
236
243
|
> **Important**: Use `id` (not `_id`) at the element level. The `data` object should NOT contain `_id`.
|
|
237
244
|
|
|
238
245
|
```json
|
|
@@ -242,14 +249,18 @@ Unlike Update, this only modifies the specified fields — all other fields rema
|
|
|
242
249
|
{
|
|
243
250
|
"id": "item-guid-1",
|
|
244
251
|
"data": {
|
|
252
|
+
"title": "Wireless Headphones Pro",
|
|
245
253
|
"price": 159.99,
|
|
254
|
+
"description": "Premium wireless headphones",
|
|
246
255
|
"inStock": true
|
|
247
256
|
}
|
|
248
257
|
},
|
|
249
258
|
{
|
|
250
259
|
"id": "item-guid-2",
|
|
251
260
|
"data": {
|
|
261
|
+
"title": "Wired Earbuds",
|
|
252
262
|
"price": 89.99,
|
|
263
|
+
"description": "Compact wired earbuds",
|
|
253
264
|
"inStock": false
|
|
254
265
|
}
|
|
255
266
|
}
|
|
@@ -257,8 +268,6 @@ Unlike Update, this only modifies the specified fields — all other fields rema
|
|
|
257
268
|
}
|
|
258
269
|
```
|
|
259
270
|
|
|
260
|
-
> **Note**: This replaces the entire item. Include all fields you want to keep, not just the ones you're changing.
|
|
261
|
-
|
|
262
271
|
## Bulk Patch Items (Partial Update)
|
|
263
272
|
|
|
264
273
|
**Endpoint**: `POST https://www.wixapis.com/wix-data/v2/bulk/items/patch`
|
|
@@ -4,6 +4,9 @@ description: "Interact with CMS collections that gate their items behind a draft
|
|
|
4
4
|
---
|
|
5
5
|
# CMS Draft & Publish Workflow
|
|
6
6
|
|
|
7
|
+
> These calls need the Wix CMS app on the site (`appDefId` `e593b0bd-b783-45b8-97c2-873d42aacaf4`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
> **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
|
|
8
11
|
|
|
9
12
|
Some CMS collections gate their items behind a **draft/publish workflow** instead of writing straight to the live site. Such a collection has the **Draft Items plugin** installed. Each item is in one of three states — **DRAFT**, **PUBLISHED**, or **CHANGED** (a published item with a pending draft edit) — and edits are staged as drafts until explicitly published.
|
|
@@ -59,6 +62,8 @@ curl -X GET \
|
|
|
59
62
|
- **Draft Items plugin present** → the collection gates items behind draft/publish. Its `draftItemsPluginOptions.draftsCollectionId` gives the paired drafts collection to author and edit drafts against.
|
|
60
63
|
- **Draft Items plugin absent** → plain collection; every insert/update goes straight live. No draft surface exists.
|
|
61
64
|
|
|
65
|
+
Once the Draft Items plugin is installed, do not insert, update, patch, remove, or save items directly in the published collection. Read `draftItemsPluginOptions.draftsCollectionId` from the plugin and write new items and pending edits to that drafts collection. Then call **Publish Data Item Draft** (`POST /wix-data/v2/items/publish-draft`) to publish an item to the published collection. This lifecycle operation takes the published collection ID; it is the supported way to move a draft into the live collection.
|
|
66
|
+
|
|
62
67
|
---
|
|
63
68
|
|
|
64
69
|
## 2. Read items
|
|
@@ -90,7 +95,7 @@ Reads target a specific surface — there is no merged view:
|
|
|
90
95
|
|
|
91
96
|
### Author a brand-new draft
|
|
92
97
|
|
|
93
|
-
Insert into the **drafts** collection. The item starts as **DRAFT**.
|
|
98
|
+
Insert into the **drafts** collection. Do not insert into the published collection while the Draft Items plugin is installed. The item starts as **DRAFT** and becomes live only after you call **Publish Data Item Draft**.
|
|
94
99
|
|
|
95
100
|
**Endpoint**: `POST https://www.wixapis.com/wix-data/v2/items`
|
|
96
101
|
|
|
@@ -109,13 +114,30 @@ Update or patch against the **drafts** collection (`articles__drafts`). See [CMS
|
|
|
109
114
|
|
|
110
115
|
### Edit a PUBLISHED item → produces CHANGED
|
|
111
116
|
|
|
112
|
-
|
|
117
|
+
**PUT and PATCH against the published collection fail while the Draft Items plugin is installed.** Create a draft of the published item, then edit that draft in the paired drafts collection. The published version remains live and unchanged until the draft is published.
|
|
113
118
|
|
|
114
|
-
|
|
119
|
+
1. Call [Create Data Item Draft](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/create-data-item-draft) with the published collection ID and item ID. It returns `dataItem`, a full draft copy with the same item ID; `dataItem.dataCollectionId` identifies the paired drafts collection. The item is now CHANGED.
|
|
120
|
+
2. Update or patch the returned draft using the drafts collection ID. Use Patch Data Item to preserve fields you did not change; Update Data Item replaces the draft's entire payload.
|
|
121
|
+
3. Call Publish Data Item Draft with the published collection ID to make the edits live.
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Create a draft of a PUBLISHED item; the lifecycle call takes the published collection ID.
|
|
125
|
+
curl -X POST 'https://www.wixapis.com/wix-data/v2/items/create-draft' \
|
|
126
|
+
-H 'Content-Type: application/json' \
|
|
127
|
+
-H 'Authorization: <AUTH>' \
|
|
128
|
+
-d '{"dataCollectionId":"articles","dataItemId":"<id>"}'
|
|
129
|
+
# Patch the resulting draft; use its returned dataCollectionId, not the published collection ID.
|
|
130
|
+
curl -X PATCH 'https://www.wixapis.com/wix-data/v2/items/<id>' \
|
|
131
|
+
-H 'Content-Type: application/json' \
|
|
132
|
+
-H 'Authorization: <AUTH>' \
|
|
133
|
+
-d '{"dataCollectionId":"<draftsCollectionId>","patch":{"dataItemId":"<id>","fieldModifications":[{"fieldPath":"body","action":"SET_FIELD","setFieldOptions":{"value":"Revised article body"}}]}}'
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
For a CHANGED item, edit its existing draft directly. Create Data Item Draft returns `ALREADY_EXISTS` if a draft already exists; query the paired drafts collection when the item's state is unknown.
|
|
115
137
|
|
|
116
138
|
### Publish a pending draft (DRAFT/CHANGED → PUBLISHED)
|
|
117
139
|
|
|
118
|
-
|
|
140
|
+
Call **Publish Data Item Draft** to publish the pending draft. It replaces the published item's data with the draft's content; the draft is then deleted. Pass the **published** collection ID. This lifecycle operation is the allowed way to write the draft's content to the published collection.
|
|
119
141
|
|
|
120
142
|
**Endpoint**: `POST https://www.wixapis.com/wix-data/v2/items/publish-draft`
|
|
121
143
|
|
|
@@ -161,12 +183,12 @@ curl -X POST \
|
|
|
161
183
|
}'
|
|
162
184
|
```
|
|
163
185
|
|
|
164
|
-
`copyToDraft` controls the
|
|
186
|
+
`copyToDraft` controls whether the published data is copied into the drafts collection:
|
|
165
187
|
|
|
166
188
|
| `copyToDraft` | Behavior | Use for |
|
|
167
189
|
|---------------|----------|---------|
|
|
168
|
-
| `true` (default) | Removes the live copy
|
|
169
|
-
| `false` | Removes the live copy **without** creating a draft. No `dataItem` returned. |
|
|
190
|
+
| `true` (default) | Removes the live copy and copies its data into a draft. Any existing pending draft for that ID is **overwritten**, discarding its unpublished edits. | Take the item offline and retain the previously-published content as a draft. |
|
|
191
|
+
| `false` | Removes the live copy **without** creating a draft. Any existing pending draft is **preserved unchanged**. No `dataItem` is returned. | Remove the live version while leaving any pending draft intact. |
|
|
170
192
|
|
|
171
193
|
- Response (`copyToDraft: true`) carries the **new draft**, not the removed live item.
|
|
172
194
|
- Returns `NOT_FOUND` if no published item exists with that id.
|
|
@@ -181,17 +203,38 @@ curl -X DELETE \
|
|
|
181
203
|
-H 'Authorization: <AUTH>'
|
|
182
204
|
```
|
|
183
205
|
|
|
184
|
-
### Delete
|
|
206
|
+
### Delete a published item permanently
|
|
185
207
|
|
|
186
|
-
|
|
208
|
+
> Permanent deletion is irreversible. Confirm with the user before calling Unpublish Data Item with `copyToDraft: false` or deleting a draft, unless the request already names the items to remove.
|
|
209
|
+
|
|
210
|
+
To permanently delete a published item, call **Unpublish Data Item** with `copyToDraft: false` to remove it from the published collection. This preserves any existing pending draft, so query the paired drafts collection for that item ID next. Delete the draft only if the query returns it; when no draft exists, skip the DELETE call. For a CHANGED item, this deletes its preserved pending draft. For a PUBLISHED item with no pending draft, unpublishing completes the deletion.
|
|
187
211
|
|
|
188
212
|
```bash
|
|
189
|
-
#
|
|
190
|
-
|
|
191
|
-
#
|
|
192
|
-
curl -X
|
|
213
|
+
# Stop on HTTP failures, malformed query responses, or failed deletes.
|
|
214
|
+
set -euo pipefail
|
|
215
|
+
# remove the published version without creating a draft
|
|
216
|
+
curl --fail --silent --show-error -X POST 'https://www.wixapis.com/wix-data/v2/items/unpublish' \
|
|
217
|
+
-H 'Content-Type: application/json' \
|
|
218
|
+
-H 'Authorization: <AUTH>' \
|
|
219
|
+
-d '{"dataCollectionId":"articles","dataItemId":"<id>","copyToDraft":false}'
|
|
220
|
+
# Query the paired drafts collection for this ID. Use the draftsCollectionId read from the plugin.
|
|
221
|
+
ITEM_ID='<id>'
|
|
222
|
+
DRAFTS_COLLECTION_ID='<draftsCollectionId>'
|
|
223
|
+
drafts=$(curl --fail --silent --show-error -X POST 'https://www.wixapis.com/wix-data/v2/items/query' \
|
|
224
|
+
-H 'Content-Type: application/json' \
|
|
225
|
+
-H 'Authorization: <AUTH>' \
|
|
226
|
+
-d "{\"dataCollectionId\":\"$DRAFTS_COLLECTION_ID\",\"consistentRead\":true,\"query\":{\"filter\":{\"_id\":\"$ITEM_ID\"},\"paging\":{\"limit\":1}}}")
|
|
227
|
+
# Require a valid dataItems array; a failed query must not be treated as an empty result.
|
|
228
|
+
draft_count=$(printf '%s' "$drafts" | jq -er '.dataItems | if type == "array" then length else error("Expected dataItems array") end')
|
|
229
|
+
# Delete only when the query found the draft; an empty dataItems array means there is nothing to delete.
|
|
230
|
+
if [ "$draft_count" -gt 0 ]; then
|
|
231
|
+
curl --fail --silent --show-error -X DELETE "https://www.wixapis.com/wix-data/v2/items/$ITEM_ID?dataCollectionId=$DRAFTS_COLLECTION_ID" \
|
|
232
|
+
-H 'Authorization: <AUTH>'
|
|
233
|
+
fi
|
|
193
234
|
```
|
|
194
235
|
|
|
236
|
+
If an item was never published and exists only in the drafts collection (DRAFT), delete it directly from the paired drafts collection. Do not call Unpublish Data Item; it returns `NOT_FOUND` when no published item exists.
|
|
237
|
+
|
|
195
238
|
---
|
|
196
239
|
|
|
197
240
|
## 4. Enable / disable the workflow on a collection
|
|
@@ -206,6 +249,7 @@ curl -X POST 'https://www.wixapis.com/wix-data/v2/collections/add-draft-items-pl
|
|
|
206
249
|
-H 'Authorization: <AUTH>' \
|
|
207
250
|
-d '{
|
|
208
251
|
"dataCollectionId": "articles",
|
|
252
|
+
"draftItemsOptions": {},
|
|
209
253
|
"publishPluginConflictAction": "FAIL_WHEN_PUBLISH_INSTALLED"
|
|
210
254
|
}'
|
|
211
255
|
```
|
|
@@ -258,16 +302,19 @@ At the REST level, every read/author/publish/unpublish call here goes through th
|
|
|
258
302
|
| PUBLISHED | Edit into a pending draft (→ CHANGED) | Create the draft (`createDataItemDraft`), then edit it on the drafts collection | Write Data Items |
|
|
259
303
|
| — | Create new draft (→ DRAFT) | `POST https://www.wixapis.com/wix-data/v2/items` on the drafts collection | Write Data Items |
|
|
260
304
|
| DRAFT / CHANGED | Publish (→ PUBLISHED) | `POST https://www.wixapis.com/wix-data/v2/items/publish-draft` (published id) | Write Data Items |
|
|
261
|
-
| PUBLISHED / CHANGED |
|
|
262
|
-
| PUBLISHED / CHANGED |
|
|
305
|
+
| PUBLISHED / CHANGED | Remove from live collection, keep as draft (→ DRAFT) | **Unpublish Data Item** — `POST https://www.wixapis.com/wix-data/v2/items/unpublish`, `copyToDraft:true` | Write Data Items |
|
|
306
|
+
| PUBLISHED / CHANGED | Remove live copy without creating a draft; preserve any existing draft | **Unpublish Data Item** — `POST https://www.wixapis.com/wix-data/v2/items/unpublish`, `copyToDraft:false` | Write Data Items |
|
|
263
307
|
| CHANGED | Revert to live version (discard edit) | `DELETE https://www.wixapis.com/wix-data/v2/items/{id}?dataCollectionId=<drafts id>` | Write Data Items |
|
|
264
|
-
|
|
|
308
|
+
| PUBLISHED / CHANGED | Permanently delete (confirm first unless the request names the item) | `POST https://www.wixapis.com/wix-data/v2/items/unpublish` with `copyToDraft:false` (published id), then query and delete any remaining draft | Write Data Items |
|
|
309
|
+
| DRAFT (never published) | Permanently delete (confirm first unless the request names the item) | `DELETE https://www.wixapis.com/wix-data/v2/items/{id}?dataCollectionId=<drafts id>` | Write Data Items |
|
|
265
310
|
| plain, no plugin | Enable workflow | `POST https://www.wixapis.com/wix-data/v2/collections/add-draft-items-plugin` | Manage Data Collections |
|
|
266
311
|
|
|
267
312
|
---
|
|
268
313
|
|
|
269
314
|
## Agent gotchas
|
|
270
315
|
|
|
316
|
+
- **Never write item data directly to the published collection while Draft Items is installed.** Create and edit items in the paired drafts collection, then call **Publish Data Item Draft** to publish. Lifecycle calls such as publish still take the published collection ID.
|
|
317
|
+
- **Choose the permanent-delete path from the item's state, and confirm first.** Permanent deletion is irreversible: confirm with the user before Unpublish Data Item with `copyToDraft: false` or a draft DELETE unless the request already names the items to remove. For PUBLISHED or CHANGED items, call Unpublish Data Item with the published collection ID and `copyToDraft: false`, then query and delete any remaining draft from the paired drafts collection. For a DRAFT that was never published, delete it directly from the paired drafts collection; Unpublish Data Item would return `NOT_FOUND`.
|
|
271
318
|
- **Resolve the drafts collection from the plugin.** Read `draftItemsPluginOptions.draftsCollectionId` off the published collection's Draft Items plugin rather than assuming a `__drafts` suffix.
|
|
272
319
|
- **Status is server-authoritative.** Derive DRAFT/PUBLISHED/CHANGED from the published + drafts surfaces (or the value the API returns). Never compute it locally, and never render an optimistic status before the write confirms (**confirm-then-render**).
|
|
273
320
|
- **Pass the *published* collection id** to `publish-draft` and `unpublish` — not the drafts collection id. Author and edit drafts against the drafts collection id.
|
|
@@ -4,6 +4,9 @@ description: "Changes a Wix form that already exists, with Form Schemas v4 `PATC
|
|
|
4
4
|
---
|
|
5
5
|
# RECIPE: Update a Wix Form
|
|
6
6
|
|
|
7
|
+
> These calls need the Wix Forms app on the site (`appDefId` `225dd912-7dea-4738-8688-4b8c6955ffc2`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
> **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`. Send `wix-site-id: <SITE_ID>` when the token is account-scoped.
|
|
8
11
|
|
|
9
12
|
Change what a form collects — **add a field, relabel one, tighten a rule, reorder, retire one** — on a form that already exists. **Composing the field itself is not here**: [About Form Fields](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/about-form-fields) owns the `identifier` / `inputType` / `componentType` table and the options/enum shapes, and [Create Form](./create-form.md) § Silent breakers apply to an added field exactly as to a created one.
|
|
@@ -4,6 +4,9 @@ description: Creates subscription and one-time payment plans using Plans API. Co
|
|
|
4
4
|
---
|
|
5
5
|
# Technical Step-by-Step Instructions: Creating or Updating a Wix Pricing Plans (Real-World, API-First)
|
|
6
6
|
|
|
7
|
+
> These calls need the Wix Pricing Plans app on the site (`appDefId` `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
## Description
|
|
8
11
|
Below are the recommended steps to successfully create or update a Wix Pricing Plans (or several at once) on Wix and attach a booking session to a pricing plan, with real-world troubleshooting and fixes for common API issues.
|
|
9
12
|
|
|
@@ -4,6 +4,9 @@ description: Configures restaurant menus, sections, and items using Menus API. C
|
|
|
4
4
|
---
|
|
5
5
|
# Wix Restaurants Setup API Reference
|
|
6
6
|
|
|
7
|
+
> These calls need the Wix Restaurants Menus app on the site (`appDefId` `b278a256-2757-4f19-9313-c05c783bec92`; online ordering is Wix Restaurants Orders `9a5d83fd-8570-482e-81ab-cfa88942ee60`, reservations Wix Table Reservations `f9c07de2-5341-40c6-b096-8eb39de391fb`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds one by that id.
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
This recipe covers setting up and configuring Wix Restaurants using the REST API, including menus, items, and ordering configuration.
|
|
8
11
|
|
|
9
12
|
## Prerequisites
|
|
@@ -1,55 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Create Headless Site"
|
|
3
|
-
description: Creates a Wix Headless site
|
|
3
|
+
description: Creates a Wix Headless website: a site in the user's Wix account whose frontend is files uploaded to Wix hosting, with the Wix business backend behind it through APIs. Creating, uploading, updating and connecting a backend are one flow, in Upload a Website or HTML Files.
|
|
4
4
|
---
|
|
5
5
|
# Create Headless Site
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- Wix account with site creation permissions
|
|
14
|
-
- Account-level API access
|
|
15
|
-
|
|
16
|
-
## Provision a Headless Business
|
|
17
|
-
|
|
18
|
-
**Endpoint**: `POST https://www.wixapis.com/headless-business-setup/v1/headless-business/provision`
|
|
19
|
-
|
|
20
|
-
**Request Body**:
|
|
21
|
-
```json
|
|
22
|
-
{
|
|
23
|
-
"origin": "agent-<your-agent-id>",
|
|
24
|
-
"newMetasite": {
|
|
25
|
-
"namingStrategy": { "metaSiteName": "My Headless Business" },
|
|
26
|
-
"seedOptions": [
|
|
27
|
-
{ "businessSolution": "STORES", "clearTemplateContent": true, "seedDemoContent": false }
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
"synchronousSteps": ["SET_METASITE_NAME", "CONFIGURE_HEADLESS_APP"]
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
- `origin` — `agent-` followed by your own identifier: a short, stable, lowercase-hyphenated slug for the coding agent or tool you are (e.g. `claude-code`, `cursor`, `codex-cli`, `windsurf`, `github-copilot`, or your product's name; `unknown-agent` if you can't name yourself). It records which agent created the site
|
|
35
|
-
- `namingStrategy` — exactly one of: `metaSiteName` (exact display name), `llmPromptBasedName: {}` (name derived from the top-level `prompt` field), or `defaultName: {}`
|
|
36
|
-
- `seedOptions` — Wix Business Solution apps to install at creation: `STORES`, `BLOG`, `BOOKINGS`, `EVENTS`, `PORTFOLIO`, `PRICING_PLANS`. Each entry takes `clearTemplateContent` (remove sample content) and `seedDemoContent` (seed demo content). Empty installs none
|
|
37
|
-
- `synchronousSteps` — steps to complete before the call returns: `SET_METASITE_NAME`, `CONFIGURE_HEADLESS_APP`, `SEED_CONTENT`. Omitted steps run asynchronously. Include `CONFIGURE_HEADLESS_APP` when the OAuth client must be usable immediately
|
|
38
|
-
|
|
39
|
-
**Response**:
|
|
40
|
-
```json
|
|
41
|
-
{ "metaSiteId": "<SITE_ID>", "appId": "<OAUTH_CLIENT_ID>" }
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
`appId` is the site's OAuth client ID — do NOT create a separate OAuth app.
|
|
45
|
-
|
|
46
|
-
## Existing Sites
|
|
47
|
-
|
|
48
|
-
To provision headless onto an existing site, pass `"existingMetasite": {}` instead of `newMetasite`. This is a site-level call in the context of that site.
|
|
49
|
-
|
|
50
|
-
## Next Steps
|
|
51
|
-
|
|
52
|
-
After creating the site:
|
|
53
|
-
- Install additional apps using [Install Wix Apps](../app-installation/install-wix-apps.md)
|
|
54
|
-
- Add content (products, services, blog posts, etc.)
|
|
55
|
-
- Use the `appId` as the `client_id` to mint visitor tokens and make buyer-facing API calls — see [Manage OAuth Apps](manage-oauth-apps.md)
|
|
7
|
+
A Wix Headless site is a site in the user's Wix account whose frontend is files
|
|
8
|
+
uploaded to Wix hosting and served at a `*.wix-site-host.com` URL, with the Wix
|
|
9
|
+
business backend (stores, bookings, forms, a CMS) behind it through APIs.
|
|
10
|
+
Creating it, uploading its files, changing it later and connecting a backend are
|
|
11
|
+
one flow: [Upload a Website or HTML Files](upload-static-site.md), online at
|
|
12
|
+
https://dev.wix.com/docs/api-reference/account-level/sites/skills/upload-a-website-or-html-files.md
|
|
@@ -147,8 +147,8 @@ Use the `access_token` as the `Authorization` header on subsequent API calls.
|
|
|
147
147
|
|
|
148
148
|
## API Reference
|
|
149
149
|
|
|
150
|
-
- [OAuth Apps — Create](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/create-
|
|
151
|
-
- [OAuth Apps — Get](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/get-
|
|
152
|
-
- [OAuth Apps — Query](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/query-
|
|
153
|
-
- [OAuth Apps — Update](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/update-
|
|
150
|
+
- [OAuth Apps — Create](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/create-oauth-app)
|
|
151
|
+
- [OAuth Apps — Get](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/get-oauth-app)
|
|
152
|
+
- [OAuth Apps — Query](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/query-oauth-apps)
|
|
153
|
+
- [OAuth Apps — Update](https://dev.wix.com/docs/api-reference/business-management/headless/oauth-apps/update-oauth-app)
|
|
154
154
|
- [Retrieve Tokens — `/oauth2/token` contract, all grant types](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/retrieve-tokens)
|
|
@@ -51,6 +51,10 @@ Response:
|
|
|
51
51
|
- **Wix Blog** (ID: `14bcded7-0066-7c35-14d7-466cb3f09103`)
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
The app list reflects installs after a delay: an app installed a few minutes ago can be missing here
|
|
55
|
+
while its own API already answers. To check an install you just made, read the site's instances with
|
|
56
|
+
[List Installed Apps](../app-installation/list-installed-apps.md), which is immediate.
|
|
57
|
+
|
|
54
58
|
### Without siteId
|
|
55
59
|
|
|
56
60
|
```bash
|
|
@@ -1,17 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Upload a Website or HTML Files"
|
|
3
|
-
description:
|
|
3
|
+
description: Create and update a Wix Headless website by uploading its files — an index.html, a static build, a zip exported from an AI builder or any other tool, or pages you write for the user — as a live site in the user's Wix account. Covers every route: uploading with the user's identity (curl with a Wix CLI token, or the Wix MCP), publishing anonymously with a save link when you don't hold it, and the Wix Headless drop page; then updating the same site and URL, and connecting a Wix backend (stores, bookings, forms) through the headless skill. Use when the user wants to upload, publish, deploy or host HTML/CSS/JS as a new Wix site, their own or written for them, or to change a site published this way. Not for migrating a live store/site from another platform by URL or from CSV exports (use Site Import), not for adding HTML or custom code into an existing Wix site, and not for uploading images or documents to a site's media files.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Upload a Website or HTML Files
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
A website goes live on Wix as a Wix Headless site: its files are uploaded to a
|
|
9
|
+
site in the user's Wix account and served at a `*.wix-site-host.com` URL. The
|
|
10
|
+
files are ones the user has (hand-written HTML, a static build, a zip, a project
|
|
11
|
+
an AI builder exported) or ones you write for them as you upload. Later changes
|
|
12
|
+
upload to [the same site](#change-it-later), and the URL stays.
|
|
13
|
+
|
|
14
|
+
The flow: pick the route that fits where you run, create the site, upload the
|
|
15
|
+
files, and give the user the live URL. Later changes go to the same site, and a
|
|
16
|
+
backend, when the site needs one, comes once it is live.
|
|
17
|
+
|
|
18
|
+
- [What decides the route](#what-decides-the-route): which route fits where you run
|
|
19
|
+
- [Before the calls](#before-the-calls): the user's token, the Wix MCP, the attribution slug
|
|
20
|
+
- [Create the site](#create-the-site): one call, the site in the user's account
|
|
21
|
+
- Upload the files [with curl](#drop-with-curl) or [through the Wix MCP](#drop-through-the-wix-mcp)
|
|
22
|
+
- [Change it later](#change-it-later): edits on the same site and URL
|
|
23
|
+
- [Connect a backend](#connect-a-backend): stores, bookings, forms and more through the headless skill
|
|
24
|
+
- [Images](#images): how images reach the site
|
|
25
|
+
- [Publish anonymously](#publish-anonymously): no login, a temporary site the user claims or saves
|
|
26
|
+
- [The drop page](#the-drop-page): the user uploads the files when no route reaches Wix
|
|
27
|
+
- [Limits and failures](#limits-and-failures), [Send feedback to Wix](#send-feedback-to-wix), [Route the request correctly](#route-the-request-correctly)
|
|
12
28
|
|
|
13
29
|
## What decides the route
|
|
14
30
|
|
|
31
|
+
The user's request to publish is the consent to create the site and upload: do
|
|
32
|
+
not ask again before either. Ask only where this recipe says to (connecting a
|
|
33
|
+
backend, replacing a frontend that is serving).
|
|
34
|
+
|
|
15
35
|
Three things about where you run decide it:
|
|
16
36
|
|
|
17
37
|
- **Does your shell reach Wix?** `curl -sI https://www.wixapis.com` answers with an
|
|
@@ -58,8 +78,9 @@ page whole. A web fetch is the fallback.
|
|
|
58
78
|
|
|
59
79
|
## Create the site
|
|
60
80
|
|
|
61
|
-
|
|
62
|
-
Solutions. Name it after the page's `<title
|
|
81
|
+
One account-level call creates the headless site, with no Wix Business
|
|
82
|
+
Solutions. Name it after the page's `<title>`, at most 40 characters (a longer
|
|
83
|
+
name is rejected), and keep `"origin": "drop"`.
|
|
63
84
|
|
|
64
85
|
```bash
|
|
65
86
|
curl -sS -X POST "https://www.wixapis.com/headless-business-setup/v1/headless-business/provision" \
|
|
@@ -172,11 +193,15 @@ On the same `metaSiteId`, never a new site. Each drop replaces every file, and
|
|
|
172
193
|
|
|
173
194
|
- **With a shell that reaches Wix**, edit the files and drop the full set with
|
|
174
195
|
`curl`.
|
|
175
|
-
- **Through the MCP**,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
196
|
+
- **Through the MCP**, by the kind of change:
|
|
197
|
+
- **An edit to files the site serves** (a price, a line, a link): one
|
|
198
|
+
`ExecuteWixAPI` script downloads what it serves, edits in code, and drops the
|
|
199
|
+
full set back. Only the edit is written; images travel back as they are.
|
|
200
|
+
- **New or rewritten files**: when your files travel as files, zip the whole
|
|
201
|
+
site, images included, and send it through the upload tool. When they don't,
|
|
202
|
+
the script carries them in its `files` param and adds them to the download
|
|
203
|
+
before the drop.
|
|
204
|
+
- **A site rewritten wholesale**: a full text bundle through the upload tool.
|
|
180
205
|
|
|
181
206
|
For a site from an earlier conversation, find its `metaSiteId` with
|
|
182
207
|
[Query Sites](#claim-it-into-the-users-account), matching the name or `viewUrl`.
|
|
@@ -213,7 +238,7 @@ the same site, appId and URL.
|
|
|
213
238
|
**A mock that shows a business solution: publish it, then ask before connecting.**
|
|
214
239
|
Any control on the page that promises what static files can't deliver —
|
|
215
240
|
something to buy, book, order, join, submit or pay — is a Wix Business Solution
|
|
216
|
-
the page pretends to have. First get the site live from
|
|
241
|
+
the page pretends to have. First get the site live from the pages as they are.
|
|
217
242
|
Then, with the live URL, name each such control, the solution that would make it
|
|
218
243
|
work, and what connecting it involves: what gets created from the page's own
|
|
219
244
|
content (the products, services or form). Ask whether to go ahead, and connect only after the user says
|
|
@@ -245,15 +270,22 @@ Its commands run:
|
|
|
245
270
|
|
|
246
271
|
## Images
|
|
247
272
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
An SVG is text and goes in like a page. Every other image reaches Wix one of four
|
|
251
|
-
ways:
|
|
273
|
+
An SVG is text and goes in like a page. Every other image is bytes, and bytes
|
|
274
|
+
reach Wix one of these ways, in this order of preference:
|
|
252
275
|
|
|
253
276
|
1. **With a shell that reaches Wix**, in the `curl` drop, from disk.
|
|
254
277
|
2. **When your files travel as files**, inside the zip you pass the upload tool.
|
|
255
|
-
3. **A public URL**: the page keeps the absolute URL
|
|
256
|
-
|
|
278
|
+
3. **A public URL**: the page keeps the absolute URL, or the Wix MCP's
|
|
279
|
+
`UploadImageToWixSite` imports it into the site's media (`imageUrls`) and the
|
|
280
|
+
page points at the returned `static.wixstatic.com` address. A share page
|
|
281
|
+
(Dropbox, Drive) is not a file URL; a direct link is.
|
|
282
|
+
4. **`imageBase64` on `UploadImageToWixSite`**, when you can read the file and
|
|
283
|
+
encode it yourself (a shell, a file API): one image per call, the raw base64
|
|
284
|
+
with its `mimeType`. Encoding it from a file works; typing it out does not: a
|
|
285
|
+
model cannot reproduce a long base64 string faithfully, so a string that was
|
|
286
|
+
not produced by a tool comes back as an `atob` error or a corrupt image.
|
|
287
|
+
Never put image bytes in the `files` bundle beyond a few KB (an icon).
|
|
288
|
+
5. **The user uploads it** to the site's Media Manager. This is the way for images
|
|
257
289
|
that exist only as files you can't send. Publish the pages first, then name
|
|
258
290
|
the missing files, give the user
|
|
259
291
|
`https://manage.wix.com/dashboard/{metaSiteId}/media-manager`, and ask them to
|
|
@@ -261,9 +293,12 @@ ways:
|
|
|
261
293
|
match each to the page's reference by `displayName`, point the reference at the
|
|
262
294
|
file's `static.wixstatic.com` URL, and drop again.
|
|
263
295
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
296
|
+
`attachments` on a Wix MCP tool carries a file only from ChatGPT or Codex, which
|
|
297
|
+
swap it for a download URL before the call reaches Wix. From any other client it
|
|
298
|
+
arrives as the path you wrote, and Wix cannot read a path on your machine; the
|
|
299
|
+
answer does not change on a retry. An image you could not send is named in the
|
|
300
|
+
closing message. Never stand in drawings or placeholders of your own for the
|
|
301
|
+
user's images, and never shrink or re-encode them.
|
|
267
302
|
|
|
268
303
|
## Publish anonymously
|
|
269
304
|
|
|
@@ -309,14 +344,15 @@ curl -sS -X POST \
|
|
|
309
344
|
|
|
310
345
|
Claim last: it ends the anonymous record, and later changes are
|
|
311
346
|
[drops](#change-it-later). **The URL changes on claim.** Read the new `viewUrl`
|
|
312
|
-
with Query Sites in the `HEADLESS` namespace
|
|
313
|
-
sites
|
|
314
|
-
`metadata.cursors.next`:
|
|
347
|
+
with Query Sites in the `HEADLESS` namespace (the default query omits headless
|
|
348
|
+
sites). An `id` filter takes the `$in` form; a bare `"id": "<uuid>"` is a `400`:
|
|
315
349
|
|
|
316
350
|
```bash
|
|
317
351
|
curl -sS -X POST "https://www.wixapis.com/site-list/v2/sites/query" \
|
|
318
352
|
-H "Authorization: Bearer $ACCESS_TOKEN" -H 'Content-Type: application/json' \
|
|
319
|
-
-d '{"query":{"filter":{"namespace":"HEADLESS"},"cursorPaging":{"limit":
|
|
353
|
+
-d '{"query":{"filter":{"namespace":"HEADLESS","id":{"$in":["'$META_SITE_ID'"]}},"cursorPaging":{"limit":10}}}'
|
|
354
|
+
# sites[0].viewUrl is the live address; the same query without the id filter lists every
|
|
355
|
+
# headless site with its viewUrl, which is how a site is found from a URL the user gives
|
|
320
356
|
```
|
|
321
357
|
|
|
322
358
|
## The drop page
|
|
@@ -336,7 +372,7 @@ plugin or connector in a chat client).
|
|
|
336
372
|
|
|
337
373
|
- **A top-level HTML file.** A lone one of any name is the homepage; with more
|
|
338
374
|
than one, `index.html` must be among them.
|
|
339
|
-
- **
|
|
375
|
+
- **20 MB per file and per site.** The Wix MCP's upload tool takes 10 MB per call.
|
|
340
376
|
- **Static files only** in a drop. A project that needs a build is built first,
|
|
341
377
|
and its build output is dropped.
|
|
342
378
|
|
|
@@ -344,7 +380,7 @@ plugin or connector in a chat client).
|
|
|
344
380
|
| --- | --- |
|
|
345
381
|
| `400` `MISSING_INDEX_HTML`, `FILE_TOO_LARGE`, `TOTAL_TOO_LARGE` | In `details.applicationError.code`; fix the files. |
|
|
346
382
|
| `403 PERMISSION_DENIED` on a drop | The token expired or is missing, or the site isn't the caller's. An anonymous site takes upload and release, not a drop. |
|
|
347
|
-
| `500` on a drop or upload | A
|
|
383
|
+
| `500` on a drop or upload | A failure on Wix's side, with a request id and no body. Retry once; if it fails again, keep the request id for feedback and hand over the drop page. A body built by hand (not `wix.multipart()`) can also answer `500`: rebuild it as shown. |
|
|
348
384
|
| `404` on the anonymous route | The hour passed or the site was claimed. |
|
|
349
385
|
|
|
350
386
|
## Send feedback to Wix
|
|
@@ -357,7 +393,7 @@ workaround.
|
|
|
357
393
|
|
|
358
394
|
## Route the request correctly
|
|
359
395
|
|
|
360
|
-
- **A new site from the user's
|
|
396
|
+
- **A new site from files, the user's or ones you write**: [What decides the route](#what-decides-the-route).
|
|
361
397
|
- **A change to a site published this way**: the [same site](#change-it-later);
|
|
362
398
|
upload and release while it's anonymous.
|
|
363
399
|
- **An anonymous site the user wants to keep**: [claim it](#claim-it-into-the-users-account), or the save link.
|
|
@@ -368,5 +404,5 @@ workaround.
|
|
|
368
404
|
custom code in the editor.
|
|
369
405
|
- **Images, videos or documents for a site's media**: [Upload Media to Wix](../media/upload-media-to-wix.md).
|
|
370
406
|
|
|
371
|
-
Don't create the site from a template: that makes an empty site, not
|
|
372
|
-
|
|
407
|
+
Don't create the site from a template: that makes an empty site, not the site's
|
|
408
|
+
files.
|
|
@@ -4,6 +4,9 @@ description: Adds missing checkout and cart pages to a site when Stores app is i
|
|
|
4
4
|
---
|
|
5
5
|
# Add Store Pages to Site
|
|
6
6
|
|
|
7
|
+
> These calls need the Wix Stores app on the site (`appDefId` `215238eb-22a5-4c36-9e7b-e7c08025e04e`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
This recipe demonstrates how to add checkout and cart pages to a Wix site when the Stores app is installed but pages are missing.
|
|
8
11
|
|
|
9
12
|
## Overview
|
|
@@ -5,6 +5,9 @@ description: "Changes the store's payment currency through Site Properties and e
|
|
|
5
5
|
|
|
6
6
|
# Change Store Currency
|
|
7
7
|
|
|
8
|
+
> These calls need the Wix Stores app on the site (`appDefId` `215238eb-22a5-4c36-9e7b-e7c08025e04e`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
9
|
+
|
|
10
|
+
|
|
8
11
|
Use the [Change a Site's Regional Properties (Currency, Time Zone, Language) via Site Properties API](../site-properties/change-payment-currency-site-properties.md) recipe to set the requested payment currency and read it back. Confirm the change with the user before updating it.
|
|
9
12
|
|
|
10
13
|
Catalog product responses may temporarily show the previous currency after carts and checkout use the new one. Allow time for propagation, then recheck.
|
|
@@ -5,6 +5,9 @@ description: Mandatory first recipe for every Wix Stores Catalog V3 create-produ
|
|
|
5
5
|
|
|
6
6
|
# Create Product (Catalog V3)
|
|
7
7
|
|
|
8
|
+
> These calls need the Wix Stores app on the site (`appDefId` `215238eb-22a5-4c36-9e7b-e7c08025e04e`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
9
|
+
|
|
10
|
+
|
|
8
11
|
Use this recipe for one or multiple Catalog V3 products. Catalog V1 remains supported through [Create Product (Catalog V1)](create-product-catalog-v1.md).
|
|
9
12
|
|
|
10
13
|
> [!IMPORTANT]
|
|
@@ -5,6 +5,9 @@ description: Find, search, query, and list products from a Wix Store using Catal
|
|
|
5
5
|
|
|
6
6
|
# RECIPE: Business Recipe – Find Products in a Wix Store (Query and Search, Catalog V3)
|
|
7
7
|
|
|
8
|
+
> These calls need the Wix Stores app on the site (`appDefId` `215238eb-22a5-4c36-9e7b-e7c08025e04e`); a `428`, a `400` naming the app, or an empty result on a site that should have content means it is not there. [List Installed Apps](../app-installation/list-installed-apps.md) shows what the site has; [Install Wix Apps](../app-installation/install-wix-apps.md) adds it by that id.
|
|
9
|
+
|
|
10
|
+
|
|
8
11
|
Find products in a Wix store using the Catalog V3 Search Products and Query Products APIs.
|
|
9
12
|
|
|
10
13
|
## Article: How to Find Products
|