@wix/agent-skills 1.5.0 → 1.7.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.
Files changed (156) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
  3. package/skills/wix-app/SKILL.md +49 -42
  4. package/skills/wix-app/references/BACKEND_EVENT.md +10 -65
  5. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +101 -406
  6. package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +14 -111
  7. package/skills/wix-app/references/DASHBOARD_MODAL.md +56 -205
  8. package/skills/wix-app/references/DASHBOARD_PAGE.md +19 -98
  9. package/skills/wix-app/references/DASHBOARD_PLUGIN.md +6 -108
  10. package/skills/wix-app/references/DATA_COLLECTION.md +113 -198
  11. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +15 -1
  12. package/skills/wix-app/references/EMBEDDED_SCRIPT.md +41 -268
  13. package/skills/wix-app/references/EXTENSION_REGISTRATION.md +27 -76
  14. package/skills/wix-app/references/SERVICE_PLUGIN.md +35 -188
  15. package/skills/wix-app/references/SITE_PLUGIN.md +8 -92
  16. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +0 -44
  17. package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +19 -330
  18. package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +0 -12
  19. package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +7 -0
  20. package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +0 -12
  21. package/skills/wix-app/references/dashboard-plugin/SLOTS.md +3 -15
  22. package/skills/wix-app/references/data-collection/WIX_DATA.md +1 -1
  23. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +1 -1
  24. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +2 -18
  25. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +2 -42
  26. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +1 -11
  27. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +1 -11
  28. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +2 -40
  29. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +2 -19
  30. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +2 -18
  31. package/skills/wix-app/references/site-plugin/SLOTS.md +17 -68
  32. package/skills/wix-headless/SKILL.md +112 -368
  33. package/skills/wix-headless/references/BUILD.md +307 -0
  34. package/skills/wix-headless/references/DESIGN_SYSTEM.md +115 -0
  35. package/skills/wix-headless/references/DISCOVERY.md +237 -112
  36. package/skills/wix-headless/references/PLAN.md +82 -0
  37. package/skills/wix-headless/references/SEED.md +205 -0
  38. package/skills/wix-headless/references/SETUP.md +250 -94
  39. package/skills/wix-headless/references/astro/COMPOSE.md +142 -0
  40. package/skills/wix-headless/references/{blog → astro/blog}/BLOG_PAGES.md +1 -1
  41. package/skills/wix-headless/references/{blog → astro/blog}/BLOG_SETUP.md +2 -2
  42. package/skills/wix-headless/references/astro/cms/CMS_FOUNDATIONS.md +214 -0
  43. package/skills/wix-headless/references/{cms → astro/cms}/FAQ_KNOWLEDGE_BASE.md +6 -4
  44. package/skills/wix-headless/references/{cms → astro/cms}/PORTFOLIO.md +5 -5
  45. package/skills/wix-headless/references/{cms → astro/cms}/RESOURCE_LIBRARY.md +5 -5
  46. package/skills/wix-headless/references/{cms → astro/cms}/TEAM_DIRECTORY.md +5 -5
  47. package/skills/wix-headless/references/astro/designer/INSTRUCTIONS.md +331 -0
  48. package/skills/wix-headless/references/{ecom → astro/ecom}/CART_PAGES.md +1 -1
  49. package/skills/wix-headless/references/{ecom → astro/ecom}/CART_WIRING.md +1 -1
  50. package/skills/wix-headless/references/{ecom → astro/ecom}/COMPONENTS_CSS.md +3 -3
  51. package/skills/wix-headless/references/{forms → astro/forms}/CONTACT_FORM.md +13 -13
  52. package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/COMPONENTS.md +1 -1
  53. package/skills/wix-headless/references/{gift-cards → astro/gift-cards}/PAGES.md +1 -1
  54. package/skills/wix-headless/references/{stores → astro/stores}/BACK_IN_STOCK.md +1 -1
  55. package/skills/wix-headless/references/{stores → astro/stores}/CATEGORY_PAGES.md +12 -13
  56. package/skills/wix-headless/references/{stores → astro/stores}/COMPONENTS_CSS.md +4 -4
  57. package/skills/wix-headless/references/{stores → astro/stores}/HOME_AND_NAV.md +11 -9
  58. package/skills/wix-headless/references/{stores → astro/stores}/PRODUCT_PAGES.md +5 -3
  59. package/skills/wix-headless/references/{stores → astro/stores}/SHARED_WIRING.md +3 -3
  60. package/skills/wix-headless/references/astro/templates/Footer.astro +27 -0
  61. package/skills/wix-headless/references/astro/templates/Layout.astro +132 -0
  62. package/skills/wix-headless/references/astro/templates/Navigation.astro +38 -0
  63. package/skills/wix-headless/references/astro/templates/astro.config.mjs +41 -0
  64. package/skills/wix-headless/references/astro/templates/ecom/components-ecom.css +302 -0
  65. package/skills/wix-headless/references/astro/templates/global.css +286 -0
  66. package/skills/wix-headless/references/astro/templates/index.astro +56 -0
  67. package/skills/wix-headless/{templates → references/astro/templates}/stores/back-in-stock.ts +1 -1
  68. package/skills/wix-headless/{templates → references/astro/templates}/stores/components-stores.css +138 -33
  69. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +10 -11
  70. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +5 -5
  71. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +31 -230
  72. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +13 -8
  73. package/skills/wix-headless/references/custom/INSTRUCTIONS.md +38 -0
  74. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +10 -10
  75. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +5 -5
  76. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +11 -11
  77. package/skills/wix-headless/references/images/INSTRUCTIONS.md +47 -50
  78. package/skills/wix-headless/references/seed-recipes.md +49 -0
  79. package/skills/wix-headless/references/shared/AUTHENTICATION.md +110 -0
  80. package/skills/wix-headless/references/shared/BUILD_NOISE.md +2 -2
  81. package/skills/wix-headless/references/shared/DOCS_SEARCH.md +41 -0
  82. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +17 -17
  83. package/skills/wix-headless/references/shared/IMPLEMENTER.md +20 -29
  84. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +1 -1
  85. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +25 -16
  86. package/skills/wix-headless/references/shared/STYLING.md +47 -10
  87. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +25 -25
  88. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +17 -17
  89. package/skills/wix-headless/references/verticals/_schema.json +31 -117
  90. package/skills/wix-headless/references/verticals/_schema.md +60 -150
  91. package/skills/wix-headless/references/verticals/blog.md +5 -99
  92. package/skills/wix-headless/references/verticals/cms.md +9 -100
  93. package/skills/wix-headless/references/verticals/ecom.md +5 -76
  94. package/skills/wix-headless/references/verticals/forms.md +5 -85
  95. package/skills/wix-headless/references/verticals/gift-cards.md +6 -103
  96. package/skills/wix-headless/references/verticals/stores.md +10 -144
  97. package/skills/wix-headless/scripts/check-manifest.mjs +5 -5
  98. package/skills/wix-headless/scripts/emit-design-tokens.mjs +29 -23
  99. package/skills/wix-headless/scripts/init-site-json.mjs +59 -21
  100. package/skills/wix-headless/scripts/patch-decorative-slots.mjs +67 -43
  101. package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +3 -3
  102. package/skills/wix-headless/scripts/preview.sh +3 -3
  103. package/skills/wix-headless/scripts/release.sh +4 -4
  104. package/skills/wix-headless/scripts/scaffold.sh +75 -20
  105. package/skills/wix-headless/scripts/seed-utilities.sh +50 -12
  106. package/skills/wix-manage/SKILL.md +4 -8
  107. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +70 -1
  108. package/skills/wix-manage/references/cms/cms-data-items-crud.md +4 -0
  109. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +2 -0
  110. package/skills/wix-manage/references/cms/cms-schema-management.md +4 -0
  111. package/skills/wix-manage/references/ecommerce/api-shipping.md +443 -0
  112. package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +5 -6
  113. package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +4 -5
  114. package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +4 -5
  115. package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +1 -1
  116. package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +1 -2
  117. package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +2 -2
  118. package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +4 -5
  119. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +7 -7
  120. package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +209 -72
  121. package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +9 -10
  122. package/skills/wix-manage/references/ecommerce/skill-graph.md +4 -4
  123. package/skills/wix-manage/references/forms/create-form.md +2 -0
  124. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +2 -0
  125. package/skills/wix-manage/references/stores/create-product-from-image.md +91 -38
  126. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +14 -7
  127. package/skills/wix-app/references/data-collection/extension-template.ts +0 -107
  128. package/skills/wix-headless/references/ORCHESTRATION.md +0 -269
  129. package/skills/wix-headless/references/commands/install-app.md +0 -42
  130. package/skills/wix-headless/references/commands/mcp-bootstrap.md +0 -28
  131. package/skills/wix-headless/references/designer/INSTRUCTIONS.md +0 -828
  132. package/skills/wix-headless/references/shared/MCP_PREFIX.md +0 -105
  133. package/skills/wix-headless/scripts/copy-utility-templates.mjs +0 -153
  134. package/skills/wix-headless/templates/ecom/components-ecom.css +0 -215
  135. package/skills/wix-manage/references/events/list-events.md +0 -203
  136. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartBadge.tsx +0 -0
  137. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/CartView.tsx +0 -0
  138. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/cart.astro +0 -0
  139. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/discounts.ts +0 -0
  140. /package/skills/wix-headless/{templates → references/astro/templates}/ecom/thank-you.astro +0 -0
  141. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/GiftCardPurchase.tsx +0 -0
  142. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_home-teaser-snippet.astro +0 -0
  143. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/_nav-snippet.astro +0 -0
  144. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/components-gift-cards.css +0 -0
  145. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.astro +0 -0
  146. /package/skills/wix-headless/{templates → references/astro/templates}/gift-cards/gift-cards.ts +0 -0
  147. /package/skills/wix-headless/{templates → references/astro/templates}/stores/AddToCartButton.tsx +0 -0
  148. /package/skills/wix-headless/{templates → references/astro/templates}/stores/BackInStockForm.tsx +0 -0
  149. /package/skills/wix-headless/{templates → references/astro/templates}/stores/CategoryRail.astro +0 -0
  150. /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductCard.astro +0 -0
  151. /package/skills/wix-headless/{templates → references/astro/templates}/stores/ProductPurchase.tsx +0 -0
  152. /package/skills/wix-headless/{templates → references/astro/templates}/stores/SeoTags.astro +0 -0
  153. /package/skills/wix-headless/{templates → references/astro/templates}/stores/categories.ts +0 -0
  154. /package/skills/wix-headless/{templates → references/astro/templates}/stores/category/[slug].astro +0 -0
  155. /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/[slug].astro +0 -0
  156. /package/skills/wix-headless/{templates → references/astro/templates}/stores/products/index.astro +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "Setup: Discount Rules"
