@wix/agent-skills 1.0.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 (220) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -0
  3. package/package.json +29 -0
  4. package/skills/wix-app/SKILL.md +344 -0
  5. package/skills/wix-app/references/APP_IDENTIFIERS.md +35 -0
  6. package/skills/wix-app/references/APP_MARKET_REVIEW.md +311 -0
  7. package/skills/wix-app/references/APP_VALIDATION.md +171 -0
  8. package/skills/wix-app/references/BACKEND_API.md +233 -0
  9. package/skills/wix-app/references/BACKEND_EVENT.md +116 -0
  10. package/skills/wix-app/references/CODE_QUALITY.md +33 -0
  11. package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +587 -0
  12. package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +157 -0
  13. package/skills/wix-app/references/DASHBOARD_MODAL.md +283 -0
  14. package/skills/wix-app/references/DASHBOARD_PAGE.md +403 -0
  15. package/skills/wix-app/references/DASHBOARD_PLUGIN.md +205 -0
  16. package/skills/wix-app/references/DATA_COLLECTION.md +451 -0
  17. package/skills/wix-app/references/DOCUMENTATION.md +42 -0
  18. package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +65 -0
  19. package/skills/wix-app/references/EMBEDDED_SCRIPT.md +468 -0
  20. package/skills/wix-app/references/EXTENSION_REGISTRATION.md +96 -0
  21. package/skills/wix-app/references/SERVICE_PLUGIN.md +235 -0
  22. package/skills/wix-app/references/SITE_PLUGIN.md +436 -0
  23. package/skills/wix-app/references/STORES_VERSIONING.md +334 -0
  24. package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +84 -0
  25. package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +345 -0
  26. package/skills/wix-app/references/dashboard-menu-plugin/blog-slots.md +71 -0
  27. package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +58 -0
  28. package/skills/wix-app/references/dashboard-menu-plugin/crm-slots.md +8 -0
  29. package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +17 -0
  30. package/skills/wix-app/references/dashboard-menu-plugin/events-slots.md +29 -0
  31. package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +27 -0
  32. package/skills/wix-app/references/dashboard-menu-plugin/stores-slots.md +35 -0
  33. package/skills/wix-app/references/dashboard-page/API_SPEC.md +138 -0
  34. package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +573 -0
  35. package/skills/wix-app/references/dashboard-page/DYNAMIC_PARAMETERS.md +269 -0
  36. package/skills/wix-app/references/dashboard-page/ECOM_NAVIGATION.md +164 -0
  37. package/skills/wix-app/references/dashboard-plugin/SLOTS.md +294 -0
  38. package/skills/wix-app/references/data-collection/WIX_DATA.md +270 -0
  39. package/skills/wix-app/references/data-collection/extension-template.ts +107 -0
  40. package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +138 -0
  41. package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +454 -0
  42. package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +165 -0
  43. package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +576 -0
  44. package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +170 -0
  45. package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +6 -0
  46. package/skills/wix-app/references/editor-react-component/PARTS.md +25 -0
  47. package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +203 -0
  48. package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +167 -0
  49. package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +137 -0
  50. package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +112 -0
  51. package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +118 -0
  52. package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +87 -0
  53. package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +86 -0
  54. package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +135 -0
  55. package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +79 -0
  56. package/skills/wix-app/references/service-plugin/VALIDATIONS.md +68 -0
  57. package/skills/wix-app/references/site-plugin/EXAMPLES.md +311 -0
  58. package/skills/wix-app/references/site-plugin/SLOTS.md +263 -0
  59. package/skills/wix-design-system/SKILL.md +129 -0
  60. package/skills/wix-design-system/references/file-structure.md +56 -0
  61. package/skills/wix-design-system/scripts/wds.cjs +531 -0
  62. package/skills/wix-headless/SKILL.md +418 -0
  63. package/skills/wix-headless/references/DISCOVERY.md +332 -0
  64. package/skills/wix-headless/references/ORCHESTRATION.md +269 -0
  65. package/skills/wix-headless/references/SETUP.md +154 -0
  66. package/skills/wix-headless/references/blog/BLOG_CONTENT.md +152 -0
  67. package/skills/wix-headless/references/blog/BLOG_PAGES.md +299 -0
  68. package/skills/wix-headless/references/blog/BLOG_SETUP.md +218 -0
  69. package/skills/wix-headless/references/blog/INSTRUCTIONS.md +32 -0
  70. package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +373 -0
  71. package/skills/wix-headless/references/cms/FAQ_KNOWLEDGE_BASE.md +229 -0
  72. package/skills/wix-headless/references/cms/INSTRUCTIONS.md +40 -0
  73. package/skills/wix-headless/references/cms/PORTFOLIO.md +454 -0
  74. package/skills/wix-headless/references/cms/RESOURCE_LIBRARY.md +356 -0
  75. package/skills/wix-headless/references/cms/TEAM_DIRECTORY.md +299 -0
  76. package/skills/wix-headless/references/commands/install-app.md +42 -0
  77. package/skills/wix-headless/references/commands/known-apps.json +5 -0
  78. package/skills/wix-headless/references/commands/mcp-bootstrap.md +28 -0
  79. package/skills/wix-headless/references/designer/INSTRUCTIONS.md +828 -0
  80. package/skills/wix-headless/references/ecom/CART_PAGES.md +120 -0
  81. package/skills/wix-headless/references/ecom/CART_WIRING.md +103 -0
  82. package/skills/wix-headless/references/ecom/COMPONENTS_CSS.md +132 -0
  83. package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +59 -0
  84. package/skills/wix-headless/references/forms/CONTACT_FORM.md +477 -0
  85. package/skills/wix-headless/references/forms/INSTRUCTIONS.md +43 -0
  86. package/skills/wix-headless/references/gift-cards/COMPONENTS.md +119 -0
  87. package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +51 -0
  88. package/skills/wix-headless/references/gift-cards/PAGES.md +129 -0
  89. package/skills/wix-headless/references/images/INSTRUCTIONS.md +359 -0
  90. package/skills/wix-headless/references/shared/BUILD_NOISE.md +8 -0
  91. package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +185 -0
  92. package/skills/wix-headless/references/shared/IMPLEMENTER.md +155 -0
  93. package/skills/wix-headless/references/shared/MCP_PREFIX.md +105 -0
  94. package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +97 -0
  95. package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +423 -0
  96. package/skills/wix-headless/references/shared/STYLING.md +117 -0
  97. package/skills/wix-headless/references/stores/BACK_IN_STOCK.md +178 -0
  98. package/skills/wix-headless/references/stores/CATEGORY_PAGES.md +86 -0
  99. package/skills/wix-headless/references/stores/COMPONENTS_CSS.md +129 -0
  100. package/skills/wix-headless/references/stores/HOME_AND_NAV.md +227 -0
  101. package/skills/wix-headless/references/stores/INSTRUCTIONS.md +96 -0
  102. package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +249 -0
  103. package/skills/wix-headless/references/stores/PRODUCT_PAGES.md +213 -0
  104. package/skills/wix-headless/references/stores/SHARED_WIRING.md +164 -0
  105. package/skills/wix-headless/references/verticals/_schema.json +160 -0
  106. package/skills/wix-headless/references/verticals/_schema.md +185 -0
  107. package/skills/wix-headless/references/verticals/blog.md +125 -0
  108. package/skills/wix-headless/references/verticals/cms.md +121 -0
  109. package/skills/wix-headless/references/verticals/ecom.md +96 -0
  110. package/skills/wix-headless/references/verticals/forms.md +106 -0
  111. package/skills/wix-headless/references/verticals/gift-cards.md +121 -0
  112. package/skills/wix-headless/references/verticals/stores.md +167 -0
  113. package/skills/wix-headless/scripts/check-manifest.mjs +198 -0
  114. package/skills/wix-headless/scripts/copy-utility-templates.mjs +153 -0
  115. package/skills/wix-headless/scripts/emit-design-tokens.mjs +77 -0
  116. package/skills/wix-headless/scripts/finalize-run-json.mjs +141 -0
  117. package/skills/wix-headless/scripts/init-site-json.mjs +63 -0
  118. package/skills/wix-headless/scripts/patch-decorative-slots.mjs +124 -0
  119. package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +190 -0
  120. package/skills/wix-headless/scripts/preview.sh +45 -0
  121. package/skills/wix-headless/scripts/release.sh +73 -0
  122. package/skills/wix-headless/scripts/scaffold.sh +53 -0
  123. package/skills/wix-headless/scripts/seed-utilities.sh +55 -0
  124. package/skills/wix-headless/shared-utilities/analytics.ts +40 -0
  125. package/skills/wix-headless/shared-utilities/ricos.ts +179 -0
  126. package/skills/wix-headless/shared-utilities/wix-image.ts +72 -0
  127. package/skills/wix-headless/templates/ecom/CartBadge.tsx +84 -0
  128. package/skills/wix-headless/templates/ecom/CartView.tsx +543 -0
  129. package/skills/wix-headless/templates/ecom/cart.astro +13 -0
  130. package/skills/wix-headless/templates/ecom/components-ecom.css +215 -0
  131. package/skills/wix-headless/templates/ecom/discounts.ts +71 -0
  132. package/skills/wix-headless/templates/ecom/thank-you.astro +24 -0
  133. package/skills/wix-headless/templates/gift-cards/GiftCardPurchase.tsx +172 -0
  134. package/skills/wix-headless/templates/gift-cards/_home-teaser-snippet.astro +42 -0
  135. package/skills/wix-headless/templates/gift-cards/_nav-snippet.astro +11 -0
  136. package/skills/wix-headless/templates/gift-cards/components-gift-cards.css +219 -0
  137. package/skills/wix-headless/templates/gift-cards/gift-cards.astro +51 -0
  138. package/skills/wix-headless/templates/gift-cards/gift-cards.ts +75 -0
  139. package/skills/wix-headless/templates/stores/AddToCartButton.tsx +77 -0
  140. package/skills/wix-headless/templates/stores/BackInStockForm.tsx +176 -0
  141. package/skills/wix-headless/templates/stores/CategoryRail.astro +69 -0
  142. package/skills/wix-headless/templates/stores/ProductCard.astro +79 -0
  143. package/skills/wix-headless/templates/stores/ProductPurchase.tsx +397 -0
  144. package/skills/wix-headless/templates/stores/SeoTags.astro +21 -0
  145. package/skills/wix-headless/templates/stores/back-in-stock.ts +67 -0
  146. package/skills/wix-headless/templates/stores/categories.ts +155 -0
  147. package/skills/wix-headless/templates/stores/category/[slug].astro +130 -0
  148. package/skills/wix-headless/templates/stores/components-stores.css +295 -0
  149. package/skills/wix-headless/templates/stores/products/[slug].astro +128 -0
  150. package/skills/wix-headless/templates/stores/products/index.astro +101 -0
  151. package/skills/wix-manage/SKILL.md +280 -0
  152. package/skills/wix-manage/references/app-installation/install-wix-apps.md +155 -0
  153. package/skills/wix-manage/references/app-installation/list-installed-apps.md +124 -0
  154. package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +226 -0
  155. package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +95 -0
  156. package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +416 -0
  157. package/skills/wix-manage/references/bookings/bookings-staff-setup.md +255 -0
  158. package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +462 -0
  159. package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +278 -0
  160. package/skills/wix-manage/references/bookings/external-calendar-integration.md +258 -0
  161. package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +231 -0
  162. package/skills/wix-manage/references/calendar/configure-default-business-hours.md +226 -0
  163. package/skills/wix-manage/references/cms/cms-data-items-crud.md +422 -0
  164. package/skills/wix-manage/references/cms/cms-data-operations-extended.md +263 -0
  165. package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +136 -0
  166. package/skills/wix-manage/references/cms/cms-references-and-relationships.md +160 -0
  167. package/skills/wix-manage/references/cms/cms-schema-management.md +143 -0
  168. package/skills/wix-manage/references/contacts/bulk-delete-contacts.md +73 -0
  169. package/skills/wix-manage/references/contacts/bulk-label-and-unlabel-contacts.md +67 -0
  170. package/skills/wix-manage/references/domains/domain-search-and-purchase.md +434 -0
  171. package/skills/wix-manage/references/ecommerce/api-recommendation-tracking.md +420 -0
  172. package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +267 -0
  173. package/skills/wix-manage/references/ecommerce/flow-bundle-and-save.md +290 -0
  174. package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +300 -0
  175. package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +364 -0
  176. package/skills/wix-manage/references/ecommerce/flow-seasonal-promotion.md +315 -0
  177. package/skills/wix-manage/references/ecommerce/flow-stock-mover.md +308 -0
  178. package/skills/wix-manage/references/ecommerce/flow-upsell-boost.md +271 -0
  179. package/skills/wix-manage/references/ecommerce/goal-clear-inventory.md +118 -0
  180. package/skills/wix-manage/references/ecommerce/goal-drive-cross-sells.md +122 -0
  181. package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +132 -0
  182. package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +148 -0
  183. package/skills/wix-manage/references/ecommerce/goal-seasonal-revenue.md +146 -0
  184. package/skills/wix-manage/references/ecommerce/guardrail-discount-conflicts.md +118 -0
  185. package/skills/wix-manage/references/ecommerce/guardrail-margin-protection.md +88 -0
  186. package/skills/wix-manage/references/ecommerce/guardrail-rate-pricing-sanity.md +108 -0
  187. package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +124 -0
  188. package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +299 -0
  189. package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +582 -0
  190. package/skills/wix-manage/references/ecommerce/setup-coupons.md +338 -0
  191. package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +444 -0
  192. package/skills/wix-manage/references/ecommerce/setup-shipping-rates.md +86 -0
  193. package/skills/wix-manage/references/ecommerce/setup-shipping-regions.md +56 -0
  194. package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +209 -0
  195. package/skills/wix-manage/references/ecommerce/skill-graph.md +139 -0
  196. package/skills/wix-manage/references/ecommerce/troubleshoot-checkout-delivery-dropoff.md +124 -0
  197. package/skills/wix-manage/references/ecommerce/troubleshoot-discount-not-applying.md +95 -0
  198. package/skills/wix-manage/references/events/list-events.md +203 -0
  199. package/skills/wix-manage/references/forms/create-form.md +260 -0
  200. package/skills/wix-manage/references/get-paid/create-payment-links.md +212 -0
  201. package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +57 -0
  202. package/skills/wix-manage/references/get-paid/payment-links-for-bookings.md +101 -0
  203. package/skills/wix-manage/references/media/upload-media-to-wix.md +216 -0
  204. package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +77 -0
  205. package/skills/wix-manage/references/pricing-plans/pricing-plans-bookings-integration.md +166 -0
  206. package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +336 -0
  207. package/skills/wix-manage/references/rich-content/ricos-converter-service.md +295 -0
  208. package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +59 -0
  209. package/skills/wix-manage/references/sites/create-site-from-template.md +183 -0
  210. package/skills/wix-manage/references/sites/query-sites.md +125 -0
  211. package/skills/wix-manage/references/stores/add-store-pages-to-site.md +57 -0
  212. package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1041 -0
  213. package/skills/wix-manage/references/stores/create-product-catalog-v1.md +125 -0
  214. package/skills/wix-manage/references/stores/create-product-from-image.md +824 -0
  215. package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +566 -0
  216. package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +194 -0
  217. package/skills/wix-manage/references/stores/query-products-catalog-v1.md +80 -0
  218. package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +99 -0
  219. package/skills/wix-manage/references/stores/update-product-pre-order.md +213 -0
  220. package/skills/wix-manage/references/stores/update-product-with-options.md +318 -0
