@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.
- package/LICENSE +21 -0
- package/README.md +111 -0
- package/package.json +29 -0
- package/skills/wix-app/SKILL.md +344 -0
- package/skills/wix-app/references/APP_IDENTIFIERS.md +35 -0
- package/skills/wix-app/references/APP_MARKET_REVIEW.md +311 -0
- package/skills/wix-app/references/APP_VALIDATION.md +171 -0
- package/skills/wix-app/references/BACKEND_API.md +233 -0
- package/skills/wix-app/references/BACKEND_EVENT.md +116 -0
- package/skills/wix-app/references/CODE_QUALITY.md +33 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +587 -0
- package/skills/wix-app/references/DASHBOARD_MENU_PLUGIN.md +157 -0
- package/skills/wix-app/references/DASHBOARD_MODAL.md +283 -0
- package/skills/wix-app/references/DASHBOARD_PAGE.md +403 -0
- package/skills/wix-app/references/DASHBOARD_PLUGIN.md +205 -0
- package/skills/wix-app/references/DATA_COLLECTION.md +451 -0
- package/skills/wix-app/references/DOCUMENTATION.md +42 -0
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +65 -0
- package/skills/wix-app/references/EMBEDDED_SCRIPT.md +468 -0
- package/skills/wix-app/references/EXTENSION_REGISTRATION.md +96 -0
- package/skills/wix-app/references/SERVICE_PLUGIN.md +235 -0
- package/skills/wix-app/references/SITE_PLUGIN.md +436 -0
- package/skills/wix-app/references/STORES_VERSIONING.md +334 -0
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +84 -0
- package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +345 -0
- package/skills/wix-app/references/dashboard-menu-plugin/blog-slots.md +71 -0
- package/skills/wix-app/references/dashboard-menu-plugin/bookings-slots.md +58 -0
- package/skills/wix-app/references/dashboard-menu-plugin/crm-slots.md +8 -0
- package/skills/wix-app/references/dashboard-menu-plugin/ecommerce-slots.md +17 -0
- package/skills/wix-app/references/dashboard-menu-plugin/events-slots.md +29 -0
- package/skills/wix-app/references/dashboard-menu-plugin/restaurants-slots.md +27 -0
- package/skills/wix-app/references/dashboard-menu-plugin/stores-slots.md +35 -0
- package/skills/wix-app/references/dashboard-page/API_SPEC.md +138 -0
- package/skills/wix-app/references/dashboard-page/DASHBOARD_API.md +573 -0
- package/skills/wix-app/references/dashboard-page/DYNAMIC_PARAMETERS.md +269 -0
- package/skills/wix-app/references/dashboard-page/ECOM_NAVIGATION.md +164 -0
- package/skills/wix-app/references/dashboard-plugin/SLOTS.md +294 -0
- package/skills/wix-app/references/data-collection/WIX_DATA.md +270 -0
- package/skills/wix-app/references/data-collection/extension-template.ts +107 -0
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +138 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +454 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +165 -0
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +576 -0
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +170 -0
- package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +6 -0
- package/skills/wix-app/references/editor-react-component/PARTS.md +25 -0
- package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +203 -0
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +167 -0
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +137 -0
- package/skills/wix-app/references/service-plugin/ADDITIONAL-FEES.md +112 -0
- package/skills/wix-app/references/service-plugin/BOOKINGS-STAFF-SORTING.md +118 -0
- package/skills/wix-app/references/service-plugin/DISCOUNT-TRIGGERS.md +87 -0
- package/skills/wix-app/references/service-plugin/GIFT-CARDS.md +86 -0
- package/skills/wix-app/references/service-plugin/PAYMENT-SETTINGS.md +135 -0
- package/skills/wix-app/references/service-plugin/SHIPPING-RATES.md +79 -0
- package/skills/wix-app/references/service-plugin/VALIDATIONS.md +68 -0
- package/skills/wix-app/references/site-plugin/EXAMPLES.md +311 -0
- package/skills/wix-app/references/site-plugin/SLOTS.md +263 -0
- package/skills/wix-design-system/SKILL.md +129 -0
- package/skills/wix-design-system/references/file-structure.md +56 -0
- package/skills/wix-design-system/scripts/wds.cjs +531 -0
- package/skills/wix-headless/SKILL.md +418 -0
- package/skills/wix-headless/references/DISCOVERY.md +332 -0
- package/skills/wix-headless/references/ORCHESTRATION.md +269 -0
- package/skills/wix-headless/references/SETUP.md +154 -0
- package/skills/wix-headless/references/blog/BLOG_CONTENT.md +152 -0
- package/skills/wix-headless/references/blog/BLOG_PAGES.md +299 -0
- package/skills/wix-headless/references/blog/BLOG_SETUP.md +218 -0
- package/skills/wix-headless/references/blog/INSTRUCTIONS.md +32 -0
- package/skills/wix-headless/references/cms/CMS_FOUNDATIONS.md +373 -0
- package/skills/wix-headless/references/cms/FAQ_KNOWLEDGE_BASE.md +229 -0
- package/skills/wix-headless/references/cms/INSTRUCTIONS.md +40 -0
- package/skills/wix-headless/references/cms/PORTFOLIO.md +454 -0
- package/skills/wix-headless/references/cms/RESOURCE_LIBRARY.md +356 -0
- package/skills/wix-headless/references/cms/TEAM_DIRECTORY.md +299 -0
- package/skills/wix-headless/references/commands/install-app.md +42 -0
- package/skills/wix-headless/references/commands/known-apps.json +5 -0
- package/skills/wix-headless/references/commands/mcp-bootstrap.md +28 -0
- package/skills/wix-headless/references/designer/INSTRUCTIONS.md +828 -0
- package/skills/wix-headless/references/ecom/CART_PAGES.md +120 -0
- package/skills/wix-headless/references/ecom/CART_WIRING.md +103 -0
- package/skills/wix-headless/references/ecom/COMPONENTS_CSS.md +132 -0
- package/skills/wix-headless/references/ecom/INSTRUCTIONS.md +59 -0
- package/skills/wix-headless/references/forms/CONTACT_FORM.md +477 -0
- package/skills/wix-headless/references/forms/INSTRUCTIONS.md +43 -0
- package/skills/wix-headless/references/gift-cards/COMPONENTS.md +119 -0
- package/skills/wix-headless/references/gift-cards/INSTRUCTIONS.md +51 -0
- package/skills/wix-headless/references/gift-cards/PAGES.md +129 -0
- package/skills/wix-headless/references/images/INSTRUCTIONS.md +359 -0
- package/skills/wix-headless/references/shared/BUILD_NOISE.md +8 -0
- package/skills/wix-headless/references/shared/IMAGE_GENERATION.md +185 -0
- package/skills/wix-headless/references/shared/IMPLEMENTER.md +155 -0
- package/skills/wix-headless/references/shared/MCP_PREFIX.md +105 -0
- package/skills/wix-headless/references/shared/PRODUCTION_SHARP_EDGES.md +97 -0
- package/skills/wix-headless/references/shared/RETURN_CONTRACT.md +423 -0
- package/skills/wix-headless/references/shared/STYLING.md +117 -0
- package/skills/wix-headless/references/stores/BACK_IN_STOCK.md +178 -0
- package/skills/wix-headless/references/stores/CATEGORY_PAGES.md +86 -0
- package/skills/wix-headless/references/stores/COMPONENTS_CSS.md +129 -0
- package/skills/wix-headless/references/stores/HOME_AND_NAV.md +227 -0
- package/skills/wix-headless/references/stores/INSTRUCTIONS.md +96 -0
- package/skills/wix-headless/references/stores/PRODUCT_CATALOG_DATA.md +249 -0
- package/skills/wix-headless/references/stores/PRODUCT_PAGES.md +213 -0
- package/skills/wix-headless/references/stores/SHARED_WIRING.md +164 -0
- package/skills/wix-headless/references/verticals/_schema.json +160 -0
- package/skills/wix-headless/references/verticals/_schema.md +185 -0
- package/skills/wix-headless/references/verticals/blog.md +125 -0
- package/skills/wix-headless/references/verticals/cms.md +121 -0
- package/skills/wix-headless/references/verticals/ecom.md +96 -0
- package/skills/wix-headless/references/verticals/forms.md +106 -0
- package/skills/wix-headless/references/verticals/gift-cards.md +121 -0
- package/skills/wix-headless/references/verticals/stores.md +167 -0
- package/skills/wix-headless/scripts/check-manifest.mjs +198 -0
- package/skills/wix-headless/scripts/copy-utility-templates.mjs +153 -0
- package/skills/wix-headless/scripts/emit-design-tokens.mjs +77 -0
- package/skills/wix-headless/scripts/finalize-run-json.mjs +141 -0
- package/skills/wix-headless/scripts/init-site-json.mjs +63 -0
- package/skills/wix-headless/scripts/patch-decorative-slots.mjs +124 -0
- package/skills/wix-headless/scripts/plan-entity-image-waves.mjs +190 -0
- package/skills/wix-headless/scripts/preview.sh +45 -0
- package/skills/wix-headless/scripts/release.sh +73 -0
- package/skills/wix-headless/scripts/scaffold.sh +53 -0
- package/skills/wix-headless/scripts/seed-utilities.sh +55 -0
- package/skills/wix-headless/shared-utilities/analytics.ts +40 -0
- package/skills/wix-headless/shared-utilities/ricos.ts +179 -0
- package/skills/wix-headless/shared-utilities/wix-image.ts +72 -0
- package/skills/wix-headless/templates/ecom/CartBadge.tsx +84 -0
- package/skills/wix-headless/templates/ecom/CartView.tsx +543 -0
- package/skills/wix-headless/templates/ecom/cart.astro +13 -0
- package/skills/wix-headless/templates/ecom/components-ecom.css +215 -0
- package/skills/wix-headless/templates/ecom/discounts.ts +71 -0
- package/skills/wix-headless/templates/ecom/thank-you.astro +24 -0
- package/skills/wix-headless/templates/gift-cards/GiftCardPurchase.tsx +172 -0
- package/skills/wix-headless/templates/gift-cards/_home-teaser-snippet.astro +42 -0
- package/skills/wix-headless/templates/gift-cards/_nav-snippet.astro +11 -0
- package/skills/wix-headless/templates/gift-cards/components-gift-cards.css +219 -0
- package/skills/wix-headless/templates/gift-cards/gift-cards.astro +51 -0
- package/skills/wix-headless/templates/gift-cards/gift-cards.ts +75 -0
- package/skills/wix-headless/templates/stores/AddToCartButton.tsx +77 -0
- package/skills/wix-headless/templates/stores/BackInStockForm.tsx +176 -0
- package/skills/wix-headless/templates/stores/CategoryRail.astro +69 -0
- package/skills/wix-headless/templates/stores/ProductCard.astro +79 -0
- package/skills/wix-headless/templates/stores/ProductPurchase.tsx +397 -0
- package/skills/wix-headless/templates/stores/SeoTags.astro +21 -0
- package/skills/wix-headless/templates/stores/back-in-stock.ts +67 -0
- package/skills/wix-headless/templates/stores/categories.ts +155 -0
- package/skills/wix-headless/templates/stores/category/[slug].astro +130 -0
- package/skills/wix-headless/templates/stores/components-stores.css +295 -0
- package/skills/wix-headless/templates/stores/products/[slug].astro +128 -0
- package/skills/wix-headless/templates/stores/products/index.astro +101 -0
- package/skills/wix-manage/SKILL.md +280 -0
- package/skills/wix-manage/references/app-installation/install-wix-apps.md +155 -0
- package/skills/wix-manage/references/app-installation/list-installed-apps.md +124 -0
- package/skills/wix-manage/references/blog/how-to-create-blog-posts.md +226 -0
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +95 -0
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +416 -0
- package/skills/wix-manage/references/bookings/bookings-staff-setup.md +255 -0
- package/skills/wix-manage/references/bookings/create-and-update-booking-services.md +462 -0
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +278 -0
- package/skills/wix-manage/references/bookings/external-calendar-integration.md +258 -0
- package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +231 -0
- package/skills/wix-manage/references/calendar/configure-default-business-hours.md +226 -0
- package/skills/wix-manage/references/cms/cms-data-items-crud.md +422 -0
- package/skills/wix-manage/references/cms/cms-data-operations-extended.md +263 -0
- package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +136 -0
- package/skills/wix-manage/references/cms/cms-references-and-relationships.md +160 -0
- package/skills/wix-manage/references/cms/cms-schema-management.md +143 -0
- package/skills/wix-manage/references/contacts/bulk-delete-contacts.md +73 -0
- package/skills/wix-manage/references/contacts/bulk-label-and-unlabel-contacts.md +67 -0
- package/skills/wix-manage/references/domains/domain-search-and-purchase.md +434 -0
- package/skills/wix-manage/references/ecommerce/api-recommendation-tracking.md +420 -0
- package/skills/wix-manage/references/ecommerce/flow-add-free-shipping.md +267 -0
- package/skills/wix-manage/references/ecommerce/flow-bundle-and-save.md +290 -0
- package/skills/wix-manage/references/ecommerce/flow-fix-coverage-gaps.md +300 -0
- package/skills/wix-manage/references/ecommerce/flow-optimize-shipping-rates.md +364 -0
- package/skills/wix-manage/references/ecommerce/flow-seasonal-promotion.md +315 -0
- package/skills/wix-manage/references/ecommerce/flow-stock-mover.md +308 -0
- package/skills/wix-manage/references/ecommerce/flow-upsell-boost.md +271 -0
- package/skills/wix-manage/references/ecommerce/goal-clear-inventory.md +118 -0
- package/skills/wix-manage/references/ecommerce/goal-drive-cross-sells.md +122 -0
- package/skills/wix-manage/references/ecommerce/goal-increase-aov.md +132 -0
- package/skills/wix-manage/references/ecommerce/goal-reduce-cart-abandonment.md +148 -0
- package/skills/wix-manage/references/ecommerce/goal-seasonal-revenue.md +146 -0
- package/skills/wix-manage/references/ecommerce/guardrail-discount-conflicts.md +118 -0
- package/skills/wix-manage/references/ecommerce/guardrail-margin-protection.md +88 -0
- package/skills/wix-manage/references/ecommerce/guardrail-rate-pricing-sanity.md +108 -0
- package/skills/wix-manage/references/ecommerce/guardrail-shipping-health.md +124 -0
- package/skills/wix-manage/references/ecommerce/recipe-apply-shipping-recommendations.md +299 -0
- package/skills/wix-manage/references/ecommerce/recommend-ecommerce-strategy.md +582 -0
- package/skills/wix-manage/references/ecommerce/setup-coupons.md +338 -0
- package/skills/wix-manage/references/ecommerce/setup-discount-rules.md +444 -0
- package/skills/wix-manage/references/ecommerce/setup-shipping-rates.md +86 -0
- package/skills/wix-manage/references/ecommerce/setup-shipping-regions.md +56 -0
- package/skills/wix-manage/references/ecommerce/setup-store-pickup-location.md +209 -0
- package/skills/wix-manage/references/ecommerce/skill-graph.md +139 -0
- package/skills/wix-manage/references/ecommerce/troubleshoot-checkout-delivery-dropoff.md +124 -0
- package/skills/wix-manage/references/ecommerce/troubleshoot-discount-not-applying.md +95 -0
- package/skills/wix-manage/references/events/list-events.md +203 -0
- package/skills/wix-manage/references/forms/create-form.md +260 -0
- package/skills/wix-manage/references/get-paid/create-payment-links.md +212 -0
- package/skills/wix-manage/references/get-paid/how-to-setup-wix-payments.md +57 -0
- package/skills/wix-manage/references/get-paid/payment-links-for-bookings.md +101 -0
- package/skills/wix-manage/references/media/upload-media-to-wix.md +216 -0
- package/skills/wix-manage/references/pricing-plans/create-and-update-pricing-plans.md +77 -0
- package/skills/wix-manage/references/pricing-plans/pricing-plans-bookings-integration.md +166 -0
- package/skills/wix-manage/references/restaurants/wix-restaurants-setup.md +336 -0
- package/skills/wix-manage/references/rich-content/ricos-converter-service.md +295 -0
- package/skills/wix-manage/references/site-properties/change-payment-currency-site-properties.md +59 -0
- package/skills/wix-manage/references/sites/create-site-from-template.md +183 -0
- package/skills/wix-manage/references/sites/query-sites.md +125 -0
- package/skills/wix-manage/references/stores/add-store-pages-to-site.md +57 -0
- package/skills/wix-manage/references/stores/bulk-create-products-with-options.md +1041 -0
- package/skills/wix-manage/references/stores/create-product-catalog-v1.md +125 -0
- package/skills/wix-manage/references/stores/create-product-from-image.md +824 -0
- package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +566 -0
- package/skills/wix-manage/references/stores/find-products-query-and-search-catalog-v3.md +194 -0
- package/skills/wix-manage/references/stores/query-products-catalog-v1.md +80 -0
- package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +99 -0
- package/skills/wix-manage/references/stores/update-product-pre-order.md +213 -0
- package/skills/wix-manage/references/stores/update-product-with-options.md +318 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "List Installed Apps"
|
|
3
|
+
description: Lists all apps installed on a site using Apps Installer API. Useful for verifying app installations before making API calls and diagnosing authorization errors.
|
|
4
|
+
---
|
|
5
|
+
# List Installed Apps on a Site
|
|
6
|
+
|
|
7
|
+
This recipe guides you through listing all installed apps on a Wix site using the Apps Installer REST API. This is useful for verifying app installations before making API calls that require specific apps.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- Site ID for the site you want to check
|
|
12
|
+
|
|
13
|
+
## Required APIs
|
|
14
|
+
|
|
15
|
+
- **Apps Installer API**: [Get Installed Apps](https://dev.wix.com/docs/api-reference/business-management/app-installation/app-installation/get-installed-apps)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Step 1: Query Installed Apps
|
|
20
|
+
|
|
21
|
+
Use the Get Installed Apps endpoint to retrieve all apps installed on a site.
|
|
22
|
+
|
|
23
|
+
**Endpoint**: `GET https://www.wixapis.com/apps-installer-service/v1/app-instances`
|
|
24
|
+
|
|
25
|
+
**Request**:
|
|
26
|
+
```bash
|
|
27
|
+
curl -X GET \
|
|
28
|
+
'https://www.wixapis.com/apps-installer-service/v1/app-instances' \
|
|
29
|
+
-H 'Authorization: <AUTH>' \
|
|
30
|
+
-H 'Content-Type: application/json'
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Response**:
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"appInstances": [
|
|
37
|
+
{
|
|
38
|
+
"id": "instance-id-1",
|
|
39
|
+
"appDefId": "1380b703-ce81-ff05-f115-39571d94dfcd",
|
|
40
|
+
"version": "^0.0.0",
|
|
41
|
+
"enabled": true,
|
|
42
|
+
"status": "UNKNOWN"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "instance-id-2",
|
|
46
|
+
"appDefId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97",
|
|
47
|
+
"enabled": true,
|
|
48
|
+
"status": "UNKNOWN"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Step 2: Identify Apps by Definition ID
|
|
57
|
+
|
|
58
|
+
Match the `appDefId` values from the response against known Wix app IDs.
|
|
59
|
+
|
|
60
|
+
### Common Wix App Definition IDs
|
|
61
|
+
|
|
62
|
+
| App | appDefId |
|
|
63
|
+
|-----|----------|
|
|
64
|
+
| Wix Stores | `1380b703-ce81-ff05-f115-39571d94dfcd` |
|
|
65
|
+
| Wix Bookings | `13d21c63-b5ec-5912-8397-c3a5ddb27a97` |
|
|
66
|
+
| Wix Blog | `14bcded7-0066-7c35-14d7-466cb3f09103` |
|
|
67
|
+
| Wix Events | `140603ad-af8d-84a5-2c80-a0f60cb47351` |
|
|
68
|
+
| Wix Pricing Plans | `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3` |
|
|
69
|
+
| Wix Restaurants | `13e8d036-5516-6f75-e025-2aca3b5d7930` |
|
|
70
|
+
|
|
71
|
+
For a complete list, see [Apps Created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Use Cases
|
|
76
|
+
|
|
77
|
+
### Verify App Before API Calls
|
|
78
|
+
|
|
79
|
+
Before calling APIs that require specific apps (e.g., Bookings, Stores), check if the app is installed:
|
|
80
|
+
|
|
81
|
+
```javascript
|
|
82
|
+
// Pseudocode example
|
|
83
|
+
const installedApps = await getInstalledApps(siteId);
|
|
84
|
+
const bookingsAppId = "13d21c63-b5ec-5912-8397-c3a5ddb27a97";
|
|
85
|
+
|
|
86
|
+
const hasBookings = installedApps.appInstances.some(
|
|
87
|
+
app => app.appDefId === bookingsAppId
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
if (!hasBookings) {
|
|
91
|
+
// Install Bookings app first
|
|
92
|
+
// See: Install Wix Apps recipe
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Diagnose Authorization Errors
|
|
97
|
+
|
|
98
|
+
If you receive `401 Unauthorized` or `403 Forbidden` errors from Wix APIs:
|
|
99
|
+
|
|
100
|
+
1. **List installed apps** using this recipe
|
|
101
|
+
2. **Check if the required app** is in the response
|
|
102
|
+
3. **If missing**: Install the app using the [Install Wix Apps](install-wix-apps.md) recipe
|
|
103
|
+
4. **Retry the original API call**
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Error Handling
|
|
108
|
+
|
|
109
|
+
### 401 Unauthorized
|
|
110
|
+
- Verify your authentication token is valid
|
|
111
|
+
- Check that the token has `APP-MARKET.VIEW-INSTALLED-APP` permission
|
|
112
|
+
|
|
113
|
+
### Empty Response
|
|
114
|
+
- The site may have no additional apps installed beyond core Wix functionality
|
|
115
|
+
- This is normal for new or minimal sites
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Next Steps
|
|
120
|
+
|
|
121
|
+
After checking installed apps:
|
|
122
|
+
- **If app is missing**: Use the [Install Wix Apps](install-wix-apps.md) recipe to install required apps
|
|
123
|
+
- **If app is installed but API fails**: Check API permissions and authentication
|
|
124
|
+
- **For Bookings APIs**: See [Bookings recipes](../../SKILL.md) for service setup
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "How to Create Blog Posts"
|
|
3
|
+
description: Creates and publishes blog posts using Blog Posts API. Covers Ricos rich content format, image upload via Media Manager, category/tag assignment, and bulk post creation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**Article: Create and Publish Blog Posts with Rich Content and Images**
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Description
|
|
11
|
+
|
|
12
|
+
This article demonstrates how to create and immediately publish blog posts using Wix Blog REST API, including handling external images, rich content formatting, and proper media management workflow.
|
|
13
|
+
|
|
14
|
+
### Part 0: Get an Author/Member ID (Required for 3rd-Party Apps)
|
|
15
|
+
|
|
16
|
+
**IMPORTANT**: When calling the Blog API as a 3rd-party app (not as the site owner), `draftPost.memberId` is **required**. The API will reject requests with "Missing post owner information" if omitted.
|
|
17
|
+
|
|
18
|
+
1. Query site members to get a valid member ID using [List Members](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/member-management/members/list-members):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
curl -X GET "https://www.wixapis.com/members/v1/members?fieldsets=PUBLIC&paging.limit=1" \
|
|
22
|
+
-H "Authorization: <AUTH>"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
2. Use the `id` field from the response as `draftPost.memberId` when creating the blog post. This member will be the post author.
|
|
26
|
+
|
|
27
|
+
> **Note**: The member ID must belong to an existing site member or collaborator. If the members query returns no results, you may need to create a member first or use the site owner's member ID.
|
|
28
|
+
|
|
29
|
+
### Part 1: Import External Images to Wix Media Manager
|
|
30
|
+
|
|
31
|
+
1. Identify external image URLs from user input for cover images and embedded content images.
|
|
32
|
+
|
|
33
|
+
2. Import each external image using [Import File](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/import-file). This converts external URLs to Wix Media IDs required for blog posts.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
curl -X POST "https://www.wixapis.com/site-media/v1/files/import" \
|
|
37
|
+
-H "Authorization: <AUTH>" \
|
|
38
|
+
-H "Content-Type: application/json" \
|
|
39
|
+
-d '{
|
|
40
|
+
"url": "https://example.com/image.jpg",
|
|
41
|
+
"mediaType": "IMAGE",
|
|
42
|
+
"displayName": "Cover Image.jpg"
|
|
43
|
+
}'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The response will include a `file.id` field. Use this ID in blog post creation. Images with `operationStatus: "PENDING"` can be used immediately.
|
|
47
|
+
|
|
48
|
+
3. Store the returned file IDs for use in blog post creation.
|
|
49
|
+
|
|
50
|
+
### Part 2: Create Blog Post with Rich Content
|
|
51
|
+
|
|
52
|
+
1. Create blog post using [Create Draft Post](https://dev.wix.com/docs/api-reference/business-solutions/blog/draft-posts/create-draft-post) for single posts, or [Bulk Create Draft Posts](https://dev.wix.com/docs/api-reference/business-solutions/blog/draft-posts/bulk-create-draft-posts) for multiple posts.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
curl -X POST "https://www.wixapis.com/blog/v3/draft-posts" \
|
|
56
|
+
-H "Authorization: <AUTH>" \
|
|
57
|
+
-H "Content-Type: application/json" \
|
|
58
|
+
-d '{
|
|
59
|
+
"draftPost": {
|
|
60
|
+
"title": "My Blog Post",
|
|
61
|
+
"memberId": "author-member-id",
|
|
62
|
+
"richContent": {
|
|
63
|
+
"nodes": [
|
|
64
|
+
{
|
|
65
|
+
"type": "PARAGRAPH",
|
|
66
|
+
"nodes": [{
|
|
67
|
+
"type": "TEXT",
|
|
68
|
+
"textData": {
|
|
69
|
+
"text": "This is a paragraph with some content.",
|
|
70
|
+
"decorations": []
|
|
71
|
+
}
|
|
72
|
+
}],
|
|
73
|
+
"paragraphData": {}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"media": {
|
|
78
|
+
"wixMedia": {
|
|
79
|
+
"image": { "id": "mediaId" }
|
|
80
|
+
},
|
|
81
|
+
"displayed": true,
|
|
82
|
+
"custom": true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"publish": true
|
|
86
|
+
}'
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
2. Structure rich content using Ricos JSON format. Reference [Ricos documentation](https://dev.wix.com/docs/api-reference/assets/rich-content/ricos-documents/introduction) for complete node structure. Common node types:
|
|
90
|
+
- `PARAGRAPH` for text content
|
|
91
|
+
- `HEADING` for section headers
|
|
92
|
+
- `IMAGE` for embedded images (requires Wix Media ID)
|
|
93
|
+
- `ORDERED_LIST` and `BULLETED_LIST` for lists
|
|
94
|
+
- `BLOCKQUOTE` for quoted text
|
|
95
|
+
- `LIST_ITEM` for individual list items
|
|
96
|
+
|
|
97
|
+
**CRITICAL**: All TEXT nodes MUST be wrapped in PARAGRAPH nodes within their parent containers.
|
|
98
|
+
|
|
99
|
+
**Correct Ricos structure example:**
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"nodes": [
|
|
104
|
+
{
|
|
105
|
+
"type": "PARAGRAPH",
|
|
106
|
+
"nodes": [
|
|
107
|
+
{
|
|
108
|
+
"type": "TEXT",
|
|
109
|
+
"textData": {
|
|
110
|
+
"text": "This is a paragraph with some content.",
|
|
111
|
+
"decorations": []
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"paragraphData": {}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Correct BLOCKQUOTE structure:**
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"type": "BLOCKQUOTE",
|
|
126
|
+
"nodes": [
|
|
127
|
+
{
|
|
128
|
+
"type": "PARAGRAPH",
|
|
129
|
+
"nodes": [
|
|
130
|
+
{
|
|
131
|
+
"type": "TEXT",
|
|
132
|
+
"textData": { "text": "Quote text here", "decorations": [] }
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"paragraphData": {}
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"blockquoteData": { "indentation": 1 }
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Correct LIST_ITEM structure:**
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"type": "LIST_ITEM",
|
|
147
|
+
"nodes": [
|
|
148
|
+
{
|
|
149
|
+
"type": "PARAGRAPH",
|
|
150
|
+
"nodes": [
|
|
151
|
+
{
|
|
152
|
+
"type": "TEXT",
|
|
153
|
+
"textData": { "text": "List item text", "decorations": [] }
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"paragraphData": {}
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
3. For embedded images in rich content, use IMAGE nodes with Wix Media IDs:
|
|
163
|
+
|
|
164
|
+
```json
|
|
165
|
+
{
|
|
166
|
+
"type": "IMAGE",
|
|
167
|
+
"nodes": [],
|
|
168
|
+
"imageData": {
|
|
169
|
+
"containerData": {
|
|
170
|
+
"width": { "size": "CONTENT" },
|
|
171
|
+
"alignment": "CENTER"
|
|
172
|
+
},
|
|
173
|
+
"image": {
|
|
174
|
+
"src": { "id": "mediaId" },
|
|
175
|
+
"width": 900,
|
|
176
|
+
"height": 600
|
|
177
|
+
},
|
|
178
|
+
"altText": "Descriptive alt text"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
4. Set `publish: true` to immediately publish the post rather than saving as draft.
|
|
184
|
+
|
|
185
|
+
### Part 3: Handle Categories and Tags (Optional)
|
|
186
|
+
|
|
187
|
+
1. Resolve category IDs using [List Categories](https://dev.wix.com/docs/api-reference/business-solutions/blog/category/list-categories) if user provides category names.
|
|
188
|
+
|
|
189
|
+
2. Resolve tag IDs using [Query Tags](https://dev.wix.com/docs/api-reference/business-solutions/blog/tags/query-tags) if user provides tag labels.
|
|
190
|
+
|
|
191
|
+
3. Include resolved IDs in `categoryIds` and `tagIds` arrays in the draft post object.
|
|
192
|
+
|
|
193
|
+
### IMPORTANT NOTES:
|
|
194
|
+
|
|
195
|
+
- Never mock blog posts or media IDs - always use the APIs to import images and create posts
|
|
196
|
+
- Always read the full documentation of methods before implementation
|
|
197
|
+
- External images MUST be imported via Import File API before use in blog posts - direct external URLs will not work
|
|
198
|
+
- For 3rd-party app integrations, `memberId` is mandatory - use the [List Members](https://dev.wix.com/docs/api-reference/crm/members-contacts/members/member-management/members/list-members) API if needed to get member ID
|
|
199
|
+
- Use ONLY the file ID (without `wix:image://v1/` prefix) for both cover images and embedded images
|
|
200
|
+
- Rich content IMAGE nodes require both `width` and `height` properties in the `image` object
|
|
201
|
+
- Images with `"operationStatus": "PENDING"` from import can be used immediately in blog posts
|
|
202
|
+
- Set `publish: true` in the request to publish immediately rather than save as draft
|
|
203
|
+
- For multiple posts, use Bulk Create Draft Posts API with `draftPosts` array
|
|
204
|
+
- Include `fieldsets: ['URL']` to get post URLs in the response
|
|
205
|
+
- Handle image import failures gracefully - continue without images if import fails
|
|
206
|
+
- Provide meaningful `displayName` values during image import for better organization
|
|
207
|
+
- Use appropriate Ricos node types (PARAGRAPH, HEADING, LIST, etc.) for semantic content structure
|
|
208
|
+
- Consider batching image imports when creating multiple posts with many images
|
|
209
|
+
|
|
210
|
+
### CRITICAL RICOS JSON STRUCTURE RULES:
|
|
211
|
+
|
|
212
|
+
- **NEVER place TEXT nodes directly in BLOCKQUOTE, LIST_ITEM, or other container nodes**
|
|
213
|
+
- **ALL TEXT nodes MUST be wrapped in PARAGRAPH nodes within their parent containers**
|
|
214
|
+
- **BLOCKQUOTE nodes must contain PARAGRAPH nodes, which contain TEXT nodes**
|
|
215
|
+
- **LIST_ITEM nodes must contain PARAGRAPH nodes, which contain TEXT nodes**
|
|
216
|
+
- **Failure to follow proper nesting will result in parsing errors: "Expected a paragraph node but found TEXT"**
|
|
217
|
+
- **Always validate Ricos structure before sending to ensure TEXT nodes are properly nested**
|
|
218
|
+
|
|
219
|
+
### Troubleshooting
|
|
220
|
+
|
|
221
|
+
| Error | Cause | Solution |
|
|
222
|
+
| ------------------------------------------ | --------------------------- | ------------------------------------------------------------------- |
|
|
223
|
+
| "Missing post owner information" | `memberId` not provided | Add `draftPost.memberId` - see Part 0 for how to get one |
|
|
224
|
+
| "memberIds ... do not exist" | Invalid member ID | Query members first using List Members API to get valid IDs |
|
|
225
|
+
| "Expected a paragraph node but found TEXT" | Invalid Ricos structure | Wrap TEXT nodes in PARAGRAPH nodes (see structure rules above) |
|
|
226
|
+
| Image not displaying | Using external URL directly | Import image via Media Manager first, then use the returned file ID |
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Booking Service Policy Setup"
|
|
3
|
+
description: Sets up booking policies, cancellation rules, and waitlist configuration using the Services API policy fields. Covers bookingPolicy, cancellationPolicy, and waitlist settings.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Technical Step-by-Step Instructions: Configuring Wix Bookings Service Policies (Real-World, API-First)
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
Below are the recommended steps to successfully configure booking, cancellation, and waitlist policies for Wix Bookings services. This recipe covers policy inheritance, service-specific overrides, and common policy configurations for different business models.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
Wix Bookings policy configuration allows businesses to set rules for:
|
|
17
|
+
|
|
18
|
+
- **Booking policies**: When customers can book, how far in advance, booking deadlines
|
|
19
|
+
- **Cancellation policies**: Cancellation deadlines, refund rules, fees
|
|
20
|
+
- **Waitlist policies**: When waitlists are enabled, capacity handling
|
|
21
|
+
- **Group booking policies**: Maximum participants per booking
|
|
22
|
+
|
|
23
|
+
Policies can be configured at two levels:
|
|
24
|
+
|
|
25
|
+
- **Site-wide (business) policies**: Default rules that apply to all services
|
|
26
|
+
- **Service-specific policies**: Override rules for individual services
|
|
27
|
+
|
|
28
|
+
### IMPORTANT NOTES
|
|
29
|
+
|
|
30
|
+
- Services inherit from site-wide booking policies by default
|
|
31
|
+
- Service policies only override fields you explicitly specify - unspecified fields keep site defaults
|
|
32
|
+
- Policy options available may vary based on service type (APPOINTMENT, CLASS, COURSE)
|
|
33
|
+
- All policy configurations support the same core features across service types
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Steps
|
|
38
|
+
|
|
39
|
+
### 1. Configure Site-Wide Business Policy (Optional)
|
|
40
|
+
|
|
41
|
+
Set default policies that will apply to all services unless overridden. Use the Business Policy API to configure booking deadlines, cancellation rules, waitlist settings, and group booking limits.
|
|
42
|
+
|
|
43
|
+
### 2. Create or Update Service with Policy Overrides
|
|
44
|
+
|
|
45
|
+
When creating or updating a service, specify policy fields that should differ from business defaults. Only include the policy fields you want to override - unspecified fields will inherit from business defaults.
|
|
46
|
+
|
|
47
|
+
### 3. Configure Course-Specific Policies
|
|
48
|
+
|
|
49
|
+
Courses may have additional policy options such as `bookUntilXMinutesAfterStart` which allows customers to join courses even after they've started.
|
|
50
|
+
|
|
51
|
+
### 4. Verify Policy Application
|
|
52
|
+
|
|
53
|
+
Query the service to confirm policies are applied correctly. The service should show explicitly set policy fields with your specified values and unspecified fields inheriting from business defaults.
|
|
54
|
+
|
|
55
|
+
### IMPORTANT NOTES
|
|
56
|
+
|
|
57
|
+
- **Policy inheritance**: Only specify fields you want to override - leave others undefined to inherit business defaults
|
|
58
|
+
- **Partial updates**: When updating service policies, only include fields you want to change
|
|
59
|
+
- **Capacity requirements**: Waitlist policies require service capacity settings to be configured
|
|
60
|
+
- **Group booking considerations**: `maxParticipantsPerBooking` works with all service types
|
|
61
|
+
- **Time calculations**: Policy deadlines are calculated from booking start time in business timezone
|
|
62
|
+
- **Course flexibility**: Course services support additional policy options like `bookUntilXMinutesAfterStart`
|
|
63
|
+
|
|
64
|
+
### Troubleshooting Common Issues
|
|
65
|
+
|
|
66
|
+
**Policies not applying:**
|
|
67
|
+
|
|
68
|
+
- Verify you're setting policies on the service object, not as separate policy entities
|
|
69
|
+
- Check that policy fields are properly nested under `service.policy`
|
|
70
|
+
- Ensure you're updating the correct service ID
|
|
71
|
+
|
|
72
|
+
**Waitlist not working:**
|
|
73
|
+
|
|
74
|
+
- Confirm service has `maxParticipants` capacity set
|
|
75
|
+
- Verify `waitingListPolicy.enabled` is `true`
|
|
76
|
+
- Check that `waitingListPolicy.capacity` is set if you want limited waitlist size
|
|
77
|
+
|
|
78
|
+
**Cancellation policies not enforced:**
|
|
79
|
+
|
|
80
|
+
- Ensure `cancelRescheduleUpToInMinutes` is set to appropriate value
|
|
81
|
+
- Verify `cancelationAllowed` is `true` if cancellations should be permitted
|
|
82
|
+
- Check that payment and booking flow supports the configured policy
|
|
83
|
+
|
|
84
|
+
**Group booking limits not working:**
|
|
85
|
+
|
|
86
|
+
- Confirm `maxParticipantsPerBooking` is set to desired limit
|
|
87
|
+
- Verify service type supports group bookings (all types do)
|
|
88
|
+
- Check that booking UI respects the participant limit
|
|
89
|
+
|
|
90
|
+
## API Documentation References
|
|
91
|
+
|
|
92
|
+
- [Booking Policies API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/policies/introduction)
|
|
93
|
+
- [Bulk Create Services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/bulk-create-services) — `POST https://www.wixapis.com/bookings/v2/bulk/services/create`
|
|
94
|
+
- [Update Service](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/update-service) — `PATCH https://www.wixapis.com/bookings/v2/services/<SERVICE_ID>`
|
|
95
|
+
- [Query Services](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/query-services) — `POST https://www.wixapis.com/bookings/v2/services/query`
|