3
- description: Configures automatic discount rules using the eCommerce Discount Rules API. Covers percentage and fixed-amount discounts, scope targeting (catalog-wide, specific collections, or individual products), and scheduling active periods.
3
+ description: Configures automatic discount rules using the eCommerce Discount Rules API. Covers percentage and fixed-amount discounts, scope targeting (catalog-wide, specific collections, or individual products), scheduling active periods, and the find-by-name + update pattern.
4
4
  layer: config
5
5
  ---
6
6
  # Setup Discount Rules
@@ -20,23 +20,66 @@ layer: config
20
20
 
21
21
  ---
22
22
 
23
- ## Step 1: Query existing discount rules
23
+ ## Critical: `discounts` structure
24
+
25
+ **The API always returns the full normalized structure.** Never assume a simplified form. Each discount entry looks like:
26
+
27
+ ```json
28
+ {
29
+ "targetType": "SPECIFIC_ITEMS",
30
+ "specificItemsInfo": {
31
+ "scopes": [
32
+ {
33
+ "id": "all_215238eb-22a5-4c36-9e7b-e7c08025e04e",
34
+ "type": "CATALOG_ITEM",
35
+ "catalogItemFilter": {
36
+ "catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e"
37
+ }
38
+ }
39
+ ]
40
+ },
41
+ "discount": {
42
+ "discountType": "PERCENTAGE",
43
+ "percentage": 20
44
+ }
45
+ }
46
+ ```
47
+
48
+ When updating a rule, always use the `discounts` array as returned from the query/get, modifying only the specific fields you need. **Do not reconstruct from scratch unless creating a new rule.**
49
+
50
+ ---
24
51
 