@@ -0,0 +1,318 @@
1
+ ---
2
+ name: "Update Product with Options (Catalog V3)"
3
+ description: Modifies existing products and variants using Catalog V3 Products API. Covers adding/removing option choices, variant-specific pricing, and revision-based updates to prevent conflicts.
4
+ ---
5
+ **RECIPE**: Business Recipe - Updating a Wix Store Product (Catalog V3)
6
+
7
+ Use this recipe to update an existing Catalog V3 product: description, media, options, variants, prices, or stock-related inventory records.
8
+
9
+ ## Before Any Product Update
10
+
11
+ Every Catalog V3 product update is revision-based:
12
+
13
+ - If the user gives a product name instead of a product ID, use [Search Products](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/search-products) and choose the exact product name match.
14
+ - Use [Get Product](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/get-product) to retrieve the current product and `product.revision`.
15
+ - Include `product.id` and the current `product.revision` in every [Update Product](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/update-product) PATCH body.
16
+ - For simple text/HTML description updates, prefer `plainDescription`. Use `description` only when sending a Rich Content object.
17
+
18
+ ### Find the product by name
19
+
20
+ ```bash
21
+ curl -X POST "https://www.wixapis.com/stores/v3/products/search" \
22
+ -H "Content-Type: application/json" \
23
+ -H "Authorization: <AUTH>" \
24
+ -d '{
25
+ "search": {
26
+ "expression": "Product name"
27
+ }
28
+ }'
29
+ ```
30
+
31
+ For product-name lookup, prefer Search Products before retrieving the product by ID.
32
+
33
+ ### Get the current revision
34
+
35
+ ```bash
36
+ curl -X GET "https://www.wixapis.com/stores/v3/products/{productId}" \
37
+ -H "Authorization: <AUTH>"
38
+ ```
39
+
40
+ ## Common Update Patterns
41
+
42
+ ### Update Description Only
43
+
44
+ For a normal user request like "set the product description to X", use `plainDescription` with valid HTML. The API converts it to rich content.
45
+
46
+ Do not send a plain string in `description`. `description` is a Rich Content object.
47
+
48
+ ```bash
49
+ curl -X PATCH "https://www.wixapis.com/stores/v3/products/{productId}" \
50
+ -H "Content-Type: application/json" \
51
+ -H "Authorization: <AUTH>" \
52
+ -d '{
53
+ "product": {
54
+ "id": "{productId}",
55
+ "revision": "{currentRevision}",
56
+ "plainDescription": "<p>A great product for everyone.</p>"
57
+ }
58
+ }'
59
+ ```
60
+
61
+ Use `description` only when you intentionally need to send Rich Content:
62
+
63
+ ```bash
64
+ curl -X PATCH "https://www.wixapis.com/stores/v3/products/{productId}" \
65
+ -H "Content-Type: application/json" \
66
+ -H "Authorization: <AUTH>" \
67
+ -d '{
68
+ "product": {
69
+ "id": "{productId}",
70
+ "revision": "{currentRevision}",
71
+ "description": {
72
+ "nodes": [
73
+ {
74
+ "type": "PARAGRAPH",
75
+ "id": "description",
76
+ "nodes": [
77
+ {
78
+ "type": "TEXT",
79
+ "textData": {
80
+ "text": "Updated product description."
81
+ }
82
+ }
83
+ ],
84
+ "paragraphData": {
85
+ "textStyle": {
86
+ "textAlignment": "AUTO"
87
+ }
88
+ }
89
+ }
90
+ ],
91
+ "metadata": {
92
+ "version": 1
93
+ }
94
+ }
95
+ }
96
+ }'
97
+ ```
98
+
99
+ ### Update Options and Variants
100
+
101
+ When adding or changing options and variants, send the full option definitions and one variant for each option-choice combination. Use `optionChoiceNames` to reference choices.
102
+
103
+ ```bash
104
+ curl -X PATCH "https://www.wixapis.com/stores/v3/products/{productId}" \
105
+ -H "Content-Type: application/json" \
106
+ -H "Authorization: <AUTH>" \
107
+ -d '{
108
+ "product": {
109
+ "id": "{productId}",
110
+ "revision": "{currentRevision}",
111
+ "options": [
112
+ {
113
+ "name": "Color",
114
+ "optionRenderType": "SWATCH_CHOICES",
115
+ "choicesSettings": {
116
+ "choices": [
117
+ {
118
+ "name": "White",
119
+ "choiceType": "ONE_COLOR",
120
+ "colorCode": "#FFFFFF"
121
+ },
122
+ {
123
+ "name": "Red",
124
+ "choiceType": "ONE_COLOR",
125
+ "colorCode": "#FF0000"
126
+ },
127
+ {
128
+ "name": "Black",
129
+ "choiceType": "ONE_COLOR",
130
+ "colorCode": "#000000"
131
+ }
132
+ ]
133
+ }
134
+ }
135
+ ],
136
+ "variantsInfo": {
137
+ "variants": [
138
+ {
139
+ "choices": [
140
+ {
141
+ "optionChoiceNames": {
142
+ "optionName": "Color",
143
+ "choiceName": "White",
144
+ "renderType": "SWATCH_CHOICES"
145
+ }
146
+ }
147
+ ],
148
+ "price": {
149
+ "actualPrice": {
150
+ "amount": "270.00"
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "choices": [
156
+ {
157
+ "optionChoiceNames": {
158
+ "optionName": "Color",
159
+ "choiceName": "Red",
160
+ "renderType": "SWATCH_CHOICES"
161
+ }
162
+ }
163
+ ],
164
+ "price": {
165
+ "actualPrice": {
166
+ "amount": "270.00"
167
+ }
168
+ }
169
+ },
170
+ {
171
+ "choices": [
172
+ {
173
+ "optionChoiceNames": {
174
+ "optionName": "Color",
175
+ "choiceName": "Black",
176
+ "renderType": "SWATCH_CHOICES"
177
+ }
178
+ }
179
+ ],
180
+ "price": {
181
+ "actualPrice": {
182
+ "amount": "270.00"
183
+ }
184
+ }
185
+ }
186
+ ]
187
+ }
188
+ }
189
+ }'
190
+ ```
191
+
192
+ When updating existing variants, include each existing variant `id`. If no GUID is passed, a variant is created with a new GUID.
193
+
194
+ ### Convert a Simple Product to Color Variants
195
+
196
+ When adding the first option to a simple product, do not preserve a choice-less default variant unchanged. A simple product often has one existing variant with price or stock but no `choices`. After you add a `Color` option, every variant in `variantsInfo.variants` must include choices that match the product options.
197
+
198
+ Use the existing default variant as source data only. For example, copy its price if the user did not ask to change price, then send a complete optioned variants list where each variant has:
199
+
200
+ ```json
201
+ {
202
+ "choices": [
203
+ {
204
+ "optionChoiceNames": {
205
+ "optionName": "Color",
206
+ "choiceName": "Red",
207
+ "renderType": "SWATCH_CHOICES"
208
+ }
209
+ }
210
+ ],
211
+ "price": {
212
+ "actualPrice": {
213
+ "amount": "{existingOrRequestedPrice}"
214
+ }
215
+ }
216
+ }
217
+ ```
218
+
219
+ After the product update returns the new variant IDs, use those IDs to set inventory.
220
+
221
+ ### Set Stock for New Variants
222
+
223
+ Inventory is handled separately from product updates. After the product update returns variant IDs, use [Bulk Create Inventory Items](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/inventory-items-v3/bulk-create-inventory-items) with `productId`, `variantId`, and `quantity`.
224
+
225
+ If the store has multiple inventory locations, include `locationId`; otherwise the store's default location is used.
226
+ After bulk inventory create, check `bulkActionMetadata.totalSuccesses` and `results[].itemMetadata.success`. Returned inventory entities are under `results[].item`, not a top-level `inventoryItems` field; confirm stock from `results[].item.quantity`.
227
+
228
+ ```bash
229
+ curl -X POST "https://www.wixapis.com/stores/v3/bulk/inventory-items/create" \
230
+ -H "Content-Type: application/json" \
231
+ -H "Authorization: <AUTH>" \
232
+ -d '{
233
+ "inventoryItems": [
234
+ {
235
+ "productId": "{productId}",
236
+ "variantId": "{redVariantId}",
237
+ "quantity": 10
238
+ },
239
+ {
240
+ "productId": "{productId}",
241
+ "variantId": "{blueVariantId}",
242
+ "quantity": 10
243
+ }
244
+ ],
245
+ "returnEntity": true
246
+ }'
247
+ ```
248
+
249
+ ### Update Media Only
250
+
251
+ ```bash
252
+ curl -X PATCH "https://www.wixapis.com/stores/v3/products/{productId}" \
253
+ -H "Content-Type: application/json" \
254
+ -H "Authorization: <AUTH>" \
255
+ -d '{
256
+ "product": {
257
+ "id": "{productId}",
258
+ "revision": "{currentRevision}",
259
+ "media": {
260
+ "itemsInfo": {
261
+ "items": [
262
+ {
263
+ "url": "https://static.wixstatic.com/media/your-image.jpg",
264
+ "altText": "Product image"
265
+ }
266
+ ]
267
+ }
268
+ }
269
+ }
270
+ }'
271
+ ```
272
+
273
+ ### Update Variant Price Only
274
+
275
+ ```bash
276
+ curl -X PATCH "https://www.wixapis.com/stores/v3/products/{productId}" \
277
+ -H "Content-Type: application/json" \
278
+ -H "Authorization: <AUTH>" \
279
+ -d '{
280
+ "product": {
281
+ "id": "{productId}",
282
+ "revision": "{currentRevision}",
283
+ "variantsInfo": {
284
+ "variants": [
285
+ {
286
+ "id": "{existingVariantId}",
287
+ "price": {
288
+ "actualPrice": {
289
+ "amount": "29.99"
290
+ }
291
+ }
292
+ }
293
+ ]
294
+ }
295
+ }
296
+ }'
297
+ ```
298
+
299
+ ## Important Notes
300
+
301
+ - To update array fields like `options`, `modifiers`, `variantsInfo.variants`, and any others, pass the entire existing array. Passing only the changed item overwrites the whole array.
302
+ - To update `variantsInfo.variants`, also pass `options`, and vice versa. Variants and options are mutually dependent and must stay aligned.
303
+ - When converting a simple product to an optioned product, rebuild the variants list so every variant has `choices`; do not keep an existing choice-less default variant unchanged.
304
+ - Always include `choicesSettings` with the complete list of choices when updating a product with options.
305
+ - Use `optionChoiceNames` rather than `optionChoiceIds` in variants for more reliable updates.
306
+ - Include the `renderType` in `optionChoiceNames`.
307
+
308
+ ## Error Message Reference
309
+
310
+ | Error Message | Meaning | Fix |
311
+ |---------------|---------|-----|
312
+ | `revision must not be empty` | Missing optimistic lock | GET product first and include `product.revision` in PATCH |
313
+ | `revision mismatch` | Stale revision | Re-GET product and retry with the new revision |
314
+ | `Expected an object` for `description` | Sent `description` as a string | Use `plainDescription` for HTML strings, or send `description` as Rich Content |
315
+ | `choicesSettings must not be empty` | Missing choices array | Include full `choicesSettings.choices` array |
316
+ | `Missing product option choices` | Variant references non-existent option | Use `optionChoiceNames` with exact option and choice names |
317
+ | `price must not be empty` | A variant was created or replaced without a price | Include `price.actualPrice.amount` on every new variant |
318
+ | `Missing option choices` or `INVALID_DEFAULT_VARIANT` | Product has options but at least one variant has no matching choices | Rebuild `variantsInfo.variants` so every variant includes choices for all product options |