@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,566 @@
1
+ ---
2
+ name: "Create Product with Options (Catalog V3)"
3
+ description: Single product creation with options using Catalog V3 Products API. Covers option types (TEXT_CHOICES, SWATCH_CHOICES), choice configuration, and automatic variant generation.
4
+ ---
5
+ # RECIPE: Business Recipe - Creating a Wix Store Product with options (Catalog V3)
6
+
7
+ Learn how to create a Wix store product with customizable options like colors, sizes, or other variants, allowing customers to select their preferences when purchasing.
8
+
9
+ ---
10
+
11
+ ## Article: Steps for creating a Wix Store Product with Options
12
+
13
+ ## STEP 1: create the product with options and variants
14
+
15
+ 1. create the product with options and create variants for them - Wix REST API: [Create Product](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/create-product) **CRITICAL: USE THIS WORKING EXAMPLE**
16
+
17
+ ```bash
18
+ curl -X POST 'https://www.wixapis.com/stores/v3/products' \
19
+ -H 'Content-Type: application/json' \
20
+ -H 'Authorization: <AUTH>' \
21
+ -d '{
22
+ "product": {
23
+ "name": "Air Max Runner",
24
+ "description": {
25
+ "nodes": [
26
+ {
27
+ "type": "PARAGRAPH",
28
+ "id": "desc1",
29
+ "nodes": [
30
+ {
31
+ "type": "TEXT",
32
+ "textData": {
33
+ "text": "Premium running sneaker with advanced cushioning technology and breathable mesh design for ultimate comfort."
34
+ }
35
+ }
36
+ ],
37
+ "paragraphData": {
38
+ "textStyle": {
39
+ "textAlignment": "AUTO"
40
+ }
41
+ }
42
+ }
43
+ ],
44
+ "metadata": {
45
+ "version": 1,
46
+ "id": "sneaker-desc-001"
47
+ }
48
+ },
49
+ "productType": "PHYSICAL",
50
+ "physicalProperties": {},
51
+ "media": {
52
+ "main": {
53
+ "url": "https://images.unsplash.com/photo-1549298916-b41d501d3772?w=400&h=400&fit=crop&crop=center",
54
+ "altText": "Air Max Runner - Main Product Image"
55
+ },
56
+ "itemsInfo": {
57
+ "items": [
58
+ {
59
+ "url": "https://images.unsplash.com/photo-1549298916-b41d501d3772?w=400&h=400&fit=crop&crop=center",
60
+ "altText": "Air Max Runner - Product View"
61
+ }
62
+ ]
63
+ }
64
+ },
65
+ "options": [
66
+ {
67
+ "name": "Size",
68
+ "optionRenderType": "TEXT_CHOICES",
69
+ "choicesSettings": {
70
+ "choices": [
71
+ {
72
+ "choiceType": "CHOICE_TEXT",
73
+ "name": "8"
74
+ },
75
+ {
76
+ "choiceType": "CHOICE_TEXT",
77
+ "name": "9"
78
+ },
79
+ {
80
+ "choiceType": "CHOICE_TEXT",
81
+ "name": "10"
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ {
87
+ "name": "Color",
88
+ "optionRenderType": "TEXT_CHOICES",
89
+ "choicesSettings": {
90
+ "choices": [
91
+ {
92
+ "choiceType": "CHOICE_TEXT",
93
+ "name": "Black"
94
+ },
95
+ {
96
+ "choiceType": "CHOICE_TEXT",
97
+ "name": "White"
98
+ }
99
+ ]
100
+ }
101
+ }
102
+ ],
103
+ "variantsInfo": {
104
+ "variants": [
105
+ {
106
+ "choices": [
107
+ {
108
+ "optionChoiceNames": {
109
+ "optionName": "Size",
110
+ "choiceName": "8",
111
+ "renderType": "TEXT_CHOICES"
112
+ }
113
+ },
114
+ {
115
+ "optionChoiceNames": {
116
+ "optionName": "Color",
117
+ "choiceName": "Black",
118
+ "renderType": "TEXT_CHOICES"
119
+ }
120
+ }
121
+ ],
122
+ "price": {
123
+ "actualPrice": {
124
+ "amount": "129.99"
125
+ }
126
+ },
127
+ "physicalProperties": {},
128
+ "visible": true
129
+ },
130
+ {
131
+ "choices": [
132
+ {
133
+ "optionChoiceNames": {
134
+ "optionName": "Size",
135
+ "choiceName": "8",
136
+ "renderType": "TEXT_CHOICES"
137
+ }
138
+ },
139
+ {
140
+ "optionChoiceNames": {
141
+ "optionName": "Color",
142
+ "choiceName": "White",
143
+ "renderType": "TEXT_CHOICES"
144
+ }
145
+ }
146
+ ],
147
+ "price": {
148
+ "actualPrice": {
149
+ "amount": "129.99"
150
+ }
151
+ },
152
+ "physicalProperties": {},
153
+ "visible": false
154
+ },
155
+ {
156
+ "choices": [
157
+ {
158
+ "optionChoiceNames": {
159
+ "optionName": "Size",
160
+ "choiceName": "9",
161
+ "renderType": "TEXT_CHOICES"
162
+ }
163
+ },
164
+ {
165
+ "optionChoiceNames": {
166
+ "optionName": "Color",
167
+ "choiceName": "Black",
168
+ "renderType": "TEXT_CHOICES"
169
+ }
170
+ }
171
+ ],
172
+ "price": {
173
+ "actualPrice": {
174
+ "amount": "129.99"
175
+ }
176
+ },
177
+ "physicalProperties": {},
178
+ "visible": false
179
+ },
180
+ {
181
+ "choices": [
182
+ {
183
+ "optionChoiceNames": {
184
+ "optionName": "Size",
185
+ "choiceName": "9",
186
+ "renderType": "TEXT_CHOICES"
187
+ }
188
+ },
189
+ {
190
+ "optionChoiceNames": {
191
+ "optionName": "Color",
192
+ "choiceName": "White",
193
+ "renderType": "TEXT_CHOICES"
194
+ }
195
+ }
196
+ ],
197
+ "price": {
198
+ "actualPrice": {
199
+ "amount": "129.99"
200
+ }
201
+ },
202
+ "physicalProperties": {},
203
+ "visible": true
204
+ },
205
+ {
206
+ "choices": [
207
+ {
208
+ "optionChoiceNames": {
209
+ "optionName": "Size",
210
+ "choiceName": "10",
211
+ "renderType": "TEXT_CHOICES"
212
+ }
213
+ },
214
+ {
215
+ "optionChoiceNames": {
216
+ "optionName": "Color",
217
+ "choiceName": "Black",
218
+ "renderType": "TEXT_CHOICES"
219
+ }
220
+ }
221
+ ],
222
+ "price": {
223
+ "actualPrice": {
224
+ "amount": "129.99"
225
+ }
226
+ },
227
+ "physicalProperties": {},
228
+ "visible": true
229
+ },
230
+ {
231
+ "choices": [
232
+ {
233
+ "optionChoiceNames": {
234
+ "optionName": "Size",
235
+ "choiceName": "10",
236
+ "renderType": "TEXT_CHOICES"
237
+ }
238
+ },
239
+ {
240
+ "optionChoiceNames": {
241
+ "optionName": "Color",
242
+ "choiceName": "White",
243
+ "renderType": "TEXT_CHOICES"
244
+ }
245
+ }
246
+ ],
247
+ "price": {
248
+ "actualPrice": {
249
+ "amount": "129.99"
250
+ }
251
+ },
252
+ "physicalProperties": {},
253
+ "visible": false
254
+ }
255
+ ]
256
+ }
257
+ }
258
+ }'
259
+ ```
260
+
261
+ ### IMPORTANT NOTES:
262
+
263
+ When Creating a product YOU MUST leave the physicalProperties and all other non required fields empty. for example: "physicalProperties": {}. In most cases the product will be a physical product, and therefore MUST have the empty physicalProperties object ("physicalProperties": {}) and a corresponding "productType": "PHYSICAL".
264
+
265
+ **CRITICAL: variantsInfo is Always Required**
266
+ `variantsInfo.variants` must contain at least one variant, even for simple products without options. Omitting it causes: `"variantsInfo must not be empty"`.
267
+
268
+ **CRITICAL: Description Format**If you include a description, it MUST use Wix's rich text nodes structure, NOT a plain string. Plain strings will cause "Expected an object" API errors.
269
+
270
+ **WRONG:** `"description": "Your text here"` **CORRECT:**
271
+
272
+ ```json
273
+ "description": {
274
+ "nodes": [
275
+ {
276
+ "type": "PARAGRAPH",
277
+ "id": "desc1",
278
+ "nodes": [
279
+ {
280
+ "type": "TEXT",
281
+ "textData": {
282
+ "text": "Your product description here"
283
+ }
284
+ }
285
+ ],
286
+ "paragraphData": {
287
+ "textStyle": {
288
+ "textAlignment": "AUTO"
289
+ }
290
+ }
291
+ }
292
+ ],
293
+ "metadata": {
294
+ "version": 1,
295
+ "id": "unique-desc-id"
296
+ }
297
+ }
298
+ ```
299
+
300
+ **CRITICAL: Media Format**
301
+ To add product images, use the `media` object with `main` for the primary image and `itemsInfo.items` for additional gallery images. **YOU MUST** add an image to each product.
302
+
303
+ > **Important:** The V3 Products API requires **URLs** for media, not media IDs. Even when using files from the Media Manager, you must use the full wixstatic.com URL.
304
+
305
+ **Option 1: Using External URLs Directly**
306
+
307
+ You can reference images directly from external URLs that allow hotlinking (e.g., Unsplash, Pexels):
308
+
309
+ ```json
310
+ "media": {
311
+ "main": {
312
+ "url": "https://images.unsplash.com/photo-1549298916-b41d501d3772?w=400",
313
+ "altText": "Product Main Image"
314
+ },
315
+ "itemsInfo": {
316
+ "items": [
317
+ {
318
+ "url": "https://images.unsplash.com/photo-1549298916-b41d501d3772?w=400",
319
+ "altText": "Product View"
320
+ }
321
+ ]
322
+ }
323
+ }
324
+ ```
325
+
326
+ > **Warning:** Some external URLs may fail if the source server blocks requests or has hotlink protection. For reliable media, use Option 2.
327
+
328
+ **Option 2: Using Media Manager (Recommended)**
329
+
330
+ For reliable, permanent media storage, first upload the image to the site's Media Manager, then use the returned wixstatic.com URL.
331
+
332
+ **Step 1:** Upload the image to Media Manager using the Import File API:
333
+
334
+ ```bash
335
+ curl -X POST 'https://www.wixapis.com/site-media/v1/files/import' \
336
+ -H 'Content-Type: application/json' \
337
+ -H 'Authorization: <AUTH>' \
338
+ -d '{
339
+ "url": "https://images.unsplash.com/photo-1563729784474-d77dbb933a9e?w=400",
340
+ "mimeType": "image/jpeg",
341
+ "displayName": "Product Image"
342
+ }'
343
+ ```
344
+
345
+ Response includes the wixstatic.com URL:
346
+
347
+ ```json
348
+ {
349
+ "file": {
350
+ "id": "e6a89e_19dae9fef9bb48a6b5e392d0d2e5b95d~mv2.jpg",
351
+ "url": "https://static.wixstatic.com/media/e6a89e_19dae9fef9bb48a6b5e392d0d2e5b95d~mv2.jpg",
352
+ "operationStatus": "PENDING"
353
+ }
354
+ }
355
+ ```
356
+
357
+ > **Note:** Wait for `operationStatus` to become `READY` before using the media. You can verify by calling the List Files API (`GET /site-media/v1/files`).
358
+
359
+ **Step 2:** Use the wixstatic.com **URL** (not the ID) when creating the product:
360
+
361
+ ```json
362
+ "media": {
363
+ "main": {
364
+ "url": "https://static.wixstatic.com/media/e6a89e_19dae9fef9bb48a6b5e392d0d2e5b95d~mv2.jpg",
365
+ "altText": "Product Image"
366
+ },
367
+ "itemsInfo": {
368
+ "items": [
369
+ {
370
+ "url": "https://static.wixstatic.com/media/e6a89e_19dae9fef9bb48a6b5e392d0d2e5b95d~mv2.jpg",
371
+ "altText": "Product Image"
372
+ }
373
+ ]
374
+ }
375
+ }
376
+ ```
377
+
378
+ > **Why use Media Manager?** External URLs can fail if the source server blocks requests. Once uploaded to Media Manager, the file is permanently stored on Wix servers and the wixstatic.com URL is always reliable.
379
+
380
+ **CRITICAL: Options Structure**Each option MUST include:
381
+
382
+ * `optionRenderType`: "TEXT_CHOICES" for text-based choices
383
+ * `choicesSettings`: Object containing the choices array
384
+ * `choicesSettings.choices`: Array with at least one choice
385
+ * Each choice MUST have `choiceType`: "CHOICE_TEXT" and `name` properties
386
+
387
+ **CRITICAL: Variants Structure**
388
+
389
+ * Create one variant for EVERY combination of option choices (Cartesian product of all options)
390
+ * In this example: 2 colors and 3 sizes creates 6 variants (2 x 3) - all combinations must be included
391
+ * Each variant must reference ALL options defined on the product
392
+ * Use `optionChoiceNames` structure with `optionName`, `choiceName`, and `renderType`
393
+ * Price must use `price.actualPrice.amount` with string values
394
+ * Use `visible: true` for variants you want customers to see and purchase
395
+ * Use `visible: false` for variants that exist but should be hidden from customers
396
+
397
+ The Create Product API can handle creating customizations and choices in a single call. There's no need to separately check for existing customizations, create new ones, or add choices to them—the API handles all of this automatically:
398
+
399
+ 1. If you provide an option with a name that doesn't exist as a customization, a new customization will be created
400
+ 2. If a customization with that name already exists, it will be associated with the product
401
+ 3. New choices will be added to the customization if they don't exist
402
+ 4. When creating variants, use optionChoiceNames rather than optionChoiceIds to reference the options and choices
403
+ 5. Always include the choicesSettings object with the complete list of choices
404
+ 6. You must create one variant for each combination of option choices
405
+
406
+ ### Next Steps:
407
+
408
+ After Creating the product, verify that the options appear correctly in the store and that customers can select different variants.
409
+
410
+ > **Need to Update This Product Later?**
411
+ >
412
+ > See [Update Product with Options](update-product-with-options.md) for updating existing products.
413
+ >
414
+ > **Important:** All update operations (PATCH) require the current `product.revision` value. Always GET the product first to obtain the revision before updating.
415
+
416
+ ## Troubleshooting Common Issues
417
+
418
+ ### Issue 1: "ChoicesSettings must not be empty" error
419
+
420
+ * **Problem**: When creating a product with options, you get an error saying `choicesSettings must not be empty`. This can appear in several forms:
421
+ * `"product is invalid: options [at index 0] is invalid: value choicesSettings must not be empty"`
422
+ * `"product is invalid: options [at index 0] is invalid: value choicesSettings must not be empty"` with `"violatedRule":"REQUIRED_ONE_OF_FIELD"`
423
+ * `"choicesSettings must not be empty"` with field violations showing `"supported":["choicesSettings"]`
424
+ * **Solution**: Always include the `choicesSettings` object with the full array of `choices` when creating a product with options. Every option MUST have a complete choicesSettings structure with at least one choice, even when using an existing customization.
425
+
426
+ **Common Causes:**
427
+
428
+ 1. **Missing choicesSettings entirely** - The option object doesn't include any choicesSettings
429
+ 2. **Empty choicesSettings object** - The choicesSettings exists but has no choices array or empty choices array
430
+ 3. **Null or undefined choicesSettings** - The choicesSettings field is present but set to null/undefined
431
+
432
+ **Example of correct choicesSettings structure:**
433
+
434
+ ```json
435
+ "options": [
436
+ {
437
+ "name": "Size",
438
+ "optionRenderType": "TEXT_CHOICES",
439
+ "choicesSettings": {
440
+ "choices": [
441
+ {
442
+ "choiceType": "CHOICE_TEXT",
443
+ "name": "Small"
444
+ }
445
+ ]
446
+ }
447
+ }
448
+ ]
449
+ ```
450
+
451
+ **What NOT to do:**
452
+
453
+ ```json
454
+ // WRONG - Missing choicesSettings entirely
455
+ "options": [
456
+ {
457
+ "name": "Size",
458
+ "optionRenderType": "TEXT_CHOICES"
459
+ }
460
+ ]
461
+
462
+ // WRONG - Empty choicesSettings
463
+ "options": [
464
+ {
465
+ "name": "Size",
466
+ "optionRenderType": "TEXT_CHOICES",
467
+ "choicesSettings": {}
468
+ }
469
+ ]
470
+
471
+ // WRONG - Empty choices array
472
+ "options": [
473
+ {
474
+ "name": "Size",
475
+ "optionRenderType": "TEXT_CHOICES",
476
+ "choicesSettings": {
477
+ "choices": []
478
+ }
479
+ }
480
+ ]
481
+ ```
482
+
483
+ ### Issue 2: "optionSettings.choicesSettings.choices must not be empty" error
484
+
485
+ * **Problem**: You get an error like `"product is invalid: options [at index 0] is invalid: optionSettings.choicesSettings is invalid: choices has size 0, expected 1 or more"` or `"choices must not be empty"`.
486
+ * **Solution**: This error occurs when using the incorrect nested structure `optionSettings.choicesSettings` instead of the correct `choicesSettings` directly under the option.
487
+
488
+ **WRONG Structure (causes the error):**
489
+
490
+ ```json
491
+ "options": [
492
+ {
493
+ "name": "Size",
494
+ "optionRenderType": "TEXT_CHOICES",
495
+ "optionSettings": {
496
+ "choicesSettings": {
497
+ "choices": []
498
+ }
499
+ }
500
+ }
501
+ ]
502
+ ```
503
+
504
+ **CORRECT Structure (use this instead):**
505
+
506
+ ```json
507
+ "options": [
508
+ {
509
+ "name": "Size",
510
+ "optionRenderType": "TEXT_CHOICES",
511
+ "choicesSettings": {
512
+ "choices": [
513
+ {
514
+ "choiceType": "CHOICE_TEXT",
515
+ "name": "Small"
516
+ }
517
+ ]
518
+ }
519
+ }
520
+ ]
521
+ ```
522
+
523
+ **Key Points:**
524
+
525
+ * Use `choicesSettings` directly under the option object, NOT nested under `optionSettings`
526
+ * The `choicesSettings.choices` array MUST contain at least one choice
527
+ * Each choice MUST have `choiceType` and `name` properties
528
+ * Always include the complete choices array even when referencing existing customizations
529
+
530
+ ### Issue 3: Variants not matching options
531
+
532
+ * **Problem**: The API returns errors about variants not matching the product's options.
533
+ * **Solution**:
534
+ * Create one variant for each possible combination of option choices
535
+ * Ensure each variant references all options defined on the product
536
+ * If the product has only one option with three choices, you need three variants
537
+ * Make sure each variant's option choice name exactly matches the corresponding option choice
538
+
539
+ ### Issue 4: Conflicts when using existing customizations
540
+
541
+ * **Problem**: When attempting to use existing customizations, you encounter name conflicts or choice conflicts.
542
+ * **Solution**:
543
+ * If you need to use a specific existing customization ID, first query customizations to get the correct ID
544
+ * When working with existing customizations, ensure all choices you reference actually exist in that customization
545
+ * If you're creating a new customization with the same name as an existing one, the API will use the existing one
546
+ * Be aware that customizations are shared across all products in your store
547
+
548
+ ### Issue 5: "Expected an object" error for description
549
+
550
+ * **Problem**: Using a plain string for the description field causes API failure.
551
+ * **Solution**: Always use the rich text nodes structure for descriptions as shown in the CRITICAL section above.
552
+
553
+ ### Issue 6: Inconsistencies in documentation vs. actual API behavior
554
+
555
+ * **Problem**: Several API requirements are not well-documented or are documented differently from how the API actually behaves.
556
+ * **Solution**:
557
+ * Always include choicesSettings with all choices when creating a product
558
+ * Use optionChoiceNames rather than optionChoiceIds in variants for more reliable results
559
+ * Include the renderType in optionChoiceNames
560
+ * Use the exact same choice names as defined in the customization
561
+
562
+ ## Conclusion
563
+
564
+ Creating a Wix store product with options involves understanding the relationship between store-wide customizations and product-specific options and variants. The key is to ensure consistency between customization definitions, product options, and product variants.
565
+
566
+ By following this recipe and being aware of the common pitfalls, you can successfully create a Wix store product with options.