25
- Before creating new rules, check what already exists to avoid conflicts.
52
+ ## Step 1: Query existing discount rules
26
53
 
27
54
  **Endpoint**: `POST https://www.wixapis.com/ecom/v1/discount-rules/query`
28
55
 
29
- **Request**:
56
+ > **Paging**: This API uses **cursor paging** (`cursorPaging`), not offset paging. Using `paging` instead of `cursorPaging` will fail.
57
+
58
+ **Request** — list all rules:
30
59
  ```json
31
60
  {
32
61
  "query": {
33
- "paging": {
62
+ "cursorPaging": {
34
63
  "limit": 100
35
64
  }
36
65
  }
37
66
  }
38
67
  ```
39
68
 
69
+ **Request** — find by name (exact match):
70
+ ```json
71
+ {
72
+ "query": {
73
+ "filter": {
74
+ "name": { "$eq": "Summer Sale" }
75
+ },
76
+ "cursorPaging": { "limit": 10 }
77
+ }
78
+ }
79
+ ```
80
+
81
+ Filterable fields: `id`, `name`, `active`, `revision`, `created_date`, `updated_date`, `active_time_info.start`, `active_time_info.end`
82
+
40
83
  **Response**:
41
84
  ```json
42
85
  {
@@ -52,20 +95,28 @@ Before creating new rules, check what already exists to avoid conflicts.
52
95
  },
53
96
  "discounts": [
54
97
  {
98
+ "targetType": "SPECIFIC_ITEMS",
99
+ "specificItemsInfo": {
100
+ "scopes": [
101
+ {
102
+ "id": "all_215238eb-22a5-4c36-9e7b-e7c08025e04e",
103
+ "type": "CATALOG_ITEM",
104
+ "catalogItemFilter": {
105
+ "catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e"
106
+ }
107
+ }
108
+ ]
109
+ },
55
110
  "discount": {
56
111
  "discountType": "PERCENTAGE",
57
112
  "percentage": 10
58
- },
59
- "scope": {
60
- "id": "catalog",
61
- "type": "CATALOG"
62
113
  }
63
114
  }
64
115
  ]
65
116
  }
66
117
  ],
67
118
  "pagingMetadata": {
68
- "count": 1,
119
+ "cursors": {},
69
120
  "hasNext": false
70
121
  }
71
122
  }
@@ -91,44 +142,27 @@ Note existing rules and their scopes to avoid stacking conflicts.
91
142
  },
92
143
  "discounts": [
93
144
  {
94
- "discount": {
95
- "discountType": "PERCENTAGE",
96
- "percentage": 20
145
+ "targetType": "SPECIFIC_ITEMS",
146
+ "specificItemsInfo": {
147
+ "scopes": [
148
+ {
149
+ "id": "all_215238eb-22a5-4c36-9e7b-e7c08025e04e",
150
+ "type": "CATALOG_ITEM",
151
+ "catalogItemFilter": {
152
+ "catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e"
153
+ }
154
+ }
155
+ ]
97
156
  },
98
- "scope": {
99
- "id": "catalog",
100
- "type": "CATALOG"
101
- }
102
- }
103
- ]
104
- }
105
- }
106
- ```
107
-
108
- **Response**:
109
- ```json
110
- {
111
- "discountRule": {
112
- "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
113
- "revision": "1",
114
- "name": "Flash Sale 20% Off",
115
- "active": true,
116
- "activeTimeInfo": {
117
- "start": "2026-05-01T00:00:00.000Z",
118
- "end": "2026-05-03T23:59:59.000Z"
119
- },
120
- "discounts": [
121
- {
122
157
  "discount": {
123
158
  "discountType": "PERCENTAGE",
124
159
  "percentage": 20
125
- },
126
- "scope": {
127
- "id": "catalog",
128
- "type": "CATALOG"
129
160
  }
130
161
  }
131
- ]
162
+ ],
163
+ "settings": {
164
+ "appliesTo": "ALL_ITEMS"
165
+ }
132
166
  }
133
167
  }
134
168
  ```
