@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,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "List Events"
|
|
3
|
+
description: Queries events from Wix Events using Events API. Covers field sets (DETAILS, URLS, REGISTRATION), filtering by status/date, and pagination.
|
|
4
|
+
---
|
|
5
|
+
# List Events with Wix Events API
|
|
6
|
+
|
|
7
|
+
This recipe demonstrates how to query and list events from Wix Events using the REST API.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
- Wix Events app installed on the site
|
|
12
|
+
- API access with events permissions
|
|
13
|
+
|
|
14
|
+
## Required APIs
|
|
15
|
+
|
|
16
|
+
- **Events API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/query-events)
|
|
17
|
+
- **Filter and Sort Guidelines**: [Documentation](https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/filter-and-sort)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Step 1: Verify Events App is Installed
|
|
22
|
+
|
|
23
|
+
Before querying events, ensure Wix Events is installed on the site. If not, use the [Install Wix Apps](../app-installation/install-wix-apps.md) recipe to install it.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 2: Query Events
|
|
28
|
+
|
|
29
|
+
**Endpoint**: `POST https://www.wixapis.com/events/v3/events/query`
|
|
30
|
+
|
|
31
|
+
**Request Body**:
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"query": {
|
|
35
|
+
"paging": {
|
|
36
|
+
"limit": 10
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"fields": ["DETAILS", "URLS"]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Request**:
|
|
44
|
+
```bash
|
|
45
|
+
curl -X POST \
|
|
46
|
+
'https://www.wixapis.com/events/v3/events/query' \
|
|
47
|
+
-H 'Authorization: <AUTH>' \
|
|
48
|
+
-H 'Content-Type: application/json' \
|
|
49
|
+
-d '{
|
|
50
|
+
"query": {
|
|
51
|
+
"paging": {
|
|
52
|
+
"limit": 10
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"fields": ["DETAILS", "URLS"]
|
|
56
|
+
}'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Available Field Sets
|
|
60
|
+
|
|
61
|
+
The `fields` parameter determines which data is returned. You MUST specify at least `"DETAILS"`.
|
|
62
|
+
|
|
63
|
+
| Field Set | Description |
|
|
64
|
+
|-----------|-------------|
|
|
65
|
+
| `DETAILS` | Core event information (required) |
|
|
66
|
+
| `URLS` | Event page URLs |
|
|
67
|
+
| `CATEGORIES` | Event categories |
|
|
68
|
+
| `AGENDA` | Event schedule/agenda |
|
|
69
|
+
| `SEO_SETTINGS` | SEO metadata |
|
|
70
|
+
| `REGISTRATION` | Registration settings |
|
|
71
|
+
| `TEXTS` | Custom text content |
|
|
72
|
+
| `FORM` | Registration form configuration |
|
|
73
|
+
| `DASHBOARD` | Dashboard settings |
|
|
74
|
+
| `FEED` | Social feed settings |
|
|
75
|
+
| `ONLINE_CONFERENCING_SESSION` | Virtual event settings |
|
|
76
|
+
|
|
77
|
+
### IMPORTANT NOTES:
|
|
78
|
+
- I MUST specify at least `"DETAILS"` in the `fields` array
|
|
79
|
+
- I MUST NEVER use `"FULL"` as a field value
|
|
80
|
+
- If the user wants event links, I MUST include `"URLS"` in the fields
|
|
81
|
+
- Follow the [Filter and Sort Guidelines](https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/filter-and-sort) for query filtering
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Step 3: Filter Events (Optional)
|
|
86
|
+
|
|
87
|
+
Apply filters to narrow down results:
|
|
88
|
+
|
|
89
|
+
**Filter by Status**:
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"query": {
|
|
93
|
+
"filter": {
|
|
94
|
+
"status": "UPCOMING"
|
|
95
|
+
},
|
|
96
|
+
"paging": {
|
|
97
|
+
"limit": 10
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"fields": ["DETAILS"]
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
> **Note:** Valid status values are: `UPCOMING`, `STARTED`, `ENDED`, `CANCELED`, `DRAFT`.
|
|
105
|
+
|
|
106
|
+
**Filter by Date Range**:
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"query": {
|
|
110
|
+
"filter": {
|
|
111
|
+
"dateAndTimeSettings.startDate": {
|
|
112
|
+
"$gte": "2024-01-01T00:00:00Z",
|
|
113
|
+
"$lte": "2024-12-31T23:59:59Z"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"paging": {
|
|
117
|
+
"limit": 10
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"fields": ["DETAILS"]
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Response Structure
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"events": [
|
|
131
|
+
{
|
|
132
|
+
"id": "event-id-123",
|
|
133
|
+
"title": "Event Title",
|
|
134
|
+
"shortDescription": "Event description",
|
|
135
|
+
"status": "UPCOMING",
|
|
136
|
+
"dateAndTimeSettings": {
|
|
137
|
+
"startDate": "2024-06-15T10:00:00Z",
|
|
138
|
+
"endDate": "2024-06-15T18:00:00Z",
|
|
139
|
+
"timeZoneId": "America/New_York",
|
|
140
|
+
"dateAndTimeTbd": false,
|
|
141
|
+
"recurrenceStatus": "ONE_TIME"
|
|
142
|
+
},
|
|
143
|
+
"location": {
|
|
144
|
+
"type": "VENUE",
|
|
145
|
+
"address": {}
|
|
146
|
+
},
|
|
147
|
+
"slug": "event-slug"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"pagingMetadata": {
|
|
151
|
+
"count": 10,
|
|
152
|
+
"hasNext": true
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Common Use Cases
|
|
160
|
+
|
|
161
|
+
### List Upcoming Events
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"query": {
|
|
165
|
+
"filter": {
|
|
166
|
+
"status": "UPCOMING",
|
|
167
|
+
"dateAndTimeSettings.startDate": {
|
|
168
|
+
"$gte": "2024-01-01T00:00:00Z"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"sort": [
|
|
172
|
+
{
|
|
173
|
+
"fieldName": "dateAndTimeSettings.startDate",
|
|
174
|
+
"order": "ASC"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"paging": {
|
|
178
|
+
"limit": 20
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"fields": ["DETAILS", "URLS"]
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### List Events with Registration Info
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"query": {
|
|
189
|
+
"paging": {
|
|
190
|
+
"limit": 10
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"fields": ["DETAILS", "REGISTRATION", "FORM"]
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Next Steps
|
|
200
|
+
|
|
201
|
+
- Create events using the [Create Event API](https://dev.wix.com/docs/api-reference/business-solutions/events/event-management/events-v3/create-event)
|
|
202
|
+
- Manage RSVPs and registrations
|
|
203
|
+
- Configure event tickets and pricing
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Create Form"
|
|
3
|
+
description: Creates a form with fields (name, email, etc.) using the Form Schemas API. Covers field configuration, layout, and post-submission triggers.
|
|
4
|
+
---
|
|
5
|
+
# RECIPE: Create a Wix Form
|
|
6
|
+
|
|
7
|
+
Create a form on a Wix site that appears in the Forms & Submissions dashboard. The form collects visitor information (e.g., name, email) and can automatically upsert contacts on submission.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Create the form
|
|
12
|
+
|
|
13
|
+
Call the Create Form endpoint with the `wix.form_app.form` namespace. The Wix Forms app (appDefId: `14ce1214-b278-a7e4-1373-00cebd1bef7c`) is usually already installed on sites.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -X POST \
|
|
17
|
+
'https://www.wixapis.com/form-schema-service/v4/forms' \
|
|
18
|
+
-H 'Content-Type: application/json' \
|
|
19
|
+
-H 'Authorization: <AUTH>' \
|
|
20
|
+
-d '{
|
|
21
|
+
"form": {
|
|
22
|
+
"name": "Contact Form",
|
|
23
|
+
"namespace": "wix.form_app.form",
|
|
24
|
+
"enabled": true,
|
|
25
|
+
"spamFilterProtectionLevel": "ADVANCED",
|
|
26
|
+
"formFields": [
|
|
27
|
+
{
|
|
28
|
+
"id": "c1a2b3d4-0001-4a00-b000-000000000001",
|
|
29
|
+
"hidden": false,
|
|
30
|
+
"identifier": "CONTACTS_FIRST_NAME",
|
|
31
|
+
"fieldType": "INPUT",
|
|
32
|
+
"inputOptions": {
|
|
33
|
+
"target": "first_name_0001",
|
|
34
|
+
"pii": true,
|
|
35
|
+
"required": false,
|
|
36
|
+
"inputType": "STRING",
|
|
37
|
+
"readOnly": false,
|
|
38
|
+
"stringOptions": {
|
|
39
|
+
"validation": {
|
|
40
|
+
"format": "UNKNOWN_FORMAT",
|
|
41
|
+
"enum": []
|
|
42
|
+
},
|
|
43
|
+
"componentType": "TEXT_INPUT",
|
|
44
|
+
"textInputOptions": {
|
|
45
|
+
"label": "First name",
|
|
46
|
+
"showLabel": true
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "c1a2b3d4-0002-4a00-b000-000000000002",
|
|
53
|
+
"hidden": false,
|
|
54
|
+
"identifier": "CONTACTS_LAST_NAME",
|
|
55
|
+
"fieldType": "INPUT",
|
|
56
|
+
"inputOptions": {
|
|
57
|
+
"target": "last_name_0002",
|
|
58
|
+
"pii": true,
|
|
59
|
+
"required": false,
|
|
60
|
+
"inputType": "STRING",
|
|
61
|
+
"readOnly": false,
|
|
62
|
+
"stringOptions": {
|
|
63
|
+
"validation": {
|
|
64
|
+
"format": "UNKNOWN_FORMAT",
|
|
65
|
+
"enum": []
|
|
66
|
+
},
|
|
67
|
+
"componentType": "TEXT_INPUT",
|
|
68
|
+
"textInputOptions": {
|
|
69
|
+
"label": "Last name",
|
|
70
|
+
"showLabel": true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "c1a2b3d4-0003-4a00-b000-000000000003",
|
|
77
|
+
"hidden": false,
|
|
78
|
+
"identifier": "CONTACTS_EMAIL",
|
|
79
|
+
"fieldType": "INPUT",
|
|
80
|
+
"inputOptions": {
|
|
81
|
+
"target": "email_0003",
|
|
82
|
+
"pii": true,
|
|
83
|
+
"required": true,
|
|
84
|
+
"inputType": "STRING",
|
|
85
|
+
"readOnly": false,
|
|
86
|
+
"stringOptions": {
|
|
87
|
+
"validation": {
|
|
88
|
+
"format": "EMAIL",
|
|
89
|
+
"enum": []
|
|
90
|
+
},
|
|
91
|
+
"componentType": "TEXT_INPUT",
|
|
92
|
+
"textInputOptions": {
|
|
93
|
+
"label": "Email",
|
|
94
|
+
"showLabel": true
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "c1a2b3d4-0004-4a00-b000-000000000004",
|
|
101
|
+
"hidden": false,
|
|
102
|
+
"identifier": "TEXT_INPUT",
|
|
103
|
+
"fieldType": "INPUT",
|
|
104
|
+
"inputOptions": {
|
|
105
|
+
"target": "message_0004",
|
|
106
|
+
"pii": false,
|
|
107
|
+
"required": false,
|
|
108
|
+
"inputType": "STRING",
|
|
109
|
+
"readOnly": false,
|
|
110
|
+
"stringOptions": {
|
|
111
|
+
"validation": {
|
|
112
|
+
"format": "UNKNOWN_FORMAT",
|
|
113
|
+
"enum": []
|
|
114
|
+
},
|
|
115
|
+
"componentType": "TEXT_INPUT",
|
|
116
|
+
"textInputOptions": {
|
|
117
|
+
"label": "Message",
|
|
118
|
+
"showLabel": true
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "c1a2b3d4-0005-4a00-b000-000000000005",
|
|
125
|
+
"hidden": false,
|
|
126
|
+
"identifier": "SUBMIT_BUTTON",
|
|
127
|
+
"fieldType": "DISPLAY",
|
|
128
|
+
"displayOptions": {
|
|
129
|
+
"displayFieldType": "PAGE_NAVIGATION",
|
|
130
|
+
"pageNavigationOptions": {
|
|
131
|
+
"nextPageText": "Next",
|
|
132
|
+
"previousPageText": "Back",
|
|
133
|
+
"submitText": "Submit"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"steps": [
|
|
139
|
+
{
|
|
140
|
+
"id": "d1e2f3a4-0001-4b00-c000-000000000001",
|
|
141
|
+
"name": "Page 1",
|
|
142
|
+
"hidden": false,
|
|
143
|
+
"layout": {
|
|
144
|
+
"large": {
|
|
145
|
+
"items": [
|
|
146
|
+
{ "fieldId": "c1a2b3d4-0001-4a00-b000-000000000001", "row": 0, "column": 0, "width": 6, "height": 1 },
|
|
147
|
+
{ "fieldId": "c1a2b3d4-0002-4a00-b000-000000000002", "row": 0, "column": 6, "width": 6, "height": 1 },
|
|
148
|
+
{ "fieldId": "c1a2b3d4-0003-4a00-b000-000000000003", "row": 1, "column": 0, "width": 12, "height": 1 },
|
|
149
|
+
{ "fieldId": "c1a2b3d4-0004-4a00-b000-000000000004", "row": 2, "column": 0, "width": 12, "height": 1 },
|
|
150
|
+
{ "fieldId": "c1a2b3d4-0005-4a00-b000-000000000005", "row": 3, "column": 6, "width": 6, "height": 1 }
|
|
151
|
+
],
|
|
152
|
+
"sections": []
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"postSubmissionTriggers": {
|
|
158
|
+
"upsertContact": {
|
|
159
|
+
"fieldsMapping": {
|
|
160
|
+
"first_name_0001": { "contactField": "FIRST_NAME" },
|
|
161
|
+
"last_name_0002": { "contactField": "LAST_NAME" },
|
|
162
|
+
"email_0003": { "contactField": "EMAIL", "emailInfo": { "tag": "UNTAGGED" } }
|
|
163
|
+
},
|
|
164
|
+
"labels": []
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"submitSettings": {
|
|
168
|
+
"submitSuccessAction": "THANK_YOU_MESSAGE",
|
|
169
|
+
"thankYouMessageOptions": {
|
|
170
|
+
"durationInSeconds": 8,
|
|
171
|
+
"richContent": {
|
|
172
|
+
"nodes": [
|
|
173
|
+
{
|
|
174
|
+
"type": "PARAGRAPH",
|
|
175
|
+
"id": "ty1",
|
|
176
|
+
"nodes": [
|
|
177
|
+
{
|
|
178
|
+
"type": "TEXT",
|
|
179
|
+
"id": "",
|
|
180
|
+
"nodes": [],
|
|
181
|
+
"textData": {
|
|
182
|
+
"text": "Thanks, we received your submission.",
|
|
183
|
+
"decorations": []
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"paragraphData": {
|
|
188
|
+
"textStyle": { "textAlignment": "CENTER" }
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"metadata": {
|
|
193
|
+
"version": 1,
|
|
194
|
+
"createdTimestamp": "2025-01-01T00:00:00.000Z",
|
|
195
|
+
"updatedTimestamp": "2025-01-01T00:00:00.000Z",
|
|
196
|
+
"id": "thank-you-msg-001"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}'
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
The response includes the created form with its `id`. Store this ID to manage the form later.
|
|
206
|
+
|
|
207
|
+
Verify the form in the dashboard: `https://manage.wix.com/dashboard/{siteId}/forms`
|
|
208
|
+
|
|
209
|
+
## Key Details
|
|
210
|
+
|
|
211
|
+
### Field Configuration
|
|
212
|
+
|
|
213
|
+
- All `id` fields (for `formFields`, `steps`) and all `fieldId` references in the layout **must be valid UUIDs**. Generate fresh UUIDs for each form you create — do not reuse the example UUIDs above.
|
|
214
|
+
- Each field needs a unique `id` and a unique `target` value. The `target` is used to map submissions to contact fields.
|
|
215
|
+
- **CRITICAL: The `identifier` must be a recognized Wix value.** Custom identifiers like `"product_name"` or `"color_preference"` will cause the field to be silently dropped from the form — no error is thrown. For any generic/custom text field, use `"TEXT_INPUT"` as the identifier and set the display name via the `label` property in `textInputOptions`.
|
|
216
|
+
- For plain text fields, use `"format": "UNKNOWN_FORMAT"`. For email fields, use `"format": "EMAIL"`. For phone fields, use `"format": "PHONE"`. Valid format values: `UNKNOWN_FORMAT`, `DATE`, `TIME`, `DATE_TIME`, `EMAIL`, `URL`, `UUID`, `PHONE`, `URI`, `HOSTNAME`, `COLOR_HEX`, `CURRENCY`, `LANGUAGE`, `DATE_OPTIONAL_TIME`.
|
|
217
|
+
- The submit button is a `DISPLAY` field with `identifier: "SUBMIT_BUTTON"`.
|
|
218
|
+
|
|
219
|
+
### Field Types Reference
|
|
220
|
+
|
|
221
|
+
| Identifier | componentType | format | Use case |
|
|
222
|
+
|---|---|---|---|
|
|
223
|
+
| `TEXT_INPUT` | `TEXT_INPUT` | `UNKNOWN_FORMAT` | Generic single-line text (use `label` for display name) |
|
|
224
|
+
| `CONTACTS_FIRST_NAME` | `TEXT_INPUT` | `UNKNOWN_FORMAT` | Contact first name |
|
|
225
|
+
| `CONTACTS_LAST_NAME` | `TEXT_INPUT` | `UNKNOWN_FORMAT` | Contact last name |
|
|
226
|
+
| `CONTACTS_EMAIL` | `TEXT_INPUT` | `EMAIL` | Contact email |
|
|
227
|
+
| `CONTACTS_PHONE` | `TEXT_INPUT` | `PHONE` | Contact phone |
|
|
228
|
+
| `SUBMIT_BUTTON` | N/A (`DISPLAY` field) | N/A | Submit button |
|
|
229
|
+
|
|
230
|
+
> **Note:** `LONG_TEXT_INPUT` is not supported as a `componentType` via REST — it throws `INVALID_ARGUMENT`. Use `TEXT_INPUT` for all text fields.
|
|
231
|
+
|
|
232
|
+
### Layout
|
|
233
|
+
|
|
234
|
+
The `steps[].layout.large.items` array controls how fields are positioned:
|
|
235
|
+
- `row` and `column` set the position (0-based grid)
|
|
236
|
+
- `width` sets the column span (max 12 for full width, 6 for half)
|
|
237
|
+
- `height` is typically 1
|
|
238
|
+
|
|
239
|
+
### Post-Submission Triggers
|
|
240
|
+
|
|
241
|
+
The `postSubmissionTriggers.upsertContact` object maps form field targets to contact fields, so each submission automatically creates or updates a contact. The `fieldsMapping` keys must match the `target` values from the form fields.
|
|
242
|
+
|
|
243
|
+
### Prerequisites
|
|
244
|
+
|
|
245
|
+
The Wix Forms app (appDefId: `14ce1214-b278-a7e4-1373-00cebd1bef7c`) must be installed on the site. It is usually pre-installed, but if the API returns a "missing installed app" error, install it first using the [Install Wix Apps](../app-installation/install-wix-apps.md) recipe.
|
|
246
|
+
|
|
247
|
+
## Troubleshooting
|
|
248
|
+
|
|
249
|
+
| Error | Cause | Fix |
|
|
250
|
+
|---|---|---|
|
|
251
|
+
| `Unrecognized value passed for enum` | Invalid `componentType` value (e.g., `LONG_TEXT_INPUT`) | Use only `componentType` values from the schema: `TEXT_INPUT`, `RADIO_GROUP`, `DROPDOWN`, `DATE_TIME`, `PHONE_INPUT`, `DATE_INPUT`, `TIME_INPUT`, `DATE_PICKER`, `PASSWORD` |
|
|
252
|
+
| Field silently missing from created form | Custom `identifier` value (e.g., `"product_name"`) | Use a recognized identifier like `TEXT_INPUT` and set display name via `label` |
|
|
253
|
+
| `Permissions for given namespace not found` | `wix.form_app.form` namespace not active | Ensure the Wix Forms app is installed; try creating a form through the UI first to activate the namespace |
|
|
254
|
+
| `missing installed app` | Wix Forms app not installed | Install app `14ce1214-b278-a7e4-1373-00cebd1bef7c` via the [Install Wix Apps](../app-installation/install-wix-apps.md) recipe |
|
|
255
|
+
|
|
256
|
+
## Related Documentation
|
|
257
|
+
|
|
258
|
+
- [Form Schemas API Introduction](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/introduction)
|
|
259
|
+
- [Create Form API Reference](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/create-form)
|
|
260
|
+
- [Form Submissions API](https://dev.wix.com/docs/api-reference/crm/forms/form-submissions/introduction)
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Create Payment Links"
|
|
3
|
+
description: Creates payment links for collecting payments without a checkout flow. Covers store products (catalog items), custom line items, variants, due dates, and sending links via email.
|
|
4
|
+
---
|
|
5
|
+
# Create Payment Links
|
|
6
|
+
|
|
7
|
+
This recipe shows how to create and manage payment links using the current Payment Links REST API.
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. Site is premium.
|
|
12
|
+
2. Site is published.
|
|
13
|
+
3. Site is set up to accept payments (Wix Payments onboarding completed).
|
|
14
|
+
4. App has payment-link permissions.
|
|
15
|
+
5. Wix Stores is installed if you plan to charge for catalog products.
|
|
16
|
+
|
|
17
|
+
## Required APIs
|
|
18
|
+
|
|
19
|
+
- **Payment Links API**: [REST](https://dev.wix.com/docs/api-reference/business-management/get-paid/payment-links/payment-links/create-payment-link)
|
|
20
|
+
- **Products API**: [REST](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/query-products)
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
Payment links are created at:
|
|
25
|
+
|
|
26
|
+
- `POST https://www.wixapis.com/payment-links/v1/payment-links`
|
|
27
|
+
|
|
28
|
+
Use one of these payment-link types:
|
|
29
|
+
|
|
30
|
+
- `ECOM`: charge for custom or catalog line items.
|
|
31
|
+
- `ECOM_ORDER`: collect payment for an existing unpaid eCommerce order.
|
|
32
|
+
|
|
33
|
+
## Step 1: Retrieve product details (optional)
|
|
34
|
+
|
|
35
|
+
If you plan to use catalog items, fetch the product first.
|
|
36
|
+
|
|
37
|
+
**Examples**:
|
|
38
|
+
|
|
39
|
+
- Catalog V1: `GET https://www.wixapis.com/stores/v1/products/{productId}`
|
|
40
|
+
- Catalog V1 query: `POST https://www.wixapis.com/stores/v1/products/query`
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"query": {
|
|
45
|
+
"paging": {
|
|
46
|
+
"limit": 50,
|
|
47
|
+
"offset": 0
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Step 2: Create an `ECOM` payment link with custom line items
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"paymentLink": {
|
|
58
|
+
"title": "Business Listing Fee",
|
|
59
|
+
"description": "One-time listing fee",
|
|
60
|
+
"currency": "USD",
|
|
61
|
+
"type": "ECOM",
|
|
62
|
+
"ecomPaymentLink": {
|
|
63
|
+
"lineItems": [
|
|
64
|
+
{
|
|
65
|
+
"type": "CUSTOM",
|
|
66
|
+
"customItem": {
|
|
67
|
+
"name": "Listing Fee",
|
|
68
|
+
"quantity": 1,
|
|
69
|
+
"price": "200.00"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Step 3: Create an `ECOM` payment link with catalog items
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"paymentLink": {
|
|
83
|
+
"title": "Product Payment",
|
|
84
|
+
"currency": "USD",
|
|
85
|
+
"type": "ECOM",
|
|
86
|
+
"ecomPaymentLink": {
|
|
87
|
+
"lineItems": [
|
|
88
|
+
{
|
|
89
|
+
"type": "CATALOG",
|
|
90
|
+
"catalogItem": {
|
|
91
|
+
"quantity": 1,
|
|
92
|
+
"catalogReference": {
|
|
93
|
+
"appId": "215238eb-22a5-4c36-9e7b-e7c08025e04e",
|
|
94
|
+
"catalogItemId": "PRODUCT_ID",
|
|
95
|
+
"options": {
|
|
96
|
+
"variantId": "VARIANT_ID"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Step 4: Create an `ECOM_ORDER` payment link for an existing order
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"paymentLink": {
|
|
112
|
+
"title": "Order Balance",
|
|
113
|
+
"currency": "USD",
|
|
114
|
+
"type": "ECOM_ORDER",
|
|
115
|
+
"paymentsLimit": 1,
|
|
116
|
+
"ecomOrderPaymentLink": {
|
|
117
|
+
"orderId": "ORDER_ID",
|
|
118
|
+
"amount": "50"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Step 5: Send payment link to recipients
|
|
125
|
+
|
|
126
|
+
Use:
|
|
127
|
+
|
|
128
|
+
- `POST https://www.wixapis.com/payment-links/v1/payment-links/{paymentLinkId}/send`
|
|
129
|
+
|
|
130
|
+
Request body:
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"paymentLinkId": "PAYMENT_LINK_ID",
|
|
135
|
+
"recipients": [
|
|
136
|
+
{
|
|
137
|
+
"contactId": "CONTACT_ID",
|
|
138
|
+
"sendMethods": ["EMAIL_METHOD"]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Step 6: Query and manage payment links
|
|
145
|
+
|
|
146
|
+
Query:
|
|
147
|
+
|
|
148
|
+
- `POST https://www.wixapis.com/payment-links/v1/payment-links/query`
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"query": {
|
|
153
|
+
"filter": {
|
|
154
|
+
"status": "ACTIVE"
|
|
155
|
+
},
|
|
156
|
+
"cursorPaging": {
|
|
157
|
+
"limit": 50
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Get one:
|
|
164
|
+
|
|
165
|
+
- `GET https://www.wixapis.com/payment-links/v1/payment-links/{paymentLinkId}`
|
|
166
|
+
|
|
167
|
+
Deactivate:
|
|
168
|
+
|
|
169
|
+
- `POST https://www.wixapis.com/payment-links/v1/payment-links/{paymentLinkId}/deactivate`
|
|
170
|
+
|
|
171
|
+
Activate:
|
|
172
|
+
|
|
173
|
+
- `POST https://www.wixapis.com/payment-links/v1/payment-links/{paymentLinkId}/activate`
|
|
174
|
+
|
|
175
|
+
Delete (only when no payments were received):
|
|
176
|
+
|
|
177
|
+
- `DELETE https://www.wixapis.com/payment-links/v1/payment-links/{paymentLinkId}`
|
|
178
|
+
|
|
179
|
+
## Payment Link Statuses
|
|
180
|
+
|
|
181
|
+
| Status | Description |
|
|
182
|
+
|--------|-------------|
|
|
183
|
+
| `ACTIVE` | Link is active and can receive payments |
|
|
184
|
+
| `INACTIVE` | Link is inactive and cannot receive payments |
|
|
185
|
+
| `PAID` | Payment has been completed |
|
|
186
|
+
| `EXPIRED` | Link has passed its expiration date |
|
|
187
|
+
|
|
188
|
+
## Common Errors
|
|
189
|
+
|
|
190
|
+
| Error Code | Meaning |
|
|
191
|
+
|------------|---------|
|
|
192
|
+
| `UNPUBLISHED_SITE` | Site must be published before creating payment links |
|
|
193
|
+
| `MISSING_ACCEPT_PAYMENTS` | Site is not set up to accept payments |
|
|
194
|
+
| `FAILED_TO_INSTALL_ECOM` | Required eCommerce capability is missing |
|
|
195
|
+
| `RECIPIENT_NOT_FOUND` | Provided recipient contact does not exist |
|
|
196
|
+
| `ORDER_NOT_FOUND` | Provided order ID does not exist |
|
|
197
|
+
| `INVALID_PAYMENTS_LIMIT_FOR_ECOM_ORDER_PAYMENT_LINK` | `ECOM_ORDER` links require `paymentsLimit: 1` |
|
|
198
|
+
|
|
199
|
+
## Best Practices
|
|
200
|
+
|
|
201
|
+
1. Validate prerequisites first (premium, published, payments enabled).
|
|
202
|
+
2. Use `ECOM` for line-item collection and `ECOM_ORDER` for existing unpaid orders.
|
|
203
|
+
3. Use IDs from real entities (products, variants, contacts, orders).
|
|
204
|
+
4. Keep currency aligned with your business/order currency rules.
|
|
205
|
+
5. Persist payment-link IDs and monitor status via query/get methods.
|
|
206
|
+
|
|
207
|
+
## Related Documentation
|
|
208
|
+
|
|
209
|
+
- [Payment Links API Reference](https://dev.wix.com/docs/api-reference/business-management/get-paid/payment-links/payment-links/introduction)
|
|
210
|
+
- [Payments Overview](https://dev.wix.com/docs/api-reference/business-management/get-paid/payment-links/introduction)
|
|
211
|
+
- [Products API Reference](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/introduction)
|
|
212
|
+
- [Send Payment Link](https://dev.wix.com/docs/api-reference/business-management/get-paid/payment-links/payment-links/send-payment-link)
|