@wix/agent-skills 1.18.2 → 1.19.1
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/package.json +1 -1
- package/skills/wix-app/SKILL.md +42 -40
- package/skills/wix-app/references/BACKEND_API.md +151 -152
- package/skills/wix-app/references/DASHBOARD_PAGE.md +6 -10
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +16 -7
- package/skills/wix-app/references/EXTENSION_REGISTRATION.md +12 -8
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +53 -131
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +1 -2
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +83 -73
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +3 -2
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +9 -0
- package/skills/wix-app/references/editor-react-component/PARTS.md +5 -2
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +1 -1
- package/skills/wix-app/scripts/pkg-root.cjs +73 -0
- package/skills/wix-app/scripts/scan-a11y-code.cjs +310 -40
- package/skills/wix-app/scripts/scan-a11y-eslint.cjs +118 -24
- package/skills/wix-app/scripts/scan-a11y-render.cjs +551 -0
- package/skills/wix-app/scripts/scan-a11y-review.cjs +373 -0
- package/skills/wix-base44-connector/SKILL.md +24 -22
- package/skills/wix-base44-connector/scripts/utils.cjs +39 -3
- package/skills/wix-docs/SKILL.md +47 -20
- package/skills/wix-headless/entry/bootstrap.mjs +106 -50
- package/skills/wix-headless/entry/skill.md +5 -3
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +25 -5
- package/skills/wix-headless-fast/SKILL.md +25 -7
- package/skills/wix-headless-fast/entry/skill.md +23 -14
- package/skills/wix-headless-fast/install/fast-path.mjs +48 -5
- package/skills/wix-headless-fast/install/pin-agents-md.mjs +57 -0
- package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +3 -3
- package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +204 -35
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +146 -36
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +8 -2
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +95 -20
- package/skills/wix-headless-fast/references/storefront/seed/SEED.md +21 -2
- package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +104 -18
- package/skills/wix-manage/SKILL.md +14 -8
- package/skills/wix-manage/references/bookings/booking-service-policy-setup.md +59 -33
- package/skills/wix-manage/references/bookings/bookings-staff-setup.md +45 -22
- package/skills/wix-manage/references/bookings/multi-resource-service-creation.md +70 -12
- package/skills/wix-manage/references/calendar/configure-default-business-hours.md +53 -17
- package/skills/wix-manage/references/google-ads/billing-and-payment.md +3 -3
- package/skills/wix-manage/references/google-ads/create-performance-max-campaign.md +8 -8
- package/skills/wix-manage/references/google-ads/get-campaign-suggestions.md +4 -4
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +1 -1
- package/skills/wix-manage/references/google-ads/install-and-create-account.md +9 -9
- package/skills/wix-manage/references/google-ads/query-campaign-analytics.md +7 -7
- package/skills/wix-manage/references/seo/manage-content-plan.md +181 -135
- package/skills/wix-manage/references/seo/manage-google-search-console.md +272 -0
- package/skills/wix-manage/references/sites/upload-static-site.md +53 -0
- package/skills/wix-manage/references/stores/change-store-currency.md +1 -1
- package/skills/wix-manage/references/stores/create-product-catalog-v3.md +17 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +12 -9
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +12 -9
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +1 -1
- package/skills/wix-vibe-headless/platforms/base44.md +11 -3
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +5 -1
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +5 -4
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.cjs +33 -5
- package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +0 -80
- package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +0 -140
- package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +0 -112
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductCard.tsx +0 -100
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductDetailView.tsx +0 -130
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductGrid.tsx +0 -48
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ShopView.tsx +0 -66
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/VariantPicker.tsx +0 -103
- package/skills/wix-headless-fast/references/storefront/app-astro/pages/products/[slug].astro +0 -56
- package/skills/wix-headless-fast/references/storefront/app-astro/pages/shop.astro +0 -23
|
@@ -68,7 +68,8 @@ The most common mistake is confusing which ID to use in which API call, leading
|
|
|
68
68
|
|
|
69
69
|
* **Two-Step Requirement**: Custom working hours requires both `assignWorkingHoursSchedule` AND creating `WORKING_HOURS` events. Only doing the first step results in staff with no actual working hours.
|
|
70
70
|
* **Foundation Dependencies**: Staff operations require Wix Bookings app installation and proper business schedule configuration. "Business schedule not found" errors indicate missing foundation setup.
|
|
71
|
-
* **
|
|
71
|
+
* **Bulk Request Envelope**: `bulkCreateEvents` requires each event to be wrapped in an `event` object — `{"events": [{"event": {...}}], "returnEntity": true}`. Sending a flat `{"events": [{...}]}` fails with 400 `event must not be empty`. Pass `returnEntity: true` to get the created events back; otherwise the response contains only `itemMetadata`.
|
|
72
|
+
* **Minimal Event Fields**: A `WORKING_HOURS` event needs only `type`, `scheduleId`, `start.localDate`, `end.localDate`, and (for recurring hours) `recurrenceRule`. The server derives `externalScheduleId` (set to the staff member's resource ID automatically), `adjustedStart`/`adjustedEnd`, and `appId`; `resources` may stay empty on a working-hours schedule.
|
|
72
73
|
* **Revision Numbers**: Event updates ALWAYS require the current revision number. Fetch current event details before any update operation.
|
|
73
74
|
* **Time Format Precision**: All date/time fields must use precise ISO 8601 format (`YYYY-MM-DDTHH:mm:ss`) without timezone indicators.
|
|
74
75
|
* **Separate Events for Each Day**: Each working day requires a separate event with single-day recurrence rules. You cannot specify multiple days in one event's `recurrenceRule.days` array.
|
|
@@ -113,9 +114,7 @@ Before creating staff members, ensure the foundation is properly configured:
|
|
|
113
114
|
|
|
114
115
|
**Install Wix Bookings App** (if needed): Use the App Installer API with Wix Bookings app ID: `13d21c63-b5ec-5912-8397-c3a5ddb27a97`.
|
|
115
116
|
|
|
116
|
-
**Configure Business Schedule**:
|
|
117
|
-
|
|
118
|
-
**Create Calendar Schedule and Working Hours**: Create a calendar schedule for Wix Bookings integration and populate it with business `WORKING_HOURS` events.
|
|
117
|
+
**Configure Business Schedule**: Default business hours live as `WORKING_HOURS` calendar events on the business schedule — set them up per the [Configure Default Business Hours](../calendar/configure-default-business-hours.md) recipe. Do **not** use the Site Properties API for this: its business-schedule fields are separate general site info and do not drive Bookings availability.
|
|
119
118
|
|
|
120
119
|
### 2. Verify Current Business Hours (CRITICAL)
|
|
121
120
|
|
|
@@ -156,11 +155,10 @@ Create staff members using the Staff API (`POST https://www.wixapis.com/bookings
|
|
|
156
155
|
|
|
157
156
|
**⚠️ INHERITANCE MOMENT**: The moment this API call completes, the staff member inherits the current business hours. There's no "undo" for this inheritance.
|
|
158
157
|
|
|
159
|
-
**Save Critical IDs
|
|
160
|
-
- `staffMember.id` for updates and schedule assignment
|
|
161
|
-
- `staffMember.resourceId` for services and event resources
|
|
162
|
-
- `staffMember.resource.eventsSchedule.id` for working hours events
|
|
163
|
-
- `staffMember.resource.usesDefaultWorkingHours` (should be `true` initially)
|
|
158
|
+
**Save Critical IDs**:
|
|
159
|
+
- `staffMember.id` (in the create response) for updates and schedule assignment
|
|
160
|
+
- `staffMember.resourceId` (in the create response) for services and event resources
|
|
161
|
+
- `staffMember.resource.eventsSchedule.id` for working hours events — **NOT in the create response**. The create response contains only id/name/resourceId; fetch the staff member again with `?fields=RESOURCE_DETAILS` to get `resource.eventsSchedule.id` (and `resource.usesDefaultWorkingHours`, initially `true`). Reading `resource.eventsSchedule.id` off the create response yields `undefined` and downstream `scheduleId must not be empty` errors.
|
|
164
162
|
|
|
165
163
|
### 5. Set Up Custom Working Hours (Two-Step Process)
|
|
166
164
|
|
|
@@ -168,21 +166,44 @@ Create staff members using the Staff API (`POST https://www.wixapis.com/bookings
|
|
|
168
166
|
|
|
169
167
|
**Step 5A: Assign Custom Working Hours Schedule**
|
|
170
168
|
|
|
171
|
-
Get staff member details (`GET https://www.wixapis.com/bookings/v1/staff-members/<STAFF_MEMBER_ID>?fields=RESOURCE_DETAILS`) to extract the events schedule ID.
|
|
169
|
+
Get staff member details (`GET https://www.wixapis.com/bookings/v1/staff-members/<STAFF_MEMBER_ID>?fields=RESOURCE_DETAILS`) to extract the events schedule ID. Then call `assignWorkingHoursSchedule` (`POST https://www.wixapis.com/bookings/v1/staff-members/<STAFF_MEMBER_ID>/assign-working-hours-schedule`):
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{ "scheduleId": "<EVENTS_SCHEDULE_ID>" }
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
The request field is `scheduleId` (other names, e.g. `eventsScheduleId`, fail with 400 `scheduleId must not be empty`). This detaches the staff member from business default hours.
|
|
172
176
|
|
|
173
177
|
Verify the response shows `"usesDefaultWorkingHours": false`.
|
|
174
178
|
|
|
179
|
+
> **On failure, resume — don't restart.** If this call (or a later step) fails, the staff member from Step 4 already exists. Fix the failing call and continue with the same staff member ID; re-running the whole flow creates a duplicate staff member.
|
|
180
|
+
|
|
175
181
|
**Step 5B: Create WORKING_HOURS Events**
|
|
176
182
|
|
|
177
|
-
Use the Events API (`POST https://www.wixapis.com/calendar/v3/bulk/events/create`) to create
|
|
178
|
-
- `scheduleId`: Staff member's events schedule ID
|
|
179
|
-
- `externalScheduleId`: Staff member's resource ID
|
|
180
|
-
- `type`: `"WORKING_HOURS"`
|
|
181
|
-
- `resources` array: Staff member's resource ID
|
|
182
|
-
- `appId`: Wix Bookings app ID
|
|
183
|
-
- Proper recurrence rules with single-day specification
|
|
183
|
+
Use the Events API (`POST https://www.wixapis.com/calendar/v3/bulk/events/create`) to create one recurring event per working day. Note the request envelope: each event is wrapped in an `event` object.
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"events": [
|
|
188
|
+
{
|
|
189
|
+
"event": {
|
|
190
|
+
"type": "WORKING_HOURS",
|
|
191
|
+
"scheduleId": "<STAFF_EVENTS_SCHEDULE_ID>",
|
|
192
|
+
"start": { "localDate": "2026-09-07T09:00:00" },
|
|
193
|
+
"end": { "localDate": "2026-09-07T15:00:00" },
|
|
194
|
+
"recurrenceRule": { "frequency": "WEEKLY", "interval": 1, "days": ["MONDAY"] }
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"returnEntity": true
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
- `scheduleId` is the staff member's **events schedule ID** (`resource.eventsSchedule.id`).
|
|
203
|
+
- `externalScheduleId`, `adjustedStart`/`adjustedEnd`, and `appId` are derived by the server — you do not need to send them (`externalScheduleId` comes back set to the staff member's resource ID).
|
|
204
|
+
- `recurrenceRule.frequency` must be `WEEKLY` (the only supported value); `interval` is 1–4.
|
|
205
|
+
- `recurrenceRule.days` takes exactly one **full uppercase** day name from `MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY` — abbreviations like `MON` fail validation. One day per event, so create a separate event for each working day.
|
|
206
|
+
- `start`/`end` must be today or in the future for recurring events.
|
|
186
207
|
|
|
187
208
|
### 6. Verify Setup
|
|
188
209
|
|
|
@@ -193,10 +214,9 @@ Query the staff member to confirm:
|
|
|
193
214
|
|
|
194
215
|
### IMPORTANT NOTES
|
|
195
216
|
|
|
196
|
-
* **ID Relationship Critical**: Use staff member ID for assignment
|
|
217
|
+
* **ID Relationship Critical**: Use the staff member ID for assignment and the events schedule ID for event `scheduleId`; the resource ID appears in server-derived fields (`externalScheduleId`) and in `resources` arrays when attaching this staff member to CLASS/COURSE session events
|
|
197
218
|
* **Foundation First**: Complete foundation setup before staff operations to avoid "Business schedule not found" errors
|
|
198
219
|
* **Complete Two-Step Process**: Both schedule assignment AND event creation are mandatory for custom working hours
|
|
199
|
-
* **Event Field Requirements**: Include all required fields even if they appear optional in basic documentation
|
|
200
220
|
* **Revision Management**: Always fetch current revision numbers before updating events
|
|
201
221
|
* **Date Format Strict**: Use precise ISO 8601 format without timezone indicators
|
|
202
222
|
* **Inheritance is Permanent**: Once inherited, business hours changes don't affect existing staff
|
|
@@ -218,7 +238,10 @@ Completed assignment but missing event creation. Create `WORKING_HOURS` events u
|
|
|
218
238
|
- **Solution**: Standardize by configuring custom hours for all staff, or recreate staff after fixing business hours
|
|
219
239
|
|
|
220
240
|
**"Invalid scheduleId" or "Resource not found" Errors**:
|
|
221
|
-
Using wrong ID type in API calls. Verify you're using events schedule ID for `scheduleId
|
|
241
|
+
Using wrong ID type in API calls. Verify you're using the events schedule ID for `scheduleId` and the staff member ID for updates.
|
|
242
|
+
|
|
243
|
+
**400 "event must not be empty" on bulkCreateEvents**:
|
|
244
|
+
The request body is missing the per-event wrapper. Each entry in `events` must be `{"event": {...}}`, not the event fields directly.
|
|
222
245
|
|
|
223
246
|
**Event Update Fails with Revision Error**:
|
|
224
247
|
Get current event details first and include the revision number in update requests.
|
|
@@ -227,7 +250,7 @@ Get current event details first and include the revision number in update reques
|
|
|
227
250
|
Use current or future dates for recurring event start dates.
|
|
228
251
|
|
|
229
252
|
**Events Not Linked to Staff Member**:
|
|
230
|
-
|
|
253
|
+
Verify the event was created on the staff member's own events schedule (`resource.eventsSchedule.id`) — the schedule is what links working-hours events to the staff member. The returned event's `externalScheduleId` should equal the staff member's resource ID (server-derived).
|
|
231
254
|
|
|
232
255
|
### Working with Existing Staff
|
|
233
256
|
|
|
@@ -18,8 +18,9 @@ Below are the recommended steps to successfully create Wix Bookings services tha
|
|
|
18
18
|
Before creating multi-resource services, ensure the following requirements are met:
|
|
19
19
|
|
|
20
20
|
1. **Wix Bookings** - Core app must be installed and configured
|
|
21
|
-
2. **
|
|
22
|
-
|
|
21
|
+
2. **Business Location** - At least one business location must be configured
|
|
22
|
+
|
|
23
|
+
> Resource type, resource, and resource-bound service creation succeed via the API without any premium-related error. If a plan-gating error does occur, it surfaces explicitly (e.g. a 403) — don't preemptively block on plan checks.
|
|
23
24
|
|
|
24
25
|
### App Installation Process
|
|
25
26
|
|
|
@@ -112,6 +113,12 @@ Before creating anything, plan your resource type structure. Each type should re
|
|
|
112
113
|
|
|
113
114
|
Create resource types using `createResourceType` API (`POST https://www.wixapis.com/bookings/v2/resources/resource-types`) ([REST](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/create-resource-type)):
|
|
114
115
|
|
|
116
|
+
```json
|
|
117
|
+
{ "resourceType": { "name": "Treatment Room" } }
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The response returns `resourceType.id` — save it for resource creation and the service's `serviceResources`.
|
|
121
|
+
|
|
115
122
|
**Key Requirements:**
|
|
116
123
|
- `name` must be unique across the site
|
|
117
124
|
- Keep `name` descriptive but concise (appears in booking interface)
|
|
@@ -121,9 +128,23 @@ Create resource types using `createResourceType` API (`POST https://www.wixapis.
|
|
|
121
128
|
|
|
122
129
|
### 3. Create Individual Resources
|
|
123
130
|
|
|
124
|
-
|
|
131
|
+
Create the resource instances of each type. For more than one (the usual case — e.g. Room A and Room B), use `bulkCreateResources` (`POST https://www.wixapis.com/bookings/v2/bulk/resources/create`) ([REST](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/bulk-create-resources)); for a single one, `createResource` (`POST https://www.wixapis.com/bookings/v2/resources`) takes `{ "resource": { "name": ..., "typeId": ... } }`.
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"resources": [
|
|
136
|
+
{ "name": "Room A", "typeId": "<RESOURCE_TYPE_ID>" },
|
|
137
|
+
{ "name": "Room B", "typeId": "<RESOURCE_TYPE_ID>" }
|
|
138
|
+
],
|
|
139
|
+
"returnEntity": true
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Read each created resource's ID from `results[i].item.id` (with `returnEntity: true`) or `results[i].itemMetadata.id` (without it). **The resource is directly under `item` — there is no `item.resource.id`** (reading it throws `Cannot read properties of undefined`). Match items to your request by `itemMetadata.originalIndex`, and check `bulkActionMetadata.totalFailures` before proceeding.
|
|
125
144
|
|
|
126
|
-
|
|
145
|
+
**⚠️ Payload shape**: the type reference is the flat `typeId` field (same on single and bulk). Sending a nested object (`"type": {"id": ...}`) fails with 400 `Unexpected value for StringValue`. A resource without `typeId` is created but is not bookable.
|
|
146
|
+
|
|
147
|
+
If you omit `locationOptions`, the resource defaults to `availableInAllLocations: true` — the simplest and usually correct configuration; specific location setup is complex and often unnecessary.
|
|
127
148
|
|
|
128
149
|
**Advanced Configuration (Gap):**
|
|
129
150
|
- Custom working hours override business location hours (this behavior isn't clearly documented)
|
|
@@ -133,17 +154,42 @@ For each resource type, create the individual resource instances using `createRe
|
|
|
133
154
|
|
|
134
155
|
### 4. Create Multi-Resource Service (Optional Connection)
|
|
135
156
|
|
|
136
|
-
Create the service that optionally connects to multiple resource types using `bulkCreateServices` API ([REST](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/bulk-create-services))
|
|
157
|
+
Create the service that optionally connects to multiple resource types using `bulkCreateServices` API (`POST https://www.wixapis.com/bookings/v2/bulk/services/create`) ([REST](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/bulk-create-services)). Note the endpoint path is `/bulk/services/create` (not `/services/bulk/create`, which 404s).
|
|
158
|
+
|
|
159
|
+
**Pick the service type, and mind the resource-specific required fields:**
|
|
160
|
+
|
|
161
|
+
- A **1-on-1, time-slot** service (e.g. a massage, a room rental by the hour) is an `APPOINTMENT`. When such a service is driven by a **resource instead of a staff member**, `primaryResourceType` (a flat resource-type GUID) is **required** — omitting it fails with 400 `primary_resource_type is required for appointment services without staff members`. APPOINTMENT also needs `schedule.availabilityConstraints.sessionDurations`.
|
|
162
|
+
- A **group** service (fixed capacity per session) is a `CLASS` (drop-in) or `COURSE` (whole series); these use `defaultCapacity` and do not require `primaryResourceType`.
|
|
163
|
+
|
|
164
|
+
Appointment example (one room per booking, no staff):
|
|
137
165
|
|
|
138
|
-
**Service Resource Configuration:**
|
|
139
166
|
```json
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
167
|
+
{
|
|
168
|
+
"services": [{
|
|
169
|
+
"name": "Massage",
|
|
170
|
+
"type": "APPOINTMENT",
|
|
171
|
+
"onlineBooking": { "enabled": true },
|
|
172
|
+
"serviceResources": [
|
|
173
|
+
{ "resourceType": { "id": "<ROOM_TYPE_ID>" } }
|
|
174
|
+
],
|
|
175
|
+
"primaryResourceType": "<ROOM_TYPE_ID>",
|
|
176
|
+
"schedule": { "availabilityConstraints": { "sessionDurations": [60] } },
|
|
177
|
+
"payment": {
|
|
178
|
+
"rateType": "FIXED",
|
|
179
|
+
"options": { "online": true, "inPerson": false },
|
|
180
|
+
"fixed": { "price": { "value": "80" } }
|
|
181
|
+
}
|
|
182
|
+
}],
|
|
183
|
+
"returnEntity": true
|
|
184
|
+
}
|
|
145
185
|
```
|
|
146
186
|
|
|
187
|
+
For a group service, use `"type": "CLASS"` with `"defaultCapacity": <n>` instead of `primaryResourceType`/`sessionDurations`. Both types take `payment.options` (at least one of `online`/`inPerson` true) — required even for the resource-bound case.
|
|
188
|
+
|
|
189
|
+
Save the service ID from the response: `results[0].item.id` (with `returnEntity: true`), or `results[0].itemMetadata.id` (without it). **There is no `results[0].item.service.id`** — reading that path throws `Cannot read properties of undefined`.
|
|
190
|
+
|
|
191
|
+
**⚠️ Verify from the response, not from assumptions**: without `returnEntity: true` the bulk response contains only `results[0].itemMetadata` (id + success flag) — there is no `item`. With the flag, the created service is at `results[0].item` (e.g. `item.id`, `item.serviceResources`). Check `bulkActionMetadata.totalFailures` and each `itemMetadata.success` before reporting the service as created.
|
|
192
|
+
|
|
147
193
|
**Key Principle**: This creates a **loose connection** where the service requests resource allocation during booking, but resources remain independent entities with their own lifecycle and management.
|
|
148
194
|
|
|
149
195
|
**Pricing Strategy**: Multi-resource services typically command premium pricing due to coordination complexity.
|
|
@@ -171,6 +217,18 @@ The docs don't explain how multi-resource allocation actually works during booki
|
|
|
171
217
|
- Check that `typeId` exactly matches the resource type `id`
|
|
172
218
|
- Ensure you're not using resource type `name` when `id` is required
|
|
173
219
|
|
|
220
|
+
**400 "Unexpected value for StringValue" on createResource or on service `primaryResourceType`:**
|
|
221
|
+
- A resource-type reference was sent as a nested object where a flat GUID string is expected. `createResource` uses `"typeId": "<guid>"`; the service field is `"primaryResourceType": "<guid>"` (both flat, not `{"id": ...}`). Note this differs from `serviceResources[].resourceType.id`, which *is* nested.
|
|
222
|
+
|
|
223
|
+
**400 "primary_resource_type is required for appointment services without staff members":**
|
|
224
|
+
- An `APPOINTMENT` service bound to a resource (no `staffMemberIds`) needs `primaryResourceType` set to the driving resource-type GUID. Either add it, or model the service as a `CLASS`/`COURSE` if a group service fits.
|
|
225
|
+
|
|
226
|
+
**404 on bulk creation:**
|
|
227
|
+
- The path segments are `bulk/<entity>/create`: `POST /bookings/v2/bulk/services/create`, `POST /bookings/v2/bulk/resources/create`. `/bookings/v2/services/bulk/create` (and the resources equivalent) do not exist.
|
|
228
|
+
|
|
229
|
+
**`Cannot read properties of undefined` after a bulk create (resources or services):**
|
|
230
|
+
- Every bulk response nests the entity directly under `results[i].item` — use `item.id`, never `item.resource.id` or `item.service.id`. Without `returnEntity: true` there is no `item` at all, only `itemMetadata.id`.
|
|
231
|
+
|
|
174
232
|
**"Resource type name already exists" Error (409):**
|
|
175
233
|
- Resource type names must be unique across the site
|
|
176
234
|
- Query existing resource types to avoid duplicates
|
|
@@ -211,7 +269,7 @@ The docs don't explain how multi-resource allocation actually works during booki
|
|
|
211
269
|
- Consider how names appear in booking confirmations and staff interfaces
|
|
212
270
|
|
|
213
271
|
**Availability Strategy:**
|
|
214
|
-
-
|
|
272
|
+
- Don't add `workingHoursSchedules` to non-staff resources unless business rules require it — without them the resource simply follows business location hours, which is usually what you want
|
|
215
273
|
- Use working hours sparingly - they add complexity without always adding value
|
|
216
274
|
- Test availability scenarios thoroughly before going live
|
|
217
275
|
|
|
@@ -26,7 +26,7 @@ Wix Bookings default business hours define the base availability for your bookin
|
|
|
26
26
|
|
|
27
27
|
### 🚨 CRITICAL: Default Hours Upon Installation
|
|
28
28
|
|
|
29
|
-
**IMPORTANT**: When Wix Bookings is first installed on a site, it automatically creates DEFAULT business hours
|
|
29
|
+
**IMPORTANT**: When Wix Bookings is first installed on a site, it automatically creates DEFAULT business hours — one recurring event per default working day. The exact days and times vary by site and template: a bare install creates Monday–Friday 10 AM–6 PM (per [About Business Schedules](https://dev.wix.com/docs/api-reference/business-management/calendar/about-business-schedules)), but template-created sites can differ (e.g. include Saturday). You CANNOT simply create new hours without handling these existing default hours first.
|
|
30
30
|
|
|
31
31
|
**You MUST either:**
|
|
32
32
|
1. **Update the existing default hours** to your desired schedule, OR
|
|
@@ -49,9 +49,9 @@ Wix Bookings default business hours define the base availability for your bookin
|
|
|
49
49
|
|
|
50
50
|
### Key Discovery: Universal Business Schedule External ID
|
|
51
51
|
|
|
52
|
-
**VERIFIED**: The business schedule external ID `"4e0579a5-491e-4e70-a872-d097eed6e520"` is **universal across all Wix sites
|
|
52
|
+
**VERIFIED**: The business schedule external ID `"4e0579a5-491e-4e70-a872-d097eed6e520"` is **universal across all Wix sites** — documented in [About Business Schedules](https://dev.wix.com/docs/api-reference/business-management/calendar/about-business-schedules) ("The business schedule always uses the `externalId` value `4e0579a5-491e-4e70-a872-d097eed6e520`").
|
|
53
53
|
|
|
54
|
-
This has been tested and confirmed on multiple different Wix sites:
|
|
54
|
+
This has also been tested and confirmed on multiple different Wix sites:
|
|
55
55
|
- All sites have a business schedule with this exact external ID
|
|
56
56
|
- The schedule name is consistently `"business"`
|
|
57
57
|
- While the internal schedule `id` varies per site, the `externalId` is constant
|
|
@@ -63,7 +63,8 @@ This has been tested and confirmed on multiple different Wix sites:
|
|
|
63
63
|
* **Default Hours Always Exist**: Every Wix Bookings installation creates default hours automatically
|
|
64
64
|
* **Event Scheduling Flexibility**: Businesses can create multiple time slots per day or complex schedules as needed - there are no restrictions on number of events per day
|
|
65
65
|
* **MASTER vs INSTANCE Events**: Based on observed behavior, MASTER events appear to generate INSTANCE events automatically, but always verify current event state when working with recurring events
|
|
66
|
-
* **Query Patterns**: Use `"recurrenceType": ["MASTER"]` to focus on the primary recurring event definitions
|
|
66
|
+
* **Query Patterns**: Use `"recurrenceType": ["MASTER"]` to focus on the primary recurring event definitions. ⚠️ It is a **top-level** request field, a sibling of `query` — placing it inside `query.filter` is **silently ignored** (the call succeeds and returns INSTANCE events), so a wrong placement produces confusing results rather than an error
|
|
67
|
+
* **The universal external ID is a lookup key, not a schedule ID**: use `4e0579a5-491e-4e70-a872-d097eed6e520` only in the `externalId` filter of `querySchedules`. Passing it as an event's `scheduleId` fails with 404 `Schedule with 4e0579a5-... ID not found` (and as a `resources[].id`, with a similar `Resource ... not found`) — events take the schedule's real `id` returned by that query
|
|
67
68
|
* **Revision Numbers**: Calendar events require current revision numbers for updates - always get fresh revision before bulk operations
|
|
68
69
|
|
|
69
70
|
---
|
|
@@ -104,7 +105,27 @@ Query pattern:
|
|
|
104
105
|
|
|
105
106
|
**Important**: Always query for MASTER events specifically to see actual recurring schedules.
|
|
106
107
|
|
|
107
|
-
**Expected Result**:
|
|
108
|
+
**Expected Result**: One MASTER event per default working day. Don't assume which days: a bare Bookings install has Monday–Friday, but template-created sites can carry a different set (e.g. Monday–Saturday), and times vary by site — this query is what tells you what's actually there. The response fields this flow reads (trimmed — real responses carry more):
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"events": [
|
|
113
|
+
{
|
|
114
|
+
"id": "9f1e2d3c4b5a69788766554433221100aabbccddeeff00112233445566778899",
|
|
115
|
+
"scheduleId": "f3b9c2d1-7a4e-4b8c-9d2f-6e1a5c8b0d47",
|
|
116
|
+
"type": "WORKING_HOURS",
|
|
117
|
+
"recurrenceType": "MASTER",
|
|
118
|
+
"recurrenceRule": { "frequency": "WEEKLY", "interval": 1, "days": ["MONDAY"] },
|
|
119
|
+
"start": { "localDate": "2026-08-31T10:00:00", "timeZone": "America/New_York" },
|
|
120
|
+
"end": { "localDate": "2026-08-31T18:00:00", "timeZone": "America/New_York" },
|
|
121
|
+
"revision": "1"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- Update and cancel calls target `events[].id`; updates also need that event's current `revision`.
|
|
128
|
+
- `recurrenceRule.days` tells you which weekday each event covers; `start`/`end` `localDate` carry the current hours in the schedule's `timeZone`.
|
|
108
129
|
|
|
109
130
|
### 3. Choose Your Strategy: Update OR Replace
|
|
110
131
|
|
|
@@ -127,14 +148,14 @@ Update fields:
|
|
|
127
148
|
- `revision`: Current revision number (from Step 2 query)
|
|
128
149
|
- `fieldmask`: `"start,end"`
|
|
129
150
|
|
|
130
|
-
**Example**: Change Monday hours
|
|
151
|
+
**Example**: Change Monday hours to 8 AM-4 PM (use a Monday that is today or in the future — a past `start` is rejected for recurring events):
|
|
131
152
|
```json
|
|
132
153
|
{
|
|
133
154
|
"events": [{
|
|
134
155
|
"event": {
|
|
135
156
|
"id": "existing-monday-event-id",
|
|
136
|
-
"start": {"localDate": "
|
|
137
|
-
"end": {"localDate": "
|
|
157
|
+
"start": {"localDate": "2027-03-01T08:00:00"},
|
|
158
|
+
"end": {"localDate": "2027-03-01T16:00:00"},
|
|
138
159
|
"revision": "current-revision-number"
|
|
139
160
|
}
|
|
140
161
|
}],
|
|
@@ -145,6 +166,9 @@ Update fields:
|
|
|
145
166
|
### 4B. Replace All Business Hours (Strategy B)
|
|
146
167
|
|
|
147
168
|
#### Step 4B.1: Delete Existing Hours
|
|
169
|
+
|
|
170
|
+
Cancelling is irreversible — a cancelled event can only be replaced by creating a new one. When the user names their complete desired schedule (e.g. "Monday through Friday, 8-4"), replacing all existing hours — including days outside that set — is part of the request. If it's ambiguous whether hours on other days should be kept, ask the user instead of assuming.
|
|
171
|
+
|
|
148
172
|
Cancel existing MASTER events using `bulkCancelEvents` API (`POST https://www.wixapis.com/calendar/v3/bulk/events/cancel`) ([REST](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/bulk-cancel-event)):
|
|
149
173
|
|
|
150
174
|
```json
|
|
@@ -154,17 +178,28 @@ Cancel existing MASTER events using `bulkCancelEvents` API (`POST https://www.wi
|
|
|
154
178
|
```
|
|
155
179
|
|
|
156
180
|
#### Step 4B.2: Create New Business Hours
|
|
157
|
-
Create `WORKING_HOURS` events for each day using `bulkCreateEvents` API (`POST https://www.wixapis.com/calendar/v3/bulk/events/create`) ([REST](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/bulk-create-event)).
|
|
181
|
+
Create `WORKING_HOURS` events for each day using `bulkCreateEvents` API (`POST https://www.wixapis.com/calendar/v3/bulk/events/create`) ([REST](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/bulk-create-event)). Note the request envelope: each event is wrapped in an `event` object — a flat event fails with 400 `event must not be empty`.
|
|
158
182
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
183
|
+
```json
|
|
184
|
+
{
|
|
185
|
+
"events": [
|
|
186
|
+
{
|
|
187
|
+
"event": {
|
|
188
|
+
"type": "WORKING_HOURS",
|
|
189
|
+
"scheduleId": "<BUSINESS_SCHEDULE_ID_FROM_STEP_1>",
|
|
190
|
+
"start": { "localDate": "2027-03-01T08:00:00" },
|
|
191
|
+
"end": { "localDate": "2027-03-01T16:00:00" },
|
|
192
|
+
"recurrenceRule": { "frequency": "WEEKLY", "interval": 1, "days": ["MONDAY"] }
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
```
|
|
166
198
|
|
|
167
|
-
|
|
199
|
+
- `scheduleId` is the business schedule's real `id` from Step 1 — **not** the universal external ID (that constant is only the `querySchedules` lookup key; used here it 404s).
|
|
200
|
+
- `scheduleOwnerId`/`externalScheduleId` are derived by the server; you do not need to send them.
|
|
201
|
+
- `recurrenceRule.days` takes exactly one full uppercase day name (`MONDAY`…`SUNDAY`); create a separate event per weekday, with `start`/`end` today or in the future.
|
|
202
|
+
- Check each `results[i].itemMetadata.success` (and `bulkActionMetadata.totalFailures`) before reporting the hours as set.
|
|
168
203
|
|
|
169
204
|
### 5. Verify Final Configuration
|
|
170
205
|
|
|
@@ -218,6 +253,7 @@ Query the business schedule events again to confirm:
|
|
|
218
253
|
|
|
219
254
|
## API Documentation References
|
|
220
255
|
|
|
256
|
+
* [About Business Schedules](https://dev.wix.com/docs/api-reference/business-management/calendar/about-business-schedules)
|
|
221
257
|
* [Query Schedules](https://dev.wix.com/docs/api-reference/business-management/calendar/schedules-v3/query-schedules)
|
|
222
258
|
* [Query Events](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/query-events)
|
|
223
259
|
* [Bulk Create Events](https://dev.wix.com/docs/api-reference/business-management/calendar/events-v3/bulk-create-event)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Retrieve Google Ads Billing and Payment Details"
|
|
3
|
-
description: "Retrieves billing and payment details for a Wix site's Google Ads account: the current billing period's ad spend (usage), the Wix service fee, the total charge, any promotional coupon adjustment, the billing period dates, and the account's credit balance (positive = available credits, negative = outstanding debt not yet charged). Also explains reading current vs remaining budget from the account object. Use when the user asks 'how much have I spent on Google Ads', 'what's my next Google Ads charge', 'show my ad billing', 'do I have ad credits left', 'why was I charged', or 'upcoming Google Ads payment'. Requires an existing Google Ads account. REST base https://www.wixapis.com/google
|
|
3
|
+
description: "Retrieves billing and payment details for a Wix site's Google Ads account: the current billing period's ad spend (usage), the Wix service fee, the total charge, any promotional coupon adjustment, the billing period dates, and the account's credit balance (positive = available credits, negative = outstanding debt not yet charged). Also explains reading current vs remaining budget from the account object. Use when the user asks 'how much have I spent on Google Ads', 'what's my next Google Ads charge', 'show my ad billing', 'do I have ad credits left', 'why was I charged', or 'upcoming Google Ads payment'. Requires an existing Google Ads account. REST base https://www.wixapis.com/_serverless/pa-google/v1."
|
|
4
4
|
---
|
|
5
5
|
# RECIPE: Retrieve Google Ads Billing and Payment Details
|
|
6
6
|
|
|
7
7
|
Report what a site owner will be charged for Google Ads: ad spend, the Wix service fee, coupon adjustments, the total, the billing period, and the account's credit balance.
|
|
8
8
|
|
|
9
|
-
Base URL: `https://www.wixapis.com/google
|
|
9
|
+
Base URL: `https://www.wixapis.com/_serverless/pa-google/v1`. `<AUTH>` is the `Authorization` header. This endpoint is read-only.
|
|
10
10
|
|
|
11
11
|
**Prerequisite:** a Google Ads account must exist (`ACCOUNT_NOT_FOUND` → run [install-and-create-account](install-and-create-account.md)).
|
|
12
12
|
|
|
@@ -17,7 +17,7 @@ Base URL: `https://www.wixapis.com/google-ads/v1`. `<AUTH>` is the `Authorizatio
|
|
|
17
17
|
Billing is calculated from cached subscription data (not fetched live from Google), and the charge calculation is heavy — this endpoint has a **30-second SLA**, so allow time and don't retry prematurely.
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
curl -X GET 'https://www.wixapis.com/google
|
|
20
|
+
curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/payment-details' -H 'Authorization: <AUTH>'
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
```json
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Create and Launch a Performance Max Campaign"
|
|
3
|
-
description: "Creates and launches a Google Ads Performance Max (PMAX) campaign for a Wix site — a goal-based campaign that runs across all Google channels (Search, Display, YouTube, Gmail, Discover, Maps) from an asset group of headlines, descriptions, images, and (for PMAX Leads) search-theme signals. Covers generating AI text and image assets, generating search themes, getting a Google budget recommendation, assembling the asset group with the required minimum assets, choosing PERFORMANCE_MAX vs PERFORMANCE_MAX_LEADS (leads: phone/form goals, negative keywords, 28-day learning) vs retail/Shopping (Merchant Center feed), creating in PAUSED, and launching. Use for 'create a Performance Max campaign', 'PMAX', 'run ads across all of Google', 'lead-gen Google campaign', or 'Google Shopping ads'. Requires an existing Google Ads account. REST base https://www.wixapis.com/google
|
|
3
|
+
description: "Creates and launches a Google Ads Performance Max (PMAX) campaign for a Wix site — a goal-based campaign that runs across all Google channels (Search, Display, YouTube, Gmail, Discover, Maps) from an asset group of headlines, descriptions, images, and (for PMAX Leads) search-theme signals. Covers generating AI text and image assets, generating search themes, getting a Google budget recommendation, assembling the asset group with the required minimum assets, choosing PERFORMANCE_MAX vs PERFORMANCE_MAX_LEADS (leads: phone/form goals, negative keywords, 28-day learning) vs retail/Shopping (Merchant Center feed), creating in PAUSED, and launching. Use for 'create a Performance Max campaign', 'PMAX', 'run ads across all of Google', 'lead-gen Google campaign', or 'Google Shopping ads'. Requires an existing Google Ads account. REST base https://www.wixapis.com/_serverless/pa-google/v1."
|
|
4
4
|
---
|
|
5
5
|
# RECIPE: Create and Launch a Performance Max Campaign
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ A **Performance Max (PMAX)** campaign runs across every Google channel from a si
|
|
|
10
10
|
- **`PERFORMANCE_MAX_LEADS`** — lead-gen variant (phone/form conversions, search-theme signals, negative keywords, a ~28-day learning phase). **Requires** at least one asset group with headlines, descriptions, and images; assets are validated synchronously, so bad assets fail the create call immediately.
|
|
11
11
|
- **Retail / Shopping** — a `PERFORMANCE_MAX` campaign linked to a Google Merchant Center feed (set `merchantCenterAccountId` on the account first — see [install-and-create-account](install-and-create-account.md) — and use `feedLabel`). Retail campaigns don't require a hand-built asset group.
|
|
12
12
|
|
|
13
|
-
Base URL: `https://www.wixapis.com/google
|
|
13
|
+
Base URL: `https://www.wixapis.com/_serverless/pa-google/v1`. `<AUTH>` is the `Authorization` header; body calls also need `Content-Type: application/json`. The bidding strategy is server-enforced to `MAXIMIZE_CONVERSIONS` — never set it yourself.
|
|
14
14
|
|
|
15
15
|
> **Launching spends real money.** Present the assembled asset group and budget and get explicit approval before the Launch call (STEP 5). Create in `PAUSED` first — nothing serves until Launch.
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ Base URL: `https://www.wixapis.com/google-ads/v1`. `<AUTH>` is the `Authorizatio
|
|
|
25
25
|
`suggestionInfo.landingPageUrl` and `textSuggestionInfo.languageCode` are both required. Response may take up to 60s.
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
curl -X POST 'https://www.wixapis.com/google
|
|
28
|
+
curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/text-asset-suggestions' \
|
|
29
29
|
-H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
|
|
30
30
|
-d '{
|
|
31
31
|
"suggestionInfo": { "landingPageUrl": "https://www.example.com", "assetTypes": ["HEADLINE", "DESCRIPTION"] },
|
|
@@ -46,7 +46,7 @@ curl -X POST 'https://www.wixapis.com/google-ads/v1/text-asset-suggestions' \
|
|
|
46
46
|
Images are generated with AI and **automatically uploaded to the site's Wix Media Manager** — the returned `url` is a `static.wixstatic.com` link you can use directly in the asset group. `suggestionInfo.landingPageUrl` is required.
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
curl -X POST 'https://www.wixapis.com/google
|
|
49
|
+
curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/image-asset-suggestions' \
|
|
50
50
|
-H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
|
|
51
51
|
-d '{ "suggestionInfo": { "landingPageUrl": "https://www.example.com", "assetTypes": ["MARKETING_IMAGE", "SQUARE_MARKETING_IMAGE"] } }'
|
|
52
52
|
```
|
|
@@ -63,7 +63,7 @@ curl -X POST 'https://www.wixapis.com/google-ads/v1/image-asset-suggestions' \
|
|
|
63
63
|
Search themes are the targeting signals for a leads campaign's asset group. `textSuggestionInfo.languageCode` is required.
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
curl -X POST 'https://www.wixapis.com/google
|
|
66
|
+
curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/search-theme-suggestions' \
|
|
67
67
|
-H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
|
|
68
68
|
-d '{ "landingPageUrl": "https://www.example.com", "textSuggestionInfo": { "languageCode": "en" } }'
|
|
69
69
|
```
|
|
@@ -79,7 +79,7 @@ Each string becomes a `{ "searchTheme": { "text": "…" } }` signal in the asset
|
|
|
79
79
|
PMAX uses **Generate Budget Recommendation** (not the Smart-campaign budget-suggestions endpoint). `campaignType`, `assetGroupInfo` (with a `finalUrl`), and `currency` are required.
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
curl -X POST 'https://www.wixapis.com/google
|
|
82
|
+
curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/budget-recommendation' \
|
|
83
83
|
-H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
|
|
84
84
|
-d '{
|
|
85
85
|
"campaignType": "PERFORMANCE_MAX",
|
|
@@ -129,7 +129,7 @@ Image `url` must be a Wix Media Manager URL (`static.wixstatic.com`) — the STE
|
|
|
129
129
|
**Create a PMAX Leads campaign** (status required; create `PAUSED`):
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
curl -X POST 'https://www.wixapis.com/google
|
|
132
|
+
curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns' \
|
|
133
133
|
-H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
|
|
134
134
|
-d '{
|
|
135
135
|
"campaign": {
|
|
@@ -178,7 +178,7 @@ Save the returned `campaign.id` and `resourceName`. `status` is read-only and sy
|
|
|
178
178
|
## STEP 5: Launch the campaign
|
|
179
179
|
|
|
180
180
|
```bash
|
|
181
|
-
curl -X POST 'https://www.wixapis.com/google
|
|
181
|
+
curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/campaigns/{campaignId}/launch' \
|
|
182
182
|
-H 'Authorization: <AUTH>' -H 'Content-Type: application/json' -d '{}'
|
|
183
183
|
```
|
|
184
184
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Get AI Campaign Suggestions for Google Ads"
|
|
3
|
-
description: "Reference for the Google Ads Suggestions API on a Wix site: AI/Google-generated inputs that help build effective campaigns — keyword themes (from a URL or autocomplete), geo-target options, low/recommended/high daily-budget tiers with estimated clicks, PMAX budget recommendations, text assets (headlines/descriptions), AI image assets (auto-uploaded to Wix Media), search themes, promotional incentive offers, and complete AI-generated campaign configurations from a campaign brief. Use when the user asks 'suggest keywords for my ads', 'what budget should I use', 'where should I target', 'generate ad copy/headlines', 'generate ad images', 'suggest a whole campaign', or when a create-campaign flow needs suggested values. REST base https://www.wixapis.com/google
|
|
3
|
+
description: "Reference for the Google Ads Suggestions API on a Wix site: AI/Google-generated inputs that help build effective campaigns — keyword themes (from a URL or autocomplete), geo-target options, low/recommended/high daily-budget tiers with estimated clicks, PMAX budget recommendations, text assets (headlines/descriptions), AI image assets (auto-uploaded to Wix Media), search themes, promotional incentive offers, and complete AI-generated campaign configurations from a campaign brief. Use when the user asks 'suggest keywords for my ads', 'what budget should I use', 'where should I target', 'generate ad copy/headlines', 'generate ad images', 'suggest a whole campaign', or when a create-campaign flow needs suggested values. REST base https://www.wixapis.com/_serverless/pa-google/v1."
|
|
4
4
|
---
|
|
5
5
|
# RECIPE: Get AI Campaign Suggestions for Google Ads
|
|
6
6
|
|
|
7
7
|
The Suggestions API produces the values that make a campaign effective — keywords, locations, budgets, and creative assets — either from Google directly or from Wix's AI. It's the input layer for the create-campaign recipes; this file is the standalone reference for each endpoint and for the two that don't appear there (full campaign suggestions from a brief, and incentive offers).
|
|
8
8
|
|
|
9
|
-
Base URL: `https://www.wixapis.com/google
|
|
9
|
+
Base URL: `https://www.wixapis.com/_serverless/pa-google/v1`. `<AUTH>` is the `Authorization` header; body calls also need `Content-Type: application/json`. All suggestion endpoints are **read-only** — none create or spend anything, so run them freely.
|
|
10
10
|
|
|
11
11
|
> **Two conventions to carry into every answer (this is where they trip people up):**
|
|
12
12
|
> - **Budgets come back in micros.** Every `dailyBudget` / `budgetAmountMicros` / `recommendedBudgetAmountMicros` is in micros, where `1,000,000` micros = 1 unit of the account's currency (so `15000000` = $15.00/day). Always convert to currency units when presenting to a user, and pass micros back when creating a campaign.
|
|
@@ -39,7 +39,7 @@ Generates one or more complete, ready-to-use campaign configurations — assets,
|
|
|
39
39
|
- `campaignType` — `SMART` (default) or `PERFORMANCE_MAX_LEADS`.
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
curl -X POST 'https://www.wixapis.com/google
|
|
42
|
+
curl -X POST 'https://www.wixapis.com/_serverless/pa-google/v1/campaign-suggestions' \
|
|
43
43
|
-H 'Authorization: <AUTH>' -H 'Content-Type: application/json' \
|
|
44
44
|
-d '{ "campaignBriefId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "amount": 1, "campaignType": "SMART" }'
|
|
45
45
|
```
|
|
@@ -73,7 +73,7 @@ Present `campaignMessaging` and the config to the user, then use the `campaign`
|
|
|
73
73
|
Credit offers for **new** accounts, granted after a spend threshold. Only supported currencies return offers. This drives the optional incentive step of [account setup](install-and-create-account.md).
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
curl -X GET 'https://www.wixapis.com/google
|
|
76
|
+
curl -X GET 'https://www.wixapis.com/_serverless/pa-google/v1/incentives?currency=USD' -H 'Authorization: <AUTH>'
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
Returns `lowOffer` / `mediumOffer` / `highOffer`, each with `incentiveId`, `awardAmount`, and `requiredAmount`, plus a `consolidatedTermsAndConditionsUrl`. Pass the chosen `incentiveId` as `selectedIncentiveId` when creating the account.
|
|
@@ -15,7 +15,7 @@ Build direct links into the Google Ads page of a site's dashboard. For the gener
|
|
|
15
15
|
|
|
16
16
|
## Pairing Entities with Their Read APIs
|
|
17
17
|
|
|
18
|
-
Fetch state via the Google Ads recipes in this area (`GET /google
|
|
18
|
+
Fetch state via the Google Ads recipes in this area (`GET /_serverless/pa-google/v1/accounts/current-site`, `GET /_serverless/pa-google/v1/accounts/current-site/conversion-actions`), then link the page.
|
|
19
19
|
|
|
20
20
|
Example — after creating a campaign:
|
|
21
21
|
|