@@ -141,16 +175,30 @@ Note existing rules and their scopes to avoid stacking conflicts.
141
175
  "active": true,
142
176
  "discounts": [
143
177
  {
178
+ "targetType": "SPECIFIC_ITEMS",
179
+ "specificItemsInfo": {
180
+ "scopes": [
181
+ {
182
+ "id": "collections_215238eb-22a5-4c36-9e7b-e7c08025e04e",
183
+ "type": "CUSTOM_FILTER",
184
+ "customFilter": {
185
+ "appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
186
+ "params": {
187
+ "collectionIds": ["collection-uuid-here"]
188
+ }
189
+ }
190
+ }
191
+ ]
192
+ },
144
193
  "discount": {
145
194
  "discountType": "PERCENTAGE",
146
195
  "percentage": 15
147
- },
148
- "scope": {
149
- "id": "collection-uuid-here",
150
- "type": "COLLECTION"
151
196
  }
152
197
  }
153
- ]
198
+ ],
199
+ "settings": {
200
+ "appliesTo": "ALL_ITEMS"
201
+ }
154
202
  }
155
203
  }
156
204
  ```
@@ -167,16 +215,28 @@ Note existing rules and their scopes to avoid stacking conflicts.
167
215
  "active": true,
168
216
  "discounts": [
169
217
  {
218
+ "targetType": "SPECIFIC_ITEMS",
219
+ "specificItemsInfo": {
220
+ "scopes": [
221
+ {
222
+ "id": "specific_215238eb-22a5-4c36-9e7b-e7c08025e04e",
223
+ "type": "CATALOG_ITEM",
224
+ "catalogItemFilter": {
225
+ "catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
226
+ "catalogItemIds": ["product-uuid-here"]
227
+ }
228
+ }
229
+ ]
230
+ },
170
231
  "discount": {
171
232
  "discountType": "FIXED_AMOUNT",
172
233
  "fixedAmount": "5.00"
173
- },
174
- "scope": {
175
- "id": "product-uuid-here",
176
- "type": "SPECIFIC_PRODUCTS"
177
234
  }
178
235
  }
179
- ]
236
+ ],
237
+ "settings": {
238
+ "appliesTo": "ALL_ITEMS"
239
+ }
180
240
  }
181
241
  }
182
242
  ```
