@wix/agent-skills 1.16.3 → 1.17.0
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/EDITOR_REACT_COMPONENT.md +134 -127
- package/skills/wix-app/references/SITE_PLUGIN.md +2 -2
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +2 -2
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +182 -99
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +92 -48
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +15 -6
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +275 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +29 -42
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +153 -449
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +53 -29
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +53 -158
- package/skills/wix-app/references/editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md +78 -0
- package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +42 -134
- package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +11 -3
- package/skills/wix-app/references/editor-react-component/PARTS.md +46 -24
- package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +63 -179
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +79 -163
- package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +36 -21
- package/skills/wix-app/references/editor-react-component/SSR.md +30 -99
- package/skills/wix-base44-connector/SKILL.md +34 -17
- package/skills/wix-base44-connector/scripts/utils.js +33 -25
- package/skills/wix-headless/entry/bootstrap.mjs +9 -2
- package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +42 -23
- package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +10 -8
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +27 -24
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +5 -0
- package/skills/wix-manage/SKILL.md +11 -1
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +20 -13
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +24 -11
- package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +5 -5
- package/skills/wix-manage/references/seo/manage-seo-tags.md +315 -0
- package/skills/wix-manage/references/seo/manage-url-redirects.md +250 -0
- package/skills/wix-manage/references/sites/query-sites.md +72 -161
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +5 -6
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +13 -9
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +10 -7
- package/skills/wix-vibe-headless/platforms/base44.md +13 -10
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +2 -0
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +9 -8
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +4 -1
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +23 -11
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +1 -1
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +29 -31
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +15 -8
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +37 -38
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +2 -2
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +35 -35
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +0 -172
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +0 -143
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +0 -516
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +0 -225
- package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +0 -6
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +0 -95
|
@@ -51,7 +51,7 @@ The Wix Bookings system contains **fundamental undocumented integration patterns
|
|
|
51
51
|
- ❌ **NOT** documented booking status vs order status separation
|
|
52
52
|
- ❌ **NOT** documented service properties preservation in checkout
|
|
53
53
|
- ❌ **NO** mention of `BACKOFFICE_MERCHANT` channel requirement
|
|
54
|
-
- ❌ **NO** explanation of why
|
|
54
|
+
- ❌ **NO** explanation of why the cart/order APIs are needed for bookings
|
|
55
55
|
|
|
56
56
|
**Additional Service-Specific Gaps**:
|
|
57
57
|
- ❌ **Courses**: Dual API requirement (booking + calendar events) completely undocumented
|
|
@@ -69,7 +69,7 @@ The Wix Bookings system contains **fundamental undocumented integration patterns
|
|
|
69
69
|
- Create booking → Booking system creates reservation only
|
|
70
70
|
- Use booking ID as catalog item in ecom system
|
|
71
71
|
- Ecom system handles all pricing, tax, discount calculations
|
|
72
|
-
- Create
|
|
72
|
+
- Create a cart and place the order for actual payment processing
|
|
73
73
|
- Async messaging system handles payment confirmation
|
|
74
74
|
- Booking status (CONFIRMED) independent of payment status
|
|
75
75
|
|
|
@@ -125,7 +125,7 @@ Actual Required Flow: Booking API → Ecom Integration → Payment ✓
|
|
|
125
125
|
|
|
126
126
|
**Universal Pattern** (Works for ALL Service Types):
|
|
127
127
|
```
|
|
128
|
-
Create Booking → Extract Booking ID → Use as Catalog Item ID → Create
|
|
128
|
+
Create Booking → Extract Booking ID → Use as Catalog Item ID → Create Cart → Place Order → Process Payment
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
### 2. Identify Service Type-Specific Booking Patterns
|
|
@@ -266,26 +266,33 @@ Create calendar events using `POST https://www.wixapis.com/calendar/v3/bulk/even
|
|
|
266
266
|
|
|
267
267
|
**MAJOR DISCOVERY**: ALL booking payments use identical ecommerce integration pattern.
|
|
268
268
|
|
|
269
|
-
**Step 6A: Create
|
|
269
|
+
**Step 6A: Create Cart with Booking ID as Catalog Item**
|
|
270
270
|
|
|
271
|
-
|
|
271
|
+
Cart V2 unifies cart and checkout — there is no separate checkout entity, so the created cart's `id` is what later steps use as the cart/checkout id.
|
|
272
|
+
|
|
273
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v2/carts` ([REST](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart-v2/create-cart))
|
|
272
274
|
|
|
273
275
|
```json
|
|
274
276
|
{
|
|
275
|
-
"
|
|
277
|
+
"catalogItems": [{
|
|
276
278
|
"catalogReference": {
|
|
277
279
|
"catalogItemId": "<BOOKING_ID>",
|
|
278
280
|
"appId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97"
|
|
279
281
|
},
|
|
280
282
|
"quantity": 1
|
|
281
|
-
}]
|
|
282
|
-
"channelType": "WEB"
|
|
283
|
+
}]
|
|
283
284
|
}
|
|
284
285
|
```
|
|
285
286
|
|
|
286
|
-
**Step 6B:
|
|
287
|
+
**Step 6B: Place Order for Payment Processing**
|
|
288
|
+
|
|
289
|
+
First calculate the cart to obtain a price-verification token:
|
|
290
|
+
|
|
291
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v2/carts/{cartId}/calculate` — read `summary.priceVerificationToken` from the response.
|
|
292
|
+
|
|
293
|
+
Then place the order, passing that token:
|
|
287
294
|
|
|
288
|
-
**Endpoint**: `POST https://www.wixapis.com/ecom/
|
|
295
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v2/carts/{cartId}/place-order` (body `{ "priceVerificationToken": "<TOKEN>" }`)
|
|
289
296
|
|
|
290
297
|
**Critical Architecture Discoveries**:
|
|
291
298
|
- **Automatic ID Transformation**: Booking IDs automatically valid as catalog item IDs
|
|
@@ -297,7 +304,7 @@ Create calendar events using `POST https://www.wixapis.com/calendar/v3/bulk/even
|
|
|
297
304
|
|
|
298
305
|
**Payment Processing Architecture**:
|
|
299
306
|
```
|
|
300
|
-
Booking (CONFIRMED) →
|
|
307
|
+
Booking (CONFIRMED) → Cart → Place Order → Payment Processing (async)
|
|
301
308
|
↓
|
|
302
309
|
Messaging System
|
|
303
310
|
↓
|
|
@@ -322,7 +329,7 @@ Booking (CONFIRMED) → Checkout → Order → Payment Processing (async)
|
|
|
322
329
|
**Service Packages**: Multi-service booking + ecom integration
|
|
323
330
|
|
|
324
331
|
**Universal Integration Considerations**:
|
|
325
|
-
- All service types use same
|
|
332
|
+
- All service types use the same cart/order creation pattern
|
|
326
333
|
- Pricing calculations always handled by ecom system
|
|
327
334
|
- Async payment confirmation applies to all booking types
|
|
328
335
|
- Service properties preserved across all integration points
|
|
@@ -406,7 +413,7 @@ Booking (CONFIRMED) → Checkout → Order → Payment Processing (async)
|
|
|
406
413
|
* [Standard Booking Flow](https://dev.wix.com/docs/api-reference/business-solutions/bookings/flow-single-service-booking) - Missing payment integration
|
|
407
414
|
* [Create Booking](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/create-booking) - No payment processing guidance
|
|
408
415
|
* [Service Types](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-types) - Missing integration patterns
|
|
409
|
-
* [Ecommerce
|
|
416
|
+
* [Ecommerce Cart](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart-v2/introduction) - No booking integration mention
|
|
410
417
|
|
|
411
418
|
**Completely Undocumented**:
|
|
412
419
|
* **Booking→Ecom Integration**: Universal pattern affecting all booking payments
|
|
@@ -19,7 +19,7 @@ Step-by-step flow for implementing a complete booking experience using REST APIs
|
|
|
19
19
|
- **Services API**: [Query Services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/query-services)
|
|
20
20
|
- **Time Slots V2 API**: [List Availability Time Slots](https://dev.wix.com/docs/api-reference/business-solutions/bookings/time-slots/time-slots-v2/list-availability-time-slots)
|
|
21
21
|
- **Bookings API**: [Create Booking](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/create-booking), [Confirm Booking](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/confirm-booking)
|
|
22
|
-
- **eCommerce API**: [Create
|
|
22
|
+
- **eCommerce API**: [Create Cart](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart-v2/create-cart)
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
@@ -226,15 +226,17 @@ Use the `id` and `revision` from the Create Booking response. Set `paymentStatus
|
|
|
226
226
|
|
|
227
227
|
**Result**: Booking status changes to `CONFIRMED` and is visible in the booking calendar.
|
|
228
228
|
|
|
229
|
-
### For online payments: Create
|
|
229
|
+
### For online payments: Create a cart
|
|
230
230
|
|
|
231
|
-
|
|
231
|
+
Cart V2 unifies cart and checkout — there is no separate checkout entity. The created cart's `id` is what you use for the checkout URL and for placing the order.
|
|
232
232
|
|
|
233
|
-
**
|
|
233
|
+
**4a. Create Cart**
|
|
234
|
+
|
|
235
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v2/carts`
|
|
234
236
|
|
|
235
237
|
```json
|
|
236
238
|
{
|
|
237
|
-
"
|
|
239
|
+
"catalogItems": [
|
|
238
240
|
{
|
|
239
241
|
"catalogReference": {
|
|
240
242
|
"catalogItemId": "<BOOKING_ID>",
|
|
@@ -242,22 +244,33 @@ Use the `id` and `revision` from the Create Booking response. Set `paymentStatus
|
|
|
242
244
|
},
|
|
243
245
|
"quantity": 1
|
|
244
246
|
}
|
|
245
|
-
]
|
|
246
|
-
"channelType": "WEB"
|
|
247
|
+
]
|
|
247
248
|
}
|
|
248
249
|
```
|
|
249
250
|
|
|
250
|
-
Use the booking ID as `catalogItemId` with the Wix Bookings app ID.
|
|
251
|
+
Use the booking ID as `catalogItemId` with the Wix Bookings app ID. Save `cart.id` from the response.
|
|
251
252
|
|
|
252
253
|
**4b. Get Checkout URL**
|
|
253
254
|
|
|
254
|
-
**Endpoint**: `POST https://www.wixapis.com/ecom/
|
|
255
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v2/carts/{cartId}/get-checkout-url`
|
|
255
256
|
|
|
256
257
|
Redirect the user to the returned `checkoutUrl`. After payment, the booking is automatically confirmed.
|
|
257
258
|
|
|
258
|
-
**4c.
|
|
259
|
+
**4c. Place Order (alternative, server-to-server)**
|
|
260
|
+
|
|
261
|
+
First calculate the cart to get a price-verification token:
|
|
262
|
+
|
|
263
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v2/carts/{cartId}/calculate`
|
|
264
|
+
|
|
265
|
+
Save `summary.priceVerificationToken` from the response, then place the order:
|
|
266
|
+
|
|
267
|
+
**Endpoint**: `POST https://www.wixapis.com/ecom/v2/carts/{cartId}/place-order`
|
|
259
268
|
|
|
260
|
-
|
|
269
|
+
```json
|
|
270
|
+
{
|
|
271
|
+
"priceVerificationToken": "<PRICE_VERIFICATION_TOKEN>"
|
|
272
|
+
}
|
|
273
|
+
```
|
|
261
274
|
|
|
262
275
|
Creates an order directly without redirect.
|
|
263
276
|
|
|
@@ -10,7 +10,7 @@ This recipe documents how to convert CMS collections into sellable product catal
|
|
|
10
10
|
|
|
11
11
|
Converting a CMS collection to a catalog enables:
|
|
12
12
|
- Items in the collection become purchasable products
|
|
13
|
-
- Integration with Wix Cart and
|
|
13
|
+
- Integration with the Wix Cart API (Cart V2, which unifies cart and checkout)
|
|
14
14
|
- Real-time price and availability from your CMS data
|
|
15
15
|
|
|
16
16
|
## Prerequisites
|
|
@@ -73,7 +73,7 @@ POST https://www.wixapis.com/wix-data/v2/collections/add-plugin
|
|
|
73
73
|
Most Wix sites with Stores, Bookings, or similar apps already have eCommerce installed. Check by querying the Cart API:
|
|
74
74
|
|
|
75
75
|
```
|
|
76
|
-
POST https://www.wixapis.com/ecom/
|
|
76
|
+
POST https://www.wixapis.com/ecom/v2/carts
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
## Step 3: Use Catalog Items in Cart
|
|
@@ -87,12 +87,12 @@ e593b0bd-b783-45b8-97c2-873d42aacaf4
|
|
|
87
87
|
### Add CMS Catalog Item to Cart
|
|
88
88
|
|
|
89
89
|
```
|
|
90
|
-
POST https://www.wixapis.com/ecom/
|
|
90
|
+
POST https://www.wixapis.com/ecom/v2/carts/{cartId}/add-line-items
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
```json
|
|
94
94
|
{
|
|
95
|
-
"
|
|
95
|
+
"catalogItems": [
|
|
96
96
|
{
|
|
97
97
|
"catalogReference": {
|
|
98
98
|
"appId": "e593b0bd-b783-45b8-97c2-873d42aacaf4",
|
|
@@ -133,4 +133,4 @@ CMS Catalogs are best for simple product catalogs. For complex eCommerce needs,
|
|
|
133
133
|
|
|
134
134
|
- [CMS Schema Management](cms-schema-management.md)
|
|
135
135
|
- [CMS Data Operations](cms-data-items-crud.md)
|
|
136
|
-
- [Wix Cart API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart/
|
|
136
|
+
- [Wix Cart API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart-v2/introduction)
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Manage a Wix Site's SEO Tags"
|
|
3
|
+
description: Read and update the SEO tags of a Wix site at the right level — site-wide tags, page-type patterns, or one item's tags. Discover item IDs and pattern variables instead of inventing them, read before every full-replace write, and report resolved tags with the source each one came from.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Manage a Wix Site's SEO Tags
|
|
7
|
+
|
|
8
|
+
Use the public **SEO APIs** to read and write the titles, descriptions, social
|
|
9
|
+
share tags, canonical links, structured data, and indexing directives of the
|
|
10
|
+
authenticated Wix site. The API selects the site from the caller's
|
|
11
|
+
authorization context; never ask for or send a site ID.
|
|
12
|
+
|
|
13
|
+
Writing tags requires the **Manage SEO Settings** permission. Reading tags or
|
|
14
|
+
listing pattern variables does not prove that the caller can write.
|
|
15
|
+
|
|
16
|
+
## The one rule that must never be skipped
|
|
17
|
+
|
|
18
|
+
**Every write replaces the target's tags in full, so a Get always immediately
|
|
19
|
+
precedes a Set.** There is no partial update: sending only the tag the user
|
|
20
|
+
asked about deletes every other tag that item, pattern, or site had. So before
|
|
21
|
+
any Set, call the matching Get for that exact target, merge the requested change
|
|
22
|
+
into the tags it returns, and send the complete set back.
|
|
23
|
+
|
|
24
|
+
Never write from the user's request alone, and never skip the Get because the
|
|
25
|
+
change looks small, because a list call already returned something, or because
|
|
26
|
+
the target looks empty. The Set response returns the updated tags and
|
|
27
|
+
`resolvedTags`, so report the outcome from that response instead of issuing
|
|
28
|
+
another read.
|
|
29
|
+
|
|
30
|
+
## Choose the level
|
|
31
|
+
|
|
32
|
+
Wix combines tags from several sources, where a more specific source wins.
|
|
33
|
+
Match the user's request to the level that owns the change:
|
|
34
|
+
|
|
35
|
+
| User intent | Level | API |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| "Change my site's default social image", site verification tags, site-wide indexing | Site | **Site SEO Tags** |
|
|
38
|
+
| "All my product/blog/event pages should be titled like X" — a convention for every item of a page type | Pattern | **SEO Patterns** |
|
|
39
|
+
| "Change the title of this page/product/post" — one specific item | Item | **Item SEO Tags** |
|
|
40
|
+
|
|
41
|
+
Work at the level that matches the change. Writing the same title onto many
|
|
42
|
+
items is the same outcome as one pattern and much harder to undo. If the user's
|
|
43
|
+
words fit more than one level, ask one short question before writing. An
|
|
44
|
+
explicit request to change a specific tag at a clear level is already
|
|
45
|
+
confirmation to make that write.
|
|
46
|
+
|
|
47
|
+
All three APIs live under the **SEO** category of the Wix REST API reference.
|
|
48
|
+
The request shapes are in the section below — construct requests from them. The
|
|
49
|
+
reference article URLs follow this pattern (for edge cases not covered here):
|
|
50
|
+
|
|
51
|
+
`https://dev.wix.com/docs/api-reference/business-management/seo/{api}/` + method slug
|
|
52
|
+
|
|
53
|
+
| Level | API slug | Methods (slug) |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| Site | `site-seo-tags-v1` | Get Site SEO Tags (`get-site-seo-tags`), Set Site SEO Tags (`set-site-seo-tags`) |
|
|
56
|
+
| Pattern | `seo-pattern-v1` | Get SEO Pattern (`get-seo-pattern`), List SEO Patterns (`list-seo-patterns`), List SEO Pattern Variables (`list-seo-pattern-variables`), Create SEO Pattern (`create-seo-pattern`), Set SEO Pattern (`set-seo-pattern`), Reset SEO Pattern To Default (`reset-seo-pattern-to-default`) |
|
|
57
|
+
| Item | `item-seo-tags-v1` | Get Item SEO Tags (`get-item-seo-tags`), List Item SEO Tags (`list-item-seo-tags`), Set Item SEO Tags (`set-item-seo-tags`), Bulk Set Item SEO Tags (`bulk-set-item-seo-tags`), Reset Item SEO Tags To Default (`reset-item-seo-tags-to-default`) |
|
|
58
|
+
|
|
59
|
+
## REST request and response shapes
|
|
60
|
+
|
|
61
|
+
Use these shapes directly — do not go looking for them in the docs first.
|
|
62
|
+
|
|
63
|
+
Build requests from the shapes below. Do not search the API schemas or read
|
|
64
|
+
the reference article to construct them.
|
|
65
|
+
|
|
66
|
+
### Set Item SEO Tags — `PATCH /item-seo-tags/{itemType}/{itemId}`
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"itemSeoTags": {
|
|
71
|
+
"tags": [
|
|
72
|
+
{ "type": "title", "children": "Page title here" },
|
|
73
|
+
{ "type": "meta", "props": { "name": "description", "content": "Description here" } }
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"fieldMask": "tags"
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Get Item SEO Tags — `GET /item-seo-tags/{itemType}/{itemId}`
|
|
81
|
+
|
|
82
|
+
No request body. Returns `itemSeoTags` with `tags`, `resolvedTags`,
|
|
83
|
+
`hasOverride`, `publishStatus`, and `hostPageId`.
|
|
84
|
+
|
|
85
|
+
### List Item SEO Tags — `GET /item-seo-tags/{itemType}?paging.limit=100`
|
|
86
|
+
|
|
87
|
+
No request body. Returns `itemSeoTagsList[]` and `pagingMetadata` with cursors.
|
|
88
|
+
|
|
89
|
+
### Set Site SEO Tags — `PATCH /site-seo-tags`
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"siteSeoTags": {
|
|
94
|
+
"tags": [
|
|
95
|
+
{ "type": "meta", "props": { "name": "google-site-verification", "content": "token" } }
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"fieldMask": "tags"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Set SEO Pattern — `PATCH /seo-patterns/{pageType}`
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"seoPattern": {
|
|
107
|
+
"pattern": {
|
|
108
|
+
"tags": [
|
|
109
|
+
{ "type": "title", "children": "{{item.name}} | {{site.name}}" }
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"fieldMask": "pattern"
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Common rules across all shapes
|
|
118
|
+
|
|
119
|
+
A tag is `{type, props, children}`: `title` and `script` carry their text in
|
|
120
|
+
`children`; `meta` and `link` carry theirs in `props` (`name`/`content` for a
|
|
121
|
+
meta tag, `rel`/`href` for a link).
|
|
122
|
+
|
|
123
|
+
`fieldMask` over REST is a comma-separated **string** (`"fieldMask": "tags"`);
|
|
124
|
+
the SDK takes an **array** (`fieldMask: ["tags"]`). Sending an array to REST
|
|
125
|
+
returns `INVALID_FIELD_MASK`. `publish` is a boolean.
|
|
126
|
+
|
|
127
|
+
`resolvedTags` in any Get or Set response is an array of
|
|
128
|
+
`{tag, source, inheritedTag}`. `source` is one of `TAG_SOURCE_SITE`,
|
|
129
|
+
`TAG_SOURCE_DEFAULT_PATTERN`, `TAG_SOURCE_USER_PATTERN`, `TAG_SOURCE_HOST_PAGE`,
|
|
130
|
+
`TAG_SOURCE_ITEM`, or `TAG_SOURCE_UNSPECIFIED`. `inheritedTag` appears only when
|
|
131
|
+
this source replaced a value a lower source had set.
|
|
132
|
+
|
|
133
|
+
All paths are relative to `https://www.wixapis.com/promote/seo/v1`.
|
|
134
|
+
|
|
135
|
+
## Discover, never invent
|
|
136
|
+
|
|
137
|
+
- An item is addressed by an **item type and item ID together**, not by URL.
|
|
138
|
+
Common item types: `STATIC_PAGE`, `STORES_PRODUCT`, `STORES_CATEGORY`,
|
|
139
|
+
`BLOG_POST`, `BLOG_CATEGORY`, `BOOKINGS_SERVICE`, `EVENTS_PAGE`,
|
|
140
|
+
`PORTFOLIO_PROJECTS`, `PORTFOLIO_COLLECTIONS`, `RESTAURANTS_MENU_PAGE`.
|
|
141
|
+
- To find an item's ID when the user refers to it by name (e.g. a product
|
|
142
|
+
name), use Search Products v3: `POST /stores/v3/products/search`
|
|
143
|
+
to get the product ID, then use that ID as the `itemId` with item type
|
|
144
|
+
`STORES_PRODUCT`. Do not call List Item SEO Tags and scan through all items
|
|
145
|
+
to match by name — use the vertical API.
|
|
146
|
+
- Never fabricate an item ID. If you cannot find the item through its vertical
|
|
147
|
+
API or List Item SEO Tags, ask the user.
|
|
148
|
+
- Item types exist on a site only when the business solution providing them is
|
|
149
|
+
installed. The authoritative list of supported item types is in the
|
|
150
|
+
`UNSUPPORTED_ITEM_TYPE` error message; do not hardcode one beyond the common
|
|
151
|
+
values listed above.
|
|
152
|
+
- Before writing a pattern, call **List SEO Pattern Variables** for the page
|
|
153
|
+
type and build the pattern only from returned variables. Never invent a
|
|
154
|
+
variable name.
|
|
155
|
+
- Dynamic Wix Data pages are addressed by `pageId`; addressing a pattern by
|
|
156
|
+
collection name is not supported.
|
|
157
|
+
|
|
158
|
+
## The write sequence
|
|
159
|
+
|
|
160
|
+
Exactly three calls, in this order, with no extra probing:
|
|
161
|
+
|
|
162
|
+
1. **Get** the current tags or pattern for the target. Required — see the rule
|
|
163
|
+
above.
|
|
164
|
+
2. **Set** the complete merged set, naming only the changed fields in the field
|
|
165
|
+
mask.
|
|
166
|
+
3. Report from the **Set response**, which returns the updated tags and
|
|
167
|
+
`resolvedTags`. Do not issue a verification read: the write response is the
|
|
168
|
+
confirmation. Read again only to check a static page's published revision
|
|
169
|
+
after `publish: true`, or when the user asks about a target you have not read
|
|
170
|
+
in this session.
|
|
171
|
+
|
|
172
|
+
To remove an item's own tags so it inherits again, call **Reset Item SEO Tags To
|
|
173
|
+
Default** (or **Reset SEO Pattern To Default**) — never set an empty list to
|
|
174
|
+
mean "reset".
|
|
175
|
+
|
|
176
|
+
## Worked example: set a product's SEO title and description
|
|
177
|
+
|
|
178
|
+
The user asks: *"Set the SEO title of my product 'Handmade Mug' to 'Handmade
|
|
179
|
+
Ceramic Mug | Studio Shop' and its description to 'A stoneware mug.'"*
|
|
180
|
+
|
|
181
|
+
**Step 1 — find the product ID.** Search Products v3 by name:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
POST https://www.wixapis.com/stores/v3/products/search
|
|
185
|
+
{ "search": { "search": { "expression": "Handmade Mug" } } }
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
```json
|
|
189
|
+
{ "products": [{ "id": "a1b2c3d4-...", "name": "Handmade Mug", ... }] }
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Take `products[0].id`. The item type is `STORES_PRODUCT`. Do not use Query
|
|
193
|
+
Products with a `name` filter — `name` is not filterable and returns 400.
|
|
194
|
+
|
|
195
|
+
**Step 2 — read the current tags.**
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
GET https://www.wixapis.com/promote/seo/v1/item-seo-tags/STORES_PRODUCT/{productId}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"itemSeoTags": {
|
|
204
|
+
"tags": [],
|
|
205
|
+
"hasOverride": false,
|
|
206
|
+
"resolvedTags": [
|
|
207
|
+
{ "tag": { "type": "title", "children": "Handmade Mug | My Site" },
|
|
208
|
+
"source": "TAG_SOURCE_DEFAULT_PATTERN" }
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
`tags` is empty because the item has no overrides yet. `resolvedTags` shows
|
|
215
|
+
what the page currently renders with and where each tag comes from.
|
|
216
|
+
|
|
217
|
+
**Step 3 — merge and write.** Take the full `tags` array from step 2, replace
|
|
218
|
+
or add the title and description, and send the complete set back:
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
PATCH /item-seo-tags/STORES_PRODUCT/{productId}
|
|
222
|
+
{
|
|
223
|
+
"itemSeoTags": {
|
|
224
|
+
"tags": [
|
|
225
|
+
{ "type": "title", "children": "Handmade Ceramic Mug | Studio Shop" },
|
|
226
|
+
{ "type": "meta", "props": { "name": "description", "content": "A stoneware mug." } }
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
"fieldMask": "tags"
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Step 4 — report from the response.** The Set response returns the updated
|
|
234
|
+
`tags` and `resolvedTags`. Report each resolved tag with its source. Do not
|
|
235
|
+
issue another Get — the write response is the confirmation.
|
|
236
|
+
|
|
237
|
+
## Common agent mistakes — do not make these
|
|
238
|
+
|
|
239
|
+
- **Searching the API schemas or reading the reference article before the first
|
|
240
|
+
call.** The request shapes are in this recipe. If you get a 400, compare your
|
|
241
|
+
request against the shapes in this recipe — do not go to the docs.
|
|
242
|
+
- **Searching for the SEO endpoints through API spec tools.** The shapes are
|
|
243
|
+
above; searching wastes a turn.
|
|
244
|
+
- **Sending `fieldMask` as an array over REST.** Over REST it is a
|
|
245
|
+
comma-separated string: `"fieldMask": "tags"`. The SDK's `["tags"]` array
|
|
246
|
+
returns `INVALID_FIELD_MASK`.
|
|
247
|
+
- **Guessing the item type.** Use the values in the Discover section. A store
|
|
248
|
+
product is `STORES_PRODUCT`, not `StoresProduct`, `product`, or `Product`.
|
|
249
|
+
|
|
250
|
+
- **Issuing a verification Get after a successful Set.** The Set response
|
|
251
|
+
already carries `resolvedTags`. A second read is redundant.
|
|
252
|
+
- **Using Products v1 or filtering by `name` on Query Products.** Both return
|
|
253
|
+
400. Use Search Products v3: `POST /stores/v3/products/search` with
|
|
254
|
+
`{"search":{"search":{"expression":"..."}}}`.
|
|
255
|
+
- **Calling List Item SEO Tags expecting product names.** List returns IDs
|
|
256
|
+
and tags, not names. Use Search Products to find the ID by name first.
|
|
257
|
+
- **Retrying a 400 with a different request shape without checking why.** A 400
|
|
258
|
+
means the shape was wrong. Compare against the shapes in this recipe, fix the
|
|
259
|
+
mismatch, send once. Three retries with guessed shapes is three wasted calls.
|
|
260
|
+
|
|
261
|
+
Tags can currently be written only for the site's primary language: leave
|
|
262
|
+
`language` unset on every write. There is no revision checking — the last write
|
|
263
|
+
wins and dashboard edits write to the same data, so read immediately before
|
|
264
|
+
writing.
|
|
265
|
+
|
|
266
|
+
**Static pages** keep a draft and a published revision: a write updates the
|
|
267
|
+
draft unless `publish` is `true`, and `publish: true` updates only the
|
|
268
|
+
published revision. Say clearly which revision the change reached. Item types
|
|
269
|
+
that are always live, such as store products, need no publish step.
|
|
270
|
+
|
|
271
|
+
## Bulk writes
|
|
272
|
+
|
|
273
|
+
To set tags on many items, call **Bulk Set Item SEO Tags** once, not Set in a
|
|
274
|
+
loop. Expected per-item failures (invalid tags, item not found) fail only that
|
|
275
|
+
entry and are reported on that entry's `itemMetadata.error`; map results back
|
|
276
|
+
to the request with `originalIndex` and retry only the failed entries. Report
|
|
277
|
+
partial failures truthfully — never present a partially failed bulk write as a
|
|
278
|
+
success.
|
|
279
|
+
|
|
280
|
+
## Present results
|
|
281
|
+
|
|
282
|
+
- When reporting what a page will render with, use the `resolvedTags` already
|
|
283
|
+
returned by the last Get or Set — not a fresh call — and name the source of
|
|
284
|
+
each tag (site, default pattern, user pattern, host page, or the item
|
|
285
|
+
itself). Naming the source of each reported tag is required, not optional.
|
|
286
|
+
`hasOverride: false` does not mean built-in defaults — the item may inherit
|
|
287
|
+
from a customized pattern or the site.
|
|
288
|
+
- `resolvedTags` excludes tags added by site code or apps at render time, so
|
|
289
|
+
present it as what Wix manages, not a literal copy of the rendered page head.
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
## Recovery rules
|
|
293
|
+
|
|
294
|
+
- **Permission denied:** stop after the first `403` or `PERMISSION_DENIED`. Do
|
|
295
|
+
not retry with another item, level, request shape, or site. Explain that the
|
|
296
|
+
current Wix identity lacks **Manage SEO Settings** and must be reconnected or
|
|
297
|
+
authorized. Never imply that a successful read means the write ran.
|
|
298
|
+
- **`UNSUPPORTED_ITEM_TYPE`:** the error message lists the item types the API
|
|
299
|
+
supports; use it to redirect the request rather than retrying blindly.
|
|
300
|
+
- **`ITEM_NOT_FOUND`:** re-discover the item ID; do not guess a new one.
|
|
301
|
+
- **Invalid tags:** tags are validated before anything is saved, so nothing
|
|
302
|
+
changed; fix the tag and resend the same complete set.
|
|
303
|
+
- **`400` on a request you built from this recipe:** compare the request you
|
|
304
|
+
sent against the shapes in this recipe's "REST request and response shapes"
|
|
305
|
+
section. Fix the mismatch — a wrong nesting level, a missing wrapper key, or
|
|
306
|
+
`fieldMask` sent as an array instead of a string — and send again. Never
|
|
307
|
+
resend the same shape, and never walk through variations hoping one is
|
|
308
|
+
accepted.
|
|
309
|
+
- **Setting tags for `EVENTS_PAGE` items:** not supported yet, although reading
|
|
310
|
+
them is; say so instead of retrying.
|
|
311
|
+
|
|
312
|
+
This recipe is self-contained for the common flows: request shapes, field
|
|
313
|
+
masks, tag structure, `resolvedTags` format, discovery, and error handling are
|
|
314
|
+
all above. Do not read the method's reference article and do not search the
|
|
315
|
+
API schemas — build every request from this recipe alone.
|