@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,136 @@
1
+ ---
2
+ name: "CMS eCommerce Catalog Integration"
3
+ description: The recommended way to sell existing CMS collection items (tickets, bookings, memberships) through Wix checkout. Add the CATALOG plugin to convert any CMS collection into purchasable products with cart and payment integration.
4
+ ---
5
+ # CMS eCommerce Catalog Integration
6
+
7
+ This recipe documents how to convert CMS collections into sellable product catalogs that integrate with Wix eCommerce (cart, checkout, orders).
8
+
9
+ ## Overview
10
+
11
+ Converting a CMS collection to a catalog enables:
12
+ - Items in the collection become purchasable products
13
+ - Integration with Wix Cart and Checkout APIs
14
+ - Real-time price and availability from your CMS data
15
+
16
+ ## Prerequisites
17
+
18
+ Your collection needs these fields (or mappable equivalents):
19
+ - **Name field** (TEXT) - Product display name
20
+ - **Price field** (NUMBER) - Product price
21
+
22
+ Optional catalog fields:
23
+ - **Description** (TEXT) - Product description
24
+ - **Image** (IMAGE) - Product image
25
+ - **URL** (URL) - Product link
26
+ - **Quantity** (NUMBER) - Inventory quantity
27
+
28
+ ## Step 1: Add CATALOG Plugin to Collection
29
+
30
+ ### API Endpoint
31
+
32
+ ```
33
+ POST https://www.wixapis.com/wix-data/v2/collections/add-plugin
34
+ ```
35
+
36
+ ### Example: Convert Collection with Custom Field Names
37
+
38
+ ```json
39
+ {
40
+ "dataCollectionId": "Products",
41
+ "plugin": {
42
+ "type": "CATALOG",
43
+ "catalogOptions": {
44
+ "name": "title",
45
+ "price": "price",
46
+ "description": "description"
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ ### Example: Full Catalog with All Optional Fields
53
+
54
+ ```json
55
+ {
56
+ "dataCollectionId": "Products",
57
+ "plugin": {
58
+ "type": "CATALOG",
59
+ "catalogOptions": {
60
+ "name": "itemName",
61
+ "price": "itemPrice",
62
+ "description": "itemDescription",
63
+ "image": "itemImage",
64
+ "url": "itemUrl",
65
+ "quantity": "itemQuantity"
66
+ }
67
+ }
68
+ }
69
+ ```
70
+
71
+ ## Step 2: Verify eCommerce App is Installed
72
+
73
+ Most Wix sites with Stores, Bookings, or similar apps already have eCommerce installed. Check by querying the Cart API:
74
+
75
+ ```
76
+ POST https://www.wixapis.com/ecom/v1/carts
77
+ ```
78
+
79
+ ## Step 3: Use Catalog Items in Cart
80
+
81
+ ### CMS App ID (for catalogReference)
82
+
83
+ ```
84
+ e593b0bd-b783-45b8-97c2-873d42aacaf4
85
+ ```
86
+
87
+ ### Add CMS Catalog Item to Cart
88
+
89
+ ```
90
+ POST https://www.wixapis.com/ecom/v1/carts/{cartId}/add-to-cart
91
+ ```
92
+
93
+ ```json
94
+ {
95
+ "lineItems": [
96
+ {
97
+ "catalogReference": {
98
+ "appId": "e593b0bd-b783-45b8-97c2-873d42aacaf4",
99
+ "catalogItemId": "<cms-item-id>"
100
+ },
101
+ "quantity": 1
102
+ }
103
+ ]
104
+ }
105
+ ```
106
+
107
+ ## Removing CATALOG Plugin
108
+
109
+ ```
110
+ POST https://www.wixapis.com/wix-data/v2/collections/delete-plugin
111
+ ```
112
+
113
+ ```json
114
+ {
115
+ "dataCollectionId": "Products",
116
+ "pluginType": "CATALOG"
117
+ }
118
+ ```
119
+
120
+ ## Differences from Wix Stores
121
+
122
+ | Feature | CMS Catalog | Wix Stores |
123
+ |---------|-------------|------------|
124
+ | Product management | CMS collections | Stores dashboard |
125
+ | Variants | Manual (separate items) | Built-in variant system |
126
+ | Inventory tracking | Manual via quantity field | Automatic |
127
+ | Product options | Not supported | Full support |
128
+ | Discounts | Manual price changes | Built-in discount system |
129
+
130
+ CMS Catalogs are best for simple product catalogs. For complex eCommerce needs, consider Wix Stores.
131
+
132
+ ## See Also
133
+
134
+ - [CMS Schema Management](cms-schema-management.md)
135
+ - [CMS Data Operations](cms-data-items-crud.md)
136
+ - [Wix Cart API](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/cart/cart/introduction)
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: "CMS References And Relationships"
3
+ description: "Add, replace, or remove items from MULTI_REFERENCE fields. Use insert-references, replace-references, remove-references endpoints. Required for managing multi-reference relationships - these CANNOT be set via regular insert/update/patch operations. Also covers single references and querying with expanded references."
4
+ ---
5
+ # CMS References & Relationships
6
+
7
+ This recipe covers linking CMS collections together using reference fields.
8
+
9
+ ## Prerequisites
10
+
11
+ 1. Wix CMS enabled on the site
12
+ 2. At least two collections to link together
13
+ 3. API access with CMS permissions
14
+
15
+ ## Required APIs
16
+
17
+ - **Collections API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction)
18
+ - **Data Items API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/introduction)
19
+
20
+ ## Reference Types
21
+
22
+ | Type | Field Type | Relationship | Example |
23
+ |------|------------|--------------|---------|
24
+ | Single Reference | `REFERENCE` | One-to-one, Many-to-one | Product → Category |
25
+ | Multi-Reference | `MULTI_REFERENCE` | One-to-many, Many-to-many | Product → Tags |
26
+
27
+ ## Add a Single Reference Field
28
+
29
+ **Endpoint**: `POST /wix-data/v2/collections/create-field`
30
+
31
+ ```bash
32
+ curl -X POST \
33
+ 'https://www.wixapis.com/wix-data/v2/collections/create-field' \
34
+ -H 'Content-Type: application/json' \
35
+ -H 'Authorization: <AUTH>' \
36
+ -d '{
37
+ "dataCollectionId": "Products",
38
+ "field": {
39
+ "key": "category",
40
+ "displayName": "Category",
41
+ "type": "REFERENCE",
42
+ "typeMetadata": {
43
+ "reference": {
44
+ "referencedCollectionId": "Categories"
45
+ }
46
+ }
47
+ }
48
+ }'
49
+ ```
50
+
51
+ ## Add a Multi-Reference Field
52
+
53
+ **Endpoint**: `POST /wix-data/v2/collections/create-field`
54
+
55
+ ```bash
56
+ curl -X POST \
57
+ 'https://www.wixapis.com/wix-data/v2/collections/create-field' \
58
+ -H 'Content-Type: application/json' \
59
+ -H 'Authorization: <AUTH>' \
60
+ -d '{
61
+ "dataCollectionId": "Products",
62
+ "field": {
63
+ "key": "tags",
64
+ "displayName": "Tags",
65
+ "type": "MULTI_REFERENCE",
66
+ "typeMetadata": {
67
+ "multiReference": {
68
+ "referencedCollectionId": "Tags",
69
+ "referencingFieldKey": "products",
70
+ "referencingDisplayName": "Products"
71
+ }
72
+ }
73
+ }
74
+ }'
75
+ ```
76
+
77
+ ## Insert Multi-Reference Links
78
+
79
+ **Endpoint**: `POST /wix-data/v2/bulk/items/insert-references`
80
+
81
+ ```json
82
+ {
83
+ "dataCollectionId": "Products",
84
+ "dataItemReferences": [
85
+ {
86
+ "referringItemId": "product-item-id",
87
+ "referringItemFieldName": "tags",
88
+ "referencedItemId": "tag-1-item-id"
89
+ },
90
+ {
91
+ "referringItemId": "product-item-id",
92
+ "referringItemFieldName": "tags",
93
+ "referencedItemId": "tag-2-item-id"
94
+ }
95
+ ],
96
+ "returnEntity": true
97
+ }
98
+ ```
99
+
100
+ ## Replace All References
101
+
102
+ **Endpoint**: `POST /wix-data/v2/items/replace-references`
103
+
104
+ ```json
105
+ {
106
+ "dataCollectionId": "Products",
107
+ "referringItemId": "product-item-id",
108
+ "referringItemFieldName": "tags",
109
+ "newReferencedItemIds": ["new-tag-1-id", "new-tag-2-id", "new-tag-3-id"]
110
+ }
111
+ ```
112
+
113
+ > **Note**: To remove all references, pass an empty array for `newReferencedItemIds`.
114
+
115
+ ## Remove References (Bulk)
116
+
117
+ **Endpoint**: `POST /wix-data/v2/bulk/items/remove-references`
118
+
119
+ ```json
120
+ {
121
+ "dataCollectionId": "Products",
122
+ "dataItemReferences": [
123
+ {
124
+ "referringItemId": "product-id-1",
125
+ "referringItemFieldName": "tags",
126
+ "referencedItemId": "tag-to-remove-id"
127
+ }
128
+ ]
129
+ }
130
+ ```
131
+
132
+ ## Query with Referenced Items Expanded
133
+
134
+ **Endpoint**: `POST /wix-data/v2/items/query`
135
+
136
+ ```json
137
+ {
138
+ "dataCollectionId": "Products",
139
+ "query": {
140
+ "filter": {
141
+ "inStock": true
142
+ }
143
+ },
144
+ "includeReferencedItems": ["category", "tags"]
145
+ }
146
+ ```
147
+
148
+ ## Reference Query Operators
149
+
150
+ | Operator | Description | Example |
151
+ |----------|-------------|---------|
152
+ | `$eq` | Exact match (single reference) | `{ "category": "id" }` |
153
+ | `$hasSome` | Has at least one of | `{ "tags": { "$hasSome": ["id1", "id2"] } }` |
154
+ | `$hasAll` | Has all of | `{ "tags": { "$hasAll": ["id1", "id2"] } }` |
155
+
156
+ ## Related Documentation
157
+
158
+ - [Data Items API Reference](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-items/introduction)
159
+ - [Collections API Reference](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction)
160
+ - [CMS Schema Management Recipe](cms-schema-management.md)
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: "CMS Schema Management"
3
+ description: Create and modify CMS collection structures. Covers listing collections, creating collections with fields, adding/removing fields, and updating collection settings.
4
+ ---
5
+ # CMS Schema Management
6
+
7
+ This recipe covers managing the structure (schema) of Wix CMS collections using the REST API.
8
+
9
+ ## Prerequisites
10
+
11
+ 1. Wix CMS enabled on the site
12
+ 2. API access with CMS permissions (Manage Data Collections scope)
13
+
14
+ ## Required APIs
15
+
16
+ - **Collections API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction)
17
+
18
+ ## List All Collections
19
+
20
+ **Lightweight listing (recommended for existence checks)**:
21
+ ```bash
22
+ curl -X GET \
23
+ 'https://www.wixapis.com/wix-data/v2/collections?fields=id' \
24
+ -H 'Authorization: <AUTH>'
25
+ ```
26
+
27
+ **Full listing (includes all field schemas)**:
28
+ ```bash
29
+ curl -X GET \
30
+ 'https://www.wixapis.com/wix-data/v2/collections' \
31
+ -H 'Authorization: <AUTH>'
32
+ ```
33
+
34
+ **Collection Types**: `NATIVE` (user-created), `WIX_APP` (Wix app collections), `BLOCKS_APP`, `EXTERNAL`
35
+
36
+ ## Get Collection Schema
37
+
38
+ **Endpoint**: `GET /wix-data/v2/collections/{collectionId}`
39
+
40
+ ```bash
41
+ curl -X GET \
42
+ 'https://www.wixapis.com/wix-data/v2/collections/Products' \
43
+ -H 'Authorization: <AUTH>'
44
+ ```
45
+
46
+ ## Create a New Collection
47
+
48
+ **Endpoint**: `POST /wix-data/v2/collections`
49
+
50
+ ```json
51
+ {
52
+ "collection": {
53
+ "id": "Products",
54
+ "displayName": "Products",
55
+ "fields": [
56
+ {"key": "title", "displayName": "Title", "type": "TEXT", "required": true},
57
+ {"key": "price", "displayName": "Price", "type": "NUMBER"},
58
+ {"key": "description", "displayName": "Description", "type": "TEXT"},
59
+ {"key": "inStock", "displayName": "In Stock", "type": "BOOLEAN"}
60
+ ],
61
+ "permissions": {
62
+ "insert": "ADMIN",
63
+ "update": "ADMIN",
64
+ "remove": "ADMIN",
65
+ "read": "ANYONE"
66
+ }
67
+ }
68
+ }
69
+ ```
70
+
71
+ ## Add a Field to Existing Collection
72
+
73
+ **Endpoint**: `POST /wix-data/v2/collections/create-field`
74
+
75
+ ```json
76
+ {
77
+ "dataCollectionId": "Products",
78
+ "field": {
79
+ "key": "sku",
80
+ "displayName": "SKU",
81
+ "type": "TEXT",
82
+ "description": "Product SKU code"
83
+ }
84
+ }
85
+ ```
86
+
87
+ ## Delete a Field from Collection
88
+
89
+ > **Warning**: This permanently deletes all data stored in this field across all items.
90
+
91
+ **Endpoint**: `POST /wix-data/v2/collections/delete-field`
92
+
93
+ ```json
94
+ {
95
+ "dataCollectionId": "Products",
96
+ "fieldKey": "sku"
97
+ }
98
+ ```
99
+
100
+ ## Update Collection Settings
101
+
102
+ **Endpoint**: `PATCH /wix-data/v2/collections/{collectionId}`
103
+
104
+ ```json
105
+ {
106
+ "dataCollection": {
107
+ "id": "Products",
108
+ "displayName": "Product Catalog"
109
+ }
110
+ }
111
+ ```
112
+
113
+ ## Field Types Reference
114
+
115
+ | Type | Description | Example Value |
116
+ |------|-------------|---------------|
117
+ | `TEXT` | String | `"Hello World"` |
118
+ | `NUMBER` | Numeric | `99.99` |
119
+ | `BOOLEAN` | True/false | `true` |
120
+ | `DATE` | Date only | `"2024-01-15"` |
121
+ | `DATETIME` | Date and time | `{ "$date": "2024-01-15T10:00:00.000Z" }` |
122
+ | `IMAGE` | Image reference | `"wix:image://v1/..."` |
123
+ | `URL` | Web URL | `"https://example.com"` |
124
+ | `RICH_TEXT` | HTML content | `"<p>Rich text</p>"` |
125
+ | `ARRAY_STRING` | Array of strings | `["tag1", "tag2"]` |
126
+ | `OBJECT` | JSON object | `{"key": "value"}` |
127
+ | `REFERENCE` | Single reference | Item ID string |
128
+ | `MULTI_REFERENCE` | Multiple references | Array of IDs |
129
+
130
+ ## Permission Levels
131
+
132
+ | Role | Description |
133
+ |------|-------------|
134
+ | `ANYONE` | All visitors (including anonymous) |
135
+ | `SITE_MEMBER` | Logged-in site members |
136
+ | `SITE_MEMBER_AUTHOR` | Members who created the item |
137
+ | `ADMIN` | Site admins only |
138
+
139
+ ## Related Documentation
140
+
141
+ - [Data Collections API Reference](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction)
142
+ - [Data Types in Wix Data](https://dev.wix.com/docs/api-reference/business-solutions/cms/data-types-in-wix-data)
143
+ - [CMS Data Items CRUD Recipe](cms-data-items-crud.md)
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: "Bulk Delete Contacts"
3
+ description: Deletes multiple contacts using filter-based bulk delete. Covers safe deletion patterns, GDPR compliance, soft delete alternatives, and batch processing strategies.
4
+ ---
5
+ # Bulk Delete Contacts
6
+
7
+ ## Description
8
+ Deletes multiple contacts using the Wix Contacts REST API.
9
+
10
+ All contacts that meet the specified `filter` and `search` criteria are deleted.
11
+ The request should contain a `filter` value or a `search` value, or both.
12
+ To perform a dry run, call [Query Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/query-contacts) with the intended filter options.
13
+
14
+ When this method is called, a bulk job is started and the job ID is returned.
15
+ The job might not complete right away, depending on its size.
16
+ The job's status can be retrieved with [Get Bulk Job](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/bulk-job/get-bulk-job).
17
+
18
+ **IMPORTANT NOTE:** When specific contacts are to be deleted, they should be filtered by id.
19
+
20
+ ## API Endpoint
21
+ `POST https://www.wixapis.com/contacts/v4/bulk/contacts/delete`
22
+
23
+ ## Request Example
24
+
25
+ ```bash
26
+ curl -X POST \
27
+ 'https://www.wixapis.com/contacts/v4/bulk/contacts/delete' \
28
+ -H 'Authorization: <AUTH>' \
29
+ -H 'Content-Type: application/json' \
30
+ -d '{
31
+ "filter": {
32
+ "info.name.last": "Smith"
33
+ }
34
+ }'
35
+ ```
36
+
37
+ ## Request Parameters
38
+
39
+ - `filter` (object, optional): Filter criteria to identify contacts. When specific contacts are to be deleted, filter by `id`.
40
+ - `search` (string, optional): Search query to identify contacts.
41
+
42
+ **Note:** The request should contain a `filter` value or a `search` value, or both.
43
+
44
+ ## Response
45
+
46
+ The response includes a `jobId` which can be used to track the bulk job status:
47
+
48
+ ```json
49
+ {
50
+ "jobId": "00000000-0000-0000-0000-000000000001"
51
+ }
52
+ ```
53
+
54
+ Use the [Get Bulk Job](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/bulk-job/get-bulk-job) endpoint to check the job status.
55
+
56
+ ## Common Errors
57
+
58
+ The following errors might occur during the bulk processing and will appear in the bulk job:
59
+
60
+ - `CANNOT_DELETE_SITE_MEMBERS` - Contact is a site member and can't be deleted. Member must be deleted first.
61
+ - `CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION` - Contact has a valid billing subscription and can't be deleted.
62
+ - `CANNOT_DELETE_MEMBER_OWNER_OR_CONTRIBUTOR` - Member is a Wix user and can't be deleted. This can happen only if the request indicated to delete the member.
63
+ - `FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION` - Member was deleted, but contact was not. This can happen only if the request indicated to delete the member.
64
+ - `FAILED_DELETE_CONTACT` - Contact could not be deleted.
65
+
66
+ ## Permissions Required
67
+ - `CONTACTS.MODIFY`
68
+ - `MEMBERS.MEMBER_DELETE` (if deleting members)
69
+
70
+ ## Related Documentation
71
+ - [Bulk Delete Contacts API Reference](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/bulk-delete-contacts)
72
+ - [Query Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/query-contacts)
73
+ - [Get Bulk Job](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/bulk-job/get-bulk-job)
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: "Bulk Label and Unlabel Contacts"
3
+ description: Adds/removes labels from multiple contacts using Contacts API bulk operations. Covers label creation, contact filtering, batch processing, and rate limit handling.
4
+ ---
5
+ # Bulk Label And Unlabel Contacts
6
+
7
+ ## Description
8
+ Adds and removes labels from multiple contacts using the Wix Contacts REST API.
9
+
10
+ Labels are added to and removed from all contacts that meet the specified `filter` and `search` criteria.
11
+ The request should specify a `filter` value, a `search` value, or both.
12
+ To perform a dry run, call [Query Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/query-contacts) with the intended filter options.
13
+
14
+ When this method is used, a bulk job is started and the job ID is returned.
15
+ The job might not complete right away, depending on its size.
16
+ The job's status can be retrieved with [Get Bulk Job](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/bulk-job/get-bulk-job).
17
+
18
+ **IMPORTANT NOTE:** When specific contacts are to be labeled, they should be filtered by id.
19
+
20
+ ## API Endpoint
21
+ `POST https://www.wixapis.com/contacts/v4/bulk/contacts/add-remove-labels`
22
+
23
+ ## Request Example
24
+
25
+ ```bash
26
+ curl -X POST \
27
+ 'https://www.wixapis.com/contacts/v4/bulk/contacts/add-remove-labels' \
28
+ -H 'Authorization: <AUTH>' \
29
+ -H 'Content-Type: application/json' \
30
+ -d '{
31
+ "filter": {
32
+ "info.name.first": "John"
33
+ },
34
+ "labelKeysToAdd": ["custom.name-john", "custom.name-starts-with-J"],
35
+ "labelKeysToRemove": ["custom.last-name-smith"]
36
+ }'
37
+ ```
38
+
39
+ ## Request Parameters
40
+
41
+ - `filter` (object, optional): Filter criteria to identify contacts. When specific contacts are to be labeled, filter by `id`.
42
+ - `search` (string, optional): Search query to identify contacts.
43
+ - `labelKeysToAdd` (array of strings): Array of label keys to add to matching contacts.
44
+ - `labelKeysToRemove` (array of strings): Array of label keys to remove from matching contacts.
45
+
46
+ **Note:** The request should specify a `filter` value, a `search` value, or both.
47
+
48
+ ## Response
49
+
50
+ The response includes a `jobId` which can be used to track the bulk job status:
51
+
52
+ ```json
53
+ {
54
+ "jobId": "00000000-0000-0000-0000-000000000001"
55
+ }
56
+ ```
57
+
58
+ Use the [Get Bulk Job](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/bulk-job/get-bulk-job) endpoint to check the job status.
59
+
60
+ ## Permissions Required
61
+ - `CONTACTS.MODIFY`
62
+
63
+ ## Related Documentation
64
+ - [Bulk Label And Unlabel Contacts API Reference](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/bulk-label-and-unlabel-contacts)
65
+ - [Query Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/contact-v4/query-contacts)
66
+ - [Get Bulk Job](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts/bulk-job/get-bulk-job)
67
+ - [Labels API Reference](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/labels/introduction)