@@ -185,36 +245,107 @@ Note existing rules and their scopes to avoid stacking conflicts.
185
245
 
186
246
  ## Step 4: Update a discount rule
187
247
 
188
- **Endpoint**: `PATCH https://www.wixapis.com/ecom/v1/discount-rules/{discountRuleId}`
248
+ Always fetch the rule first (via Get or Query), then modify only the fields you need. The `mask` field tells the API which fields to update — omit it to replace all writable fields.
189
249
 
190
- **Request**:
250
+ **Endpoint**: `PATCH https://www.wixapis.com/ecom/v1/discount-rules/{discountRule.id}`
251
+
252
+ **Required**: `discountRule.id`, `discountRule.revision` (must match current revision)
253
+
254
+ **Request** — change percentage on an existing rule (full discounts replacement):
191
255
  ```json
192
256
  {
193
257
  "discountRule": {
194
- "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
258
+ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
195
259
  "revision": "1",
196
- "name": "Extended Flash Sale 25% Off",
197
260
  "discounts": [
198
261
  {
262
+ "targetType": "SPECIFIC_ITEMS",
263
+ "specificItemsInfo": {
264
+ "scopes": [
265
+ {
266
+ "id": "all_215238eb-22a5-4c36-9e7b-e7c08025e04e",
267
+ "type": "CATALOG_ITEM",
268
+ "catalogItemFilter": {
269
+ "catalogAppId": "215238eb-22a5-4c36-9e7b-e7c08025e04e"
270
+ }
271
+ }
272
+ ]
273
+ },
199
274
  "discount": {
200
275
  "discountType": "PERCENTAGE",
201
276
  "percentage": 25
202
- },
203
- "scope": {
204
- "id": "catalog",
205
- "type": "CATALOG"
206
277
  }
207
278
  }
208
279
  ]
280
+ },
281
+ "mask": { "paths": ["discounts"] }
282
+ }
283
+ ```
284
+
285
+ **Request** — change only `active` status (field mask for partial update):
286
+ ```json
287
+ {
288
+ "discountRule": {
289
+ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
290
+ "revision": "2",
291
+ "active": false
292
+ },
293
+ "mask": { "paths": ["active"] }
294
+ }
295
+ ```
296
+
297
+ ---
298
+
299
+ ## Step 5: Find by name and update (complete pattern)
300
+
301
+ The safe pattern for "find a rule by name and update its percentage":
302
+
303
+ 1. Query with name filter → get the rule's `id`, `revision`, and `discounts` array
304
+ 2. Modify only the `discount.percentage` inside each discount entry, keeping all other fields intact
305
+ 3. PATCH with the modified `discounts` and `mask: { paths: ["discounts"] }`
306
+
307
+ **Step 5a — Query by name**:
308
+ ```json
309
+ POST https://www.wixapis.com/ecom/v1/discount-rules/query
310
+ {
311
+ "query": {
312
+ "filter": { "name": { "$eq": "My Rule Name" } },
313
+ "cursorPaging": { "limit": 1 }
209
314
  }
210
315
  }
211
316
  ```
212
317
 
213
- The `revision` field is required and must match the current revision.
318
+ Extract from response: `discountRules[0].id`, `discountRules[0].revision`, `discountRules[0].discounts`
319
+
320
+ **Step 5b — Update percentage** (modify the returned discounts in-place):
321
+
322
+ Take the `discounts` array from the query response and update only `discount.percentage` on each entry:
323
+ ```json
324
+ PATCH https://www.wixapis.com/ecom/v1/discount-rules/{id}
325
+ {
326
+ "discountRule": {
327
+ "id": "<id from query>",
328
+ "revision": "<revision from query>",
329
+ "discounts": [
330
+ {
331
+ "targetType": "SPECIFIC_ITEMS",
332
+ "specificItemsInfo": { "<scopes unchanged from query response>" },
333
+ "discount": {
334
+ "discountType": "PERCENTAGE",
335
+ "percentage": 10
336
+ }
337
+ }
338
+ ]
339
+ },
340
+ "mask": { "paths": ["discounts"] }
341
+ }
342
+ ```
343
+
344
+ > **Important**: Copy `targetType`, `specificItemsInfo.scopes` verbatim from the query response — do not reconstruct them. Only change `discount.discountType` and `discount.percentage`/`discount.fixedAmount`.
214
345
 
215
346
  ---
216
347
 
217
- ## Step 5: Deactivate or delete a discount rule
348
+ ## Step 6: Deactivate or delete a discount rule
218
349
 
219
350
  To deactivate without deleting:
220
351
  ```json
@@ -223,7 +354,8 @@ To deactivate without deleting:
223
354
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
224
355
  "revision": "2",
225
356
  "active": false
226
- }
357
+ },
358
+ "mask": { "paths": ["active"] }
227
359
  }
228
360
  ```
229
361
 
@@ -237,23 +369,28 @@ To delete permanently:
237
369
 
238
370
  | Field | Required | Notes |
239
371
  |---|---|---|
240
- | `name` | Yes | Internal name for the rule |
372
+ | `name` | Yes | Internal name for the rule. Filterable in query. |
241
373
  | `active` | Yes | Whether the rule is currently applied |
242
374
  | `activeTimeInfo.start` | No | ISO 8601 start time. Omit for immediate activation |
243
375
  | `activeTimeInfo.end` | No | ISO 8601 end time. Omit for no expiration |
244
- | `discounts[].discount.discountType` | Yes | `PERCENTAGE` or `FIXED_AMOUNT` |
376
+ | `discounts[].targetType` | Yes | Always `"SPECIFIC_ITEMS"` for standard rules |
377
+ | `discounts[].specificItemsInfo.scopes[]` | Yes | Array of scope objects — see Scope types below |
378
+ | `discounts[].discount.discountType` | Yes | `"PERCENTAGE"` or `"FIXED_AMOUNT"` or `"FIXED_PRICE"` |
245
379
  | `discounts[].discount.percentage` | If PERCENTAGE | Integer 1-100 |
246
380
  | `discounts[].discount.fixedAmount` | If FIXED_AMOUNT | Decimal string (e.g., `"5.00"`) |
247
- | `discounts[].scope.type` | Yes | `CATALOG`, `COLLECTION`, or `SPECIFIC_PRODUCTS` |
248
- | `discounts[].scope.id` | Yes | `"catalog"` for CATALOG type, or the collection/product UUID |
381
+ | `settings.appliesTo` | Yes on create | Always `"ALL_ITEMS"` |
382
+ | `revision` | On update/delete | Must match current value — fetch first |
383
+ | `mask.paths[]` | On update | Recommended — list fields being changed (e.g., `["discounts"]`, `["active"]`) |
249
384
 
250
385
  ## Scope types
251
386
 
252
- | Scope Type | `scope.id` value | Description |
253
- |---|---|---|
254
- | `CATALOG` | `"catalog"` | Applies to all products in the store |
255
- | `COLLECTION` | Collection UUID | Applies to all products in a specific collection |
256
- | `SPECIFIC_PRODUCTS` | Product UUID | Applies to a single product (use multiple discount entries for multiple products) |
387
+ | Scope | `type` | `id` prefix | When to use |
388
+ |---|---|---|---|
389
+ | All products | `"CATALOG_ITEM"` | `all_<appId>` | `catalogItemFilter.catalogAppId` only, no `catalogItemIds` |
390
+ | Specific products | `"CATALOG_ITEM"` | `specific_<appId>` | `catalogItemFilter.catalogAppId` + `catalogItemFilter.catalogItemIds` |
391
+ | Collection | `"CUSTOM_FILTER"` | `collections_<appId>` | `customFilter.appId` + `customFilter.params.collectionIds` |
392
+
393
+ **Store catalog app ID** (required in all scopes): `215238eb-22a5-4c36-9e7b-e7c08025e04e`
257
394
 
258
395
  ## Recommendation → API Mapping
259
396
 
@@ -11,16 +11,16 @@ description: Configures a pickup option for an online store so customers can cho
11
11
 
12
12
  ## Required APIs
13
13
 
14
- - [List Installed Delivery Carriers](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/list-installed-delivery-carriers)
15
- - [Query Delivery Profiles](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/query-delivery-profiles)
16
- - [Add Delivery Region](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/add-delivery-region)
17
- - [Add Delivery Carrier](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/add-delivery-carrier)
14
+ - [List Installed Delivery Carriers](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/api-shipping#list-installed-delivery-carriers)
15
+ - [Query Delivery Profiles](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/api-shipping#query-delivery-profiles)
16
+ - [Add Delivery Region](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/api-shipping#add-delivery-region)
17
+ - [Add Delivery Carrier](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/api-shipping#add-delivery-carrier)
18
18
 
19
19
  ---
20
20
 
21
21
  ## Step 1: Discover the Pickup carrier
22
22
 
23
- Call [List Installed Delivery Carriers](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/list-installed-delivery-carriers) to find the Pickup carrier's `id`.
23
+ Call [List Installed Delivery Carriers](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/api-shipping#list-installed-delivery-carriers) to find the Pickup carrier's `id`.
24
24
 
25
25
  **Endpoint**: `GET https://www.wixapis.com/ecom/v1/delivery-profiles/installed-carriers`
26
26
 
@@ -53,7 +53,7 @@ If no Pickup carrier appears in the list, the Pickup app is not installed on the
53
53
 
54
54
  ## Step 2: Find the default delivery profile
55
55
 
56
- Call [Query Delivery Profiles](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/query-delivery-profiles) to retrieve the site's default delivery profile.
56
+ Call [Query Delivery Profiles](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/api-shipping#query-delivery-profiles) to retrieve the site's default delivery profile.
57
57
 
58
58
  **Endpoint**: `POST https://www.wixapis.com/ecom/v1/delivery-profiles/query`
59
59
 
@@ -72,7 +72,7 @@ The response contains an array of `deliveryProfiles`. Find the one where `"defau
72
72
 
73
73
  ## Step 3: Add a delivery region for the pickup country
74
74
 
75
- If no region exists for the user's country in the default profile, call [Add Delivery Region](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/add-delivery-region) to create one.
75
+ If no region exists for the user's country in the default profile, call [Add Delivery Region](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/api-shipping#add-delivery-region) to create one.
76
76
 
77
77
  **Endpoint**: `POST https://www.wixapis.com/ecom/v1/delivery-profiles/{deliveryProfileId}/delivery-region`
78
78
 
@@ -130,7 +130,7 @@ Save the new region's `id` from the response.
130
130
 
131
131
  ## Step 4: Add the Pickup carrier to the region
132
132
 
133
- Call [Add Delivery Carrier](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/add-delivery-carrier) to attach the Pickup carrier to the delivery region.
133
+ Call [Add Delivery Carrier](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/api-shipping#add-delivery-carrier) to attach the Pickup carrier to the delivery region.
134
134
 
135
135
  **Endpoint**: `POST https://www.wixapis.com/ecom/v1/delivery-profiles/add-delivery-carrier`
136
136
 
@@ -205,5 +205,4 @@ Call [Add Delivery Carrier](https://dev.wix.com/docs/api-reference/business-solu
205
205
 
206
206
  ## Related Documentation
207
207
 
208
- - [Delivery Profiles: Introduction](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/introduction)
209
- - [Delivery Profiles: Sample Flows](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/shipping-delivery/delivery-profiles/sample-flows)
208
+ - [API: Shipping Delivery](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/skills/api-shipping)
@@ -61,6 +61,7 @@ flowchart TB
61
61
  setup-coupons
62
62
  setup-shipping-regions
63
63
  setup-shipping-rates
64
+ api-shipping
64
65
  end
65
66
 
66
67
  subgraph TrackingAPI["Tracking API"]
@@ -74,7 +75,7 @@ flowchart TB
74
75
  troubleshoot-checkout-delivery-dropoff
75
76
  end
76
77
 
77
- Config -.-> |"calls via CallWixSiteAPI / ReadFullDocsArticle"| API
78
+ Config -.-> |"calls via CallWixSiteAPI"| API
78
79
 
79
80
  subgraph API["Wix REST API Docs (dev.wix.com)"]
80
81
  D1["Discount Rules API"]
@@ -82,8 +83,6 @@ flowchart TB
82
83
  D3["Products V3 API"]
83
84
  D4["Categories API"]
84
85
  D5["Catalog Analytics"]
85
- S1["Delivery Profiles API"]
86
- S2["Shipping Options API"]
87
86
  S3["Pickup Locations API"]
88
87
  S4["Local Delivery API"]
89
88
  SD["Profile Service API (wix-profile-client)"]
@@ -100,7 +99,7 @@ flowchart TB
100
99
  class goal-increase-aov,goal-clear-inventory,goal-seasonal-revenue,goal-drive-cross-sells,goal-reduce-cart-abandonment goal
101
100
  class guardrail-discount-conflicts,guardrail-margin-protection,guardrail-shipping-health,guardrail-rate-pricing-sanity guardrail
102
101
  class flow-upsell-boost,flow-bundle-and-save,flow-stock-mover,flow-seasonal-promotion,flow-fix-coverage-gaps,flow-add-free-shipping,flow-optimize-shipping-rates flow
103
- class setup-discount-rules,setup-coupons,setup-shipping-regions,setup-shipping-rates,api-recommendation-tracking config
102
+ class setup-discount-rules,setup-coupons,setup-shipping-regions,setup-shipping-rates,api-recommendation-tracking,api-shipping config
104
103
  class recommend-ecommerce-strategy reco
105
104
  class recipe-apply-shipping-recommendations,setup-store-pickup-location,troubleshoot-discount-not-applying,troubleshoot-checkout-delivery-dropoff standalone
106
105
  class D1,D2,D3,D4,D5,S1,S2,S3,S4,SD apidoc
@@ -132,6 +131,7 @@ flowchart TB
132
131
  | `setup-coupons.md` | Step 4c (COUPON mechanism) |
133
132
  | `setup-shipping-regions.md` | flow-fix-coverage-gaps chain |
134
133
  | `setup-shipping-rates.md` | flow-add-free-shipping / optimize chains |
134
+ | `api-shipping.md` | Shipping flows (fix-coverage-gaps, add-free-shipping, optimize, recipe, setup-store-pickup) |
135
135
  | `recipe-apply-shipping-recommendations.md` | README direct entry |
136
136
  | `setup-store-pickup-location.md` | README direct entry |
137
137
  | `troubleshoot-discount-not-applying.md` | README direct entry |
@@ -4,6 +4,8 @@ description: Creates a form with fields (name, email, etc.) using the Form Schem
4
4
  ---
5
5
  # RECIPE: Create a Wix Form
6
6
 
7
+ > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Every actual call ALSO needs `wix-site-id: <SITE_ID>` and (for body-bearing requests) `Content-Type: application/json`. **POST against `form-schema-service/v4/forms` returns 403 without `wix-site-id`** — recipe examples below show `<AUTH>` only for brevity, but the header is required on every call you make. Token: `npx @wix/cli@latest token --site "$SITE_ID"`.
8
+
7
9
  Create a form on a Wix site that appears in the Forms & Submissions dashboard. The form collects visitor information (e.g., name, email) and can automatically upsert contacts on submission.
8
10
 
9
11
  ---
@@ -4,6 +4,8 @@ description: Uses bulk products endpoint to create multiple products with invent
4
4
  ---
5
5
  # RECIPE: Business Recipe - Bulk Creating Wix Store Products with inventory and options
6
6
 
7
+ > **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Every actual call ALSO needs `wix-site-id: <SITE_ID>` and (for body-bearing requests) `Content-Type: application/json`. **POST against `stores/v3/bulk/*` returns 403 without `wix-site-id`** — recipe examples below show `<AUTH>` only for brevity, but the header is required on every call you make. Token: `npx @wix/cli@latest token --site "$SITE_ID"`.
8
+
7
9
  Learn how to create multiple Wix store products with customizable options like colors, sizes, or other variants in a single bulk operation, allowing efficient creation of product catalogs.
8
10
 
9
11
  ---