fluentcart-developer 2.0.2 → 2.3.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.
Files changed (52) hide show
  1. package/README.md +59 -59
  2. package/dist/cards/fluentcart/tools.d.ts.map +1 -1
  3. package/dist/cards/fluentcart/tools.js +184 -18
  4. package/dist/cards/fluentcart/tools.js.map +1 -1
  5. package/dist/skills/fluentcart-developer/.claude-plugin/plugin.json +12 -12
  6. package/dist/skills/fluentcart-developer/.mcp.json +11 -11
  7. package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/fluent-cart/checkout.php +32 -32
  8. package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/functions.php +40 -40
  9. package/dist/skills/fluentcart-developer/examples/sample-fee-surcharge-plugin/fluentcart-fee-surcharge.php +38 -38
  10. package/dist/skills/fluentcart-developer/references/action-hooks-cart-checkout.md +1355 -1355
  11. package/dist/skills/fluentcart-developer/references/action-hooks-customers-users.md +266 -266
  12. package/dist/skills/fluentcart-developer/references/action-hooks-licenses.md +855 -855
  13. package/dist/skills/fluentcart-developer/references/action-hooks-orders.md +631 -631
  14. package/dist/skills/fluentcart-developer/references/action-hooks-payments-integrations.md +963 -963
  15. package/dist/skills/fluentcart-developer/references/action-hooks-products-coupons.md +585 -585
  16. package/dist/skills/fluentcart-developer/references/action-hooks-subscriptions.md +661 -661
  17. package/dist/skills/fluentcart-developer/references/database-models-query-builder.md +194 -194
  18. package/dist/skills/fluentcart-developer/references/database-models-reference.md +604 -604
  19. package/dist/skills/fluentcart-developer/references/engineering-notes.md +154 -154
  20. package/dist/skills/fluentcart-developer/references/fee-system-guide.md +449 -449
  21. package/dist/skills/fluentcart-developer/references/filter-hooks-cart-checkout.md +1202 -1202
  22. package/dist/skills/fluentcart-developer/references/filter-hooks-integrations-advanced.md +1598 -1598
  23. package/dist/skills/fluentcart-developer/references/filter-hooks-products-pricing.md +628 -628
  24. package/dist/skills/fluentcart-developer/references/filter-hooks-settings-configuration.md +1177 -1177
  25. package/dist/skills/fluentcart-developer/references/fluentcart-developer-guide.md +154 -154
  26. package/dist/skills/fluentcart-developer/references/ghost-product-selling.md +458 -458
  27. package/dist/skills/fluentcart-developer/references/modules-and-extensions-reference.md +224 -224
  28. package/dist/skills/fluentcart-developer/references/payment-gateway-integration.md +761 -761
  29. package/dist/skills/fluentcart-developer/references/rest-api-customer-profile.md +190 -190
  30. package/dist/skills/fluentcart-developer/references/rest-api-customers.md +1121 -1121
  31. package/dist/skills/fluentcart-developer/references/rest-api-dashboard-utilities.md +219 -219
  32. package/dist/skills/fluentcart-developer/references/rest-api-email-notifications.md +619 -619
  33. package/dist/skills/fluentcart-developer/references/rest-api-files.md +290 -290
  34. package/dist/skills/fluentcart-developer/references/rest-api-integrations.md +324 -324
  35. package/dist/skills/fluentcart-developer/references/rest-api-labels-attributes.md +321 -321
  36. package/dist/skills/fluentcart-developer/references/rest-api-order-bumps.md +200 -200
  37. package/dist/skills/fluentcart-developer/references/rest-api-overview.md +131 -131
  38. package/dist/skills/fluentcart-developer/references/rest-api-public-shop.md +172 -172
  39. package/dist/skills/fluentcart-developer/references/rest-api-reference.md +552 -552
  40. package/dist/skills/fluentcart-developer/references/rest-api-reports.md +377 -377
  41. package/dist/skills/fluentcart-developer/references/rest-api-roles-permissions.md +147 -147
  42. package/dist/skills/fluentcart-developer/references/rest-api-settings.md +528 -528
  43. package/dist/skills/fluentcart-developer/references/rest-api-shipping.md +799 -799
  44. package/dist/skills/fluentcart-developer/references/rest-api-tax.md +356 -356
  45. package/dist/skills/fluentcart-developer/references/subscription-customization.md +197 -197
  46. package/dist/skills/fluentcart-developer/scripts/cli.js +1 -1
  47. package/dist/version.d.ts +1 -1
  48. package/dist/version.js +1 -1
  49. package/package.json +65 -65
  50. package/dist/skills/fluentcart-developer/references/client-integration-contract.md +0 -299
  51. package/dist/skills/fluentcart-developer/references/device-licensing-and-hardware-tracking.md +0 -241
  52. package/dist/skills/fluentcart-developer/references/trial-abuse-prevention.md +0 -304
@@ -1,324 +1,324 @@
1
- # Integrations API
2
-
3
- Manage third-party CRM, LMS, marketing, and email integrations (e.g. FluentCRM, FluentSMTP, Webhooks), global integration feeds, and product-specific automation triggers in FluentCart.
4
-
5
- **Base URLs:**
6
- - Global: `https://your-site.com/wp-json/fluent-cart/v2/integration`
7
- - Product-Level: `https://your-site.com/wp-json/fluent-cart/v2/products/{product_id}/integrations`
8
-
9
- **Policies:** `IntegrationPolicy` (Global) / `ProductPolicy` (Product-Level)
10
-
11
- ---
12
-
13
- ## Endpoints Overview
14
-
15
- | Group | Method | Endpoint | Permission / Policy | Controller Method | Description |
16
- |-------|--------|----------|--------------------|-------------------|-------------|
17
- | **Global Add-ons** | GET | `/integration/addons` | `integrations/view` | `AddonsController@getAddons` | List all integration add-ons & installation status |
18
- | | GET | `/integration/global-settings` | `integrations/view` | `IntegrationController@getGlobalSettings` | Get global configuration settings for provider |
19
- | | POST | `/integration/global-settings` | `integrations/manage` | `IntegrationController@setGlobalSettings` | Save global provider credentials (API keys, etc.) |
20
- | | POST | `/integration/feed/install-plugin` | `integrations/manage` | `AddonsController@installAndActivate` | Install & activate whitelisted WP.org plugin add-on |
21
- | **Global Feeds** | GET | `/integration/global-feeds` | `integrations/view` | `IntegrationController@getFeeds` | List all configured global integration feeds |
22
- | | GET | `/integration/global-feeds/settings` | `integrations/view` | `IntegrationController@getSettings` | Get form schema & saved values for feed editor |
23
- | | POST | `/integration/global-feeds/settings` | `integrations/manage` | `IntegrationController@saveSettings` | Create or update a global integration feed |
24
- | | POST | `/integration/global-feeds/change-status/{id}` | `integrations/manage` | `IntegrationController@changeStatus` | Toggle global feed enabled status (`yes`/`no`) |
25
- | | DELETE | `/integration/global-feeds/{id}` | `integrations/delete` | `IntegrationController@deleteSettings` | Permanently delete a global integration feed |
26
- | | GET | `/integration/feed/lists` | `integrations/view` | `IntegrationController@lists` | Fetch field mapping options for chosen list |
27
- | | GET | `/integration/feed/dynamic_options` | `integrations/view` | `IntegrationController@getDynamicOptions` | Fetch dynamic options (post types, CRM tags) |
28
- | | POST | `/integration/feed/chained` | `integrations/manage` | `IntegrationController@chained` | Handle dependent select fields via provider action |
29
- | **Product Feeds** | GET | `/products/{id}/integrations` | `products/view` | `ProductIntegrationsController@getFeeds` | List integration feeds for a specific product |
30
- | | GET | `/products/{id}/integrations/{provider}/settings` | `products/view` | `ProductIntegrationsController@getProductIntegrationSettings` | Get product feed editor schema & variation choices |
31
- | | POST | `/products/{id}/integrations` | `products/edit` | `ProductIntegrationsController@saveProductIntegration` | Create or update product-level integration feed |
32
- | | POST | `/products/{id}/integrations/feed/change-status` | `products/edit` | `ProductIntegrationsController@changeStatus` | Toggle product-level feed status (`yes`/`no`) |
33
- | | DELETE | `/products/{id}/integrations/{feed_id}` | `products/delete` | `ProductIntegrationsController@deleteProductIntegration` | Delete product-level integration feed |
34
-
35
- ---
36
-
37
- ## Global Add-ons & Integration Settings
38
-
39
- Manage integration provider connections and global authentication details.
40
-
41
- **Prefix:** `/fluent-cart/v2/integration` | **Policy:** `IntegrationPolicy`
42
-
43
- ### List Available Add-ons
44
-
45
- `GET /fluent-cart/v2/integration/addons`
46
-
47
- #### Response
48
-
49
- ```json
50
- {
51
- "addons": {
52
- "fluent-crm": {
53
- "installable": "fluent-crm",
54
- "enabled": true,
55
- "title": "FluentCRM",
56
- "logo": "https://example.com/wp-content/plugins/fluent-cart/assets/images/integrations/fluentcrm.svg",
57
- "categories": ["crm", "core", "marketing"],
58
- "description": "The most powerful email marketing automation plugin for WordPress."
59
- },
60
- "webhook": {
61
- "title": "Webhook",
62
- "description": "Send data anywhere via webhook",
63
- "enabled": true,
64
- "is_pro": true,
65
- "is_pro_active": true,
66
- "categories": ["core"]
67
- }
68
- }
69
- }
70
- ```
71
-
72
- ---
73
-
74
- ### Get Global Integration Settings
75
-
76
- `GET /fluent-cart/v2/integration/global-settings`
77
-
78
- #### Parameters
79
-
80
- | Parameter | Type | Location | Required | Description |
81
- |-----------|------|----------|----------|-------------|
82
- | `settings_key` | string | query | Yes | Integration provider key (e.g., `fluent-crm`, `webhook`) |
83
-
84
- ---
85
-
86
- ### Save Global Integration Settings
87
-
88
- `POST /fluent-cart/v2/integration/global-settings`
89
-
90
- #### Parameters
91
-
92
- | Parameter | Type | Location | Required | Description |
93
- |-----------|------|----------|----------|-------------|
94
- | `settings_key` | string | body | Yes | Integration provider key |
95
- | `integration` | object | body | Yes | Key-value settings object for the provider |
96
-
97
- > **Hook Trigger:** Execution is dispatched to `fluent_cart/integration/save_global_integration_settings_{settings_key}`.
98
-
99
- ---
100
-
101
- ### Install and Activate Add-on Plugin
102
-
103
- `POST /fluent-cart/v2/integration/feed/install-plugin`
104
-
105
- Installs a whitelisted plugin from WordPress.org.
106
-
107
- #### Parameters
108
-
109
- | Parameter | Type | Location | Required | Description |
110
- |-----------|------|----------|----------|-------------|
111
- | `addon` | string | body | Yes | Allowed slugs: `fluent-crm`, `fluent-smtp`, `fluent-community`, `fluent-security`, `fluentform`, `fluent-support` |
112
-
113
- #### Response
114
-
115
- ```json
116
- {
117
- "message": "Addon installation started successfully.",
118
- "redirect": "https://example.com/wp-admin/admin.php?page=fluent-cart#/integrations"
119
- }
120
- ```
121
-
122
- ---
123
-
124
- ## Global Integration Feeds
125
-
126
- Global feeds fire automations on every matching order.
127
-
128
- **Prefix:** `/fluent-cart/v2/integration/global-feeds` | **Policy:** `IntegrationPolicy`
129
-
130
- ### List Global Integration Feeds
131
-
132
- `GET /fluent-cart/v2/integration/global-feeds`
133
-
134
- #### Response
135
-
136
- ```json
137
- {
138
- "feeds": [
139
- {
140
- "id": 42,
141
- "name": "Add to FluentCRM list",
142
- "enabled": "yes",
143
- "provider": "fluent-crm",
144
- "feed": {
145
- "name": "Add to FluentCRM list",
146
- "enabled": "yes",
147
- "list_id": "2",
148
- "list_name": "Customers",
149
- "merge_fields": {},
150
- "conditionals": {
151
- "conditions": [],
152
- "status": false,
153
- "type": "all"
154
- }
155
- },
156
- "scope": "global"
157
- }
158
- ],
159
- "available_integrations": {}
160
- }
161
- ```
162
-
163
- ---
164
-
165
- ### Save Feed Settings
166
-
167
- `POST /fluent-cart/v2/integration/global-feeds/settings`
168
-
169
- #### Parameters
170
-
171
- | Parameter | Type | Location | Required | Description |
172
- |-----------|------|----------|----------|-------------|
173
- | `integration_name` | string | body | Yes | Integration provider key (e.g. `fluent-crm`, `webhook`) |
174
- | `integration_id` | integer | body | No | Existing feed ID to update. Omit to create new feed |
175
- | `integration` | string (JSON) | body | Yes | JSON string containing feed settings (`name`, `enabled`, `list_id`, `merge_fields`, `conditionals`) |
176
-
177
- #### Example
178
-
179
- ```bash
180
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/integration/global-feeds/settings" \
181
- -u "username:app_password" \
182
- -H "Content-Type: application/json" \
183
- -d '{
184
- "integration_name": "fluent-crm",
185
- "integration": "{\"name\":\"Add to customers\",\"enabled\":\"yes\",\"list_id\":\"2\",\"list_name\":\"Customers\",\"merge_fields\":{},\"conditionals\":{\"conditions\":[],\"status\":false,\"type\":\"all\"}}"
186
- }'
187
- ```
188
-
189
- ---
190
-
191
- ### Change Feed Status
192
-
193
- `POST /fluent-cart/v2/integration/global-feeds/change-status/{integration_id}`
194
-
195
- #### Parameters
196
-
197
- | Parameter | Type | Location | Required | Description |
198
- |-----------|------|----------|----------|-------------|
199
- | `integration_id` | integer | path | Yes | Feed ID to toggle |
200
- | `status` | string | body | Yes | `yes` (enable) or `no` (disable) |
201
-
202
- ---
203
-
204
- ### Delete Feed
205
-
206
- `DELETE /fluent-cart/v2/integration/global-feeds/{integration_id}`
207
-
208
- ---
209
-
210
- ### Helper Endpoints (`lists`, `dynamic_options`, `chained`)
211
-
212
- - `GET /integration/feed/lists?integration_name={key}&list_id={id}` — Fetch list merge fields.
213
- - `GET /integration/feed/dynamic_options?option_key={key}&sub_option_key={slug}&search={term}` — Asynchronously fetch dynamic option dropdowns (WP post types, CRM tags, etc.).
214
- - `POST /integration/feed/chained` — Dependent input handling via `fluent_cart/integration/chained_{route}` filter.
215
-
216
- ---
217
-
218
- ## Product-Level Integrations
219
-
220
- Product-specific integration feeds fire automations only when orders contain the specific product (and optional variations).
221
-
222
- **Prefix:** `/fluent-cart/v2/products/{product_id}/integrations` | **Policy:** `ProductPolicy`
223
-
224
- ### List Product Integration Feeds
225
-
226
- `GET /fluent-cart/v2/products/{productId}/integrations`
227
-
228
- #### Response
229
-
230
- ```json
231
- {
232
- "feeds": [
233
- {
234
- "id": 15,
235
- "name": "Tag VIP buyers",
236
- "enabled": "yes",
237
- "provider": "fluent-crm",
238
- "feed": {
239
- "name": "Tag VIP buyers",
240
- "enabled": "yes",
241
- "list_id": "3",
242
- "list_name": "VIP Customers",
243
- "merge_fields": {},
244
- "conditional_variation_ids": [101, 102],
245
- "conditionals": {
246
- "conditions": [],
247
- "status": false,
248
- "type": "all"
249
- }
250
- },
251
- "scope": "product"
252
- }
253
- ]
254
- }
255
- ```
256
-
257
- ---
258
-
259
- ### Get Product Integration Settings
260
-
261
- `GET /fluent-cart/v2/products/{product_id}/integrations/{integration_name}/settings`
262
-
263
- Returns form schema, saved feed values, and `product_variations` list for targeting specific variations.
264
-
265
- #### Response
266
-
267
- ```json
268
- {
269
- "settings": {
270
- "conditional_variation_ids": []
271
- },
272
- "product_variations": [
273
- { "id": 101, "title": "Basic Plan" },
274
- { "id": 102, "title": "Pro Plan" }
275
- ],
276
- "scope": "product"
277
- }
278
- ```
279
-
280
- ---
281
-
282
- ### Save Product Integration Feed
283
-
284
- `POST /fluent-cart/v2/products/{product_id}/integrations`
285
-
286
- #### Parameters
287
-
288
- | Parameter | Type | Location | Required | Description |
289
- |-----------|------|----------|----------|-------------|
290
- | `product_id` | integer | path | Yes | Product ID |
291
- | `integration_name` | string | body | Yes | Integration provider key (e.g. `fluent-crm`) |
292
- | `integration_id` | integer | body | No | Feed ID to update. Omit to create new feed |
293
- | `integration` | string (JSON) | body | Yes | JSON string containing `name`, `enabled`, `list_id`, `merge_fields`, `conditional_variation_ids`, `conditionals` |
294
-
295
- #### Request Example
296
-
297
- ```json
298
- {
299
- "integration_name": "fluent-crm",
300
- "integration": "{\"name\":\"Tag VIP buyers\",\"enabled\":\"yes\",\"list_id\":\"3\",\"conditional_variation_ids\":[101],\"merge_fields\":{},\"conditionals\":{\"conditions\":[],\"status\":false,\"type\":\"all\"}}"
301
- }
302
- ```
303
-
304
- ---
305
-
306
- ### Change Product Feed Status
307
-
308
- `POST /fluent-cart/v2/products/{product_id}/integrations/feed/change-status`
309
-
310
- > **Note:** Requires `product_id` in both URL path and request body!
311
-
312
- #### Parameters
313
-
314
- | Parameter | Type | Location | Required | Description |
315
- |-----------|------|----------|----------|-------------|
316
- | `product_id` | integer | path & body | Yes | Product ID |
317
- | `notification_id` | integer | body | Yes | Feed ID to toggle |
318
- | `status` | string | body | Yes | `yes` or `no` |
319
-
320
- ---
321
-
322
- ### Delete Product Integration Feed
323
-
324
- `DELETE /fluent-cart/v2/products/{product_id}/integrations/{integration_id}`
1
+ # Integrations API
2
+
3
+ Manage third-party CRM, LMS, marketing, and email integrations (e.g. FluentCRM, FluentSMTP, Webhooks), global integration feeds, and product-specific automation triggers in FluentCart.
4
+
5
+ **Base URLs:**
6
+ - Global: `https://your-site.com/wp-json/fluent-cart/v2/integration`
7
+ - Product-Level: `https://your-site.com/wp-json/fluent-cart/v2/products/{product_id}/integrations`
8
+
9
+ **Policies:** `IntegrationPolicy` (Global) / `ProductPolicy` (Product-Level)
10
+
11
+ ---
12
+
13
+ ## Endpoints Overview
14
+
15
+ | Group | Method | Endpoint | Permission / Policy | Controller Method | Description |
16
+ |-------|--------|----------|--------------------|-------------------|-------------|
17
+ | **Global Add-ons** | GET | `/integration/addons` | `integrations/view` | `AddonsController@getAddons` | List all integration add-ons & installation status |
18
+ | | GET | `/integration/global-settings` | `integrations/view` | `IntegrationController@getGlobalSettings` | Get global configuration settings for provider |
19
+ | | POST | `/integration/global-settings` | `integrations/manage` | `IntegrationController@setGlobalSettings` | Save global provider credentials (API keys, etc.) |
20
+ | | POST | `/integration/feed/install-plugin` | `integrations/manage` | `AddonsController@installAndActivate` | Install & activate whitelisted WP.org plugin add-on |
21
+ | **Global Feeds** | GET | `/integration/global-feeds` | `integrations/view` | `IntegrationController@getFeeds` | List all configured global integration feeds |
22
+ | | GET | `/integration/global-feeds/settings` | `integrations/view` | `IntegrationController@getSettings` | Get form schema & saved values for feed editor |
23
+ | | POST | `/integration/global-feeds/settings` | `integrations/manage` | `IntegrationController@saveSettings` | Create or update a global integration feed |
24
+ | | POST | `/integration/global-feeds/change-status/{id}` | `integrations/manage` | `IntegrationController@changeStatus` | Toggle global feed enabled status (`yes`/`no`) |
25
+ | | DELETE | `/integration/global-feeds/{id}` | `integrations/delete` | `IntegrationController@deleteSettings` | Permanently delete a global integration feed |
26
+ | | GET | `/integration/feed/lists` | `integrations/view` | `IntegrationController@lists` | Fetch field mapping options for chosen list |
27
+ | | GET | `/integration/feed/dynamic_options` | `integrations/view` | `IntegrationController@getDynamicOptions` | Fetch dynamic options (post types, CRM tags) |
28
+ | | POST | `/integration/feed/chained` | `integrations/manage` | `IntegrationController@chained` | Handle dependent select fields via provider action |
29
+ | **Product Feeds** | GET | `/products/{id}/integrations` | `products/view` | `ProductIntegrationsController@getFeeds` | List integration feeds for a specific product |
30
+ | | GET | `/products/{id}/integrations/{provider}/settings` | `products/view` | `ProductIntegrationsController@getProductIntegrationSettings` | Get product feed editor schema & variation choices |
31
+ | | POST | `/products/{id}/integrations` | `products/edit` | `ProductIntegrationsController@saveProductIntegration` | Create or update product-level integration feed |
32
+ | | POST | `/products/{id}/integrations/feed/change-status` | `products/edit` | `ProductIntegrationsController@changeStatus` | Toggle product-level feed status (`yes`/`no`) |
33
+ | | DELETE | `/products/{id}/integrations/{feed_id}` | `products/delete` | `ProductIntegrationsController@deleteProductIntegration` | Delete product-level integration feed |
34
+
35
+ ---
36
+
37
+ ## Global Add-ons & Integration Settings
38
+
39
+ Manage integration provider connections and global authentication details.
40
+
41
+ **Prefix:** `/fluent-cart/v2/integration` | **Policy:** `IntegrationPolicy`
42
+
43
+ ### List Available Add-ons
44
+
45
+ `GET /fluent-cart/v2/integration/addons`
46
+
47
+ #### Response
48
+
49
+ ```json
50
+ {
51
+ "addons": {
52
+ "fluent-crm": {
53
+ "installable": "fluent-crm",
54
+ "enabled": true,
55
+ "title": "FluentCRM",
56
+ "logo": "https://example.com/wp-content/plugins/fluent-cart/assets/images/integrations/fluentcrm.svg",
57
+ "categories": ["crm", "core", "marketing"],
58
+ "description": "The most powerful email marketing automation plugin for WordPress."
59
+ },
60
+ "webhook": {
61
+ "title": "Webhook",
62
+ "description": "Send data anywhere via webhook",
63
+ "enabled": true,
64
+ "is_pro": true,
65
+ "is_pro_active": true,
66
+ "categories": ["core"]
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ---
73
+
74
+ ### Get Global Integration Settings
75
+
76
+ `GET /fluent-cart/v2/integration/global-settings`
77
+
78
+ #### Parameters
79
+
80
+ | Parameter | Type | Location | Required | Description |
81
+ |-----------|------|----------|----------|-------------|
82
+ | `settings_key` | string | query | Yes | Integration provider key (e.g., `fluent-crm`, `webhook`) |
83
+
84
+ ---
85
+
86
+ ### Save Global Integration Settings
87
+
88
+ `POST /fluent-cart/v2/integration/global-settings`
89
+
90
+ #### Parameters
91
+
92
+ | Parameter | Type | Location | Required | Description |
93
+ |-----------|------|----------|----------|-------------|
94
+ | `settings_key` | string | body | Yes | Integration provider key |
95
+ | `integration` | object | body | Yes | Key-value settings object for the provider |
96
+
97
+ > **Hook Trigger:** Execution is dispatched to `fluent_cart/integration/save_global_integration_settings_{settings_key}`.
98
+
99
+ ---
100
+
101
+ ### Install and Activate Add-on Plugin
102
+
103
+ `POST /fluent-cart/v2/integration/feed/install-plugin`
104
+
105
+ Installs a whitelisted plugin from WordPress.org.
106
+
107
+ #### Parameters
108
+
109
+ | Parameter | Type | Location | Required | Description |
110
+ |-----------|------|----------|----------|-------------|
111
+ | `addon` | string | body | Yes | Allowed slugs: `fluent-crm`, `fluent-smtp`, `fluent-community`, `fluent-security`, `fluentform`, `fluent-support` |
112
+
113
+ #### Response
114
+
115
+ ```json
116
+ {
117
+ "message": "Addon installation started successfully.",
118
+ "redirect": "https://example.com/wp-admin/admin.php?page=fluent-cart#/integrations"
119
+ }
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Global Integration Feeds
125
+
126
+ Global feeds fire automations on every matching order.
127
+
128
+ **Prefix:** `/fluent-cart/v2/integration/global-feeds` | **Policy:** `IntegrationPolicy`
129
+
130
+ ### List Global Integration Feeds
131
+
132
+ `GET /fluent-cart/v2/integration/global-feeds`
133
+
134
+ #### Response
135
+
136
+ ```json
137
+ {
138
+ "feeds": [
139
+ {
140
+ "id": 42,
141
+ "name": "Add to FluentCRM list",
142
+ "enabled": "yes",
143
+ "provider": "fluent-crm",
144
+ "feed": {
145
+ "name": "Add to FluentCRM list",
146
+ "enabled": "yes",
147
+ "list_id": "2",
148
+ "list_name": "Customers",
149
+ "merge_fields": {},
150
+ "conditionals": {
151
+ "conditions": [],
152
+ "status": false,
153
+ "type": "all"
154
+ }
155
+ },
156
+ "scope": "global"
157
+ }
158
+ ],
159
+ "available_integrations": {}
160
+ }
161
+ ```
162
+
163
+ ---
164
+
165
+ ### Save Feed Settings
166
+
167
+ `POST /fluent-cart/v2/integration/global-feeds/settings`
168
+
169
+ #### Parameters
170
+
171
+ | Parameter | Type | Location | Required | Description |
172
+ |-----------|------|----------|----------|-------------|
173
+ | `integration_name` | string | body | Yes | Integration provider key (e.g. `fluent-crm`, `webhook`) |
174
+ | `integration_id` | integer | body | No | Existing feed ID to update. Omit to create new feed |
175
+ | `integration` | string (JSON) | body | Yes | JSON string containing feed settings (`name`, `enabled`, `list_id`, `merge_fields`, `conditionals`) |
176
+
177
+ #### Example
178
+
179
+ ```bash
180
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/integration/global-feeds/settings" \
181
+ -u "username:app_password" \
182
+ -H "Content-Type: application/json" \
183
+ -d '{
184
+ "integration_name": "fluent-crm",
185
+ "integration": "{\"name\":\"Add to customers\",\"enabled\":\"yes\",\"list_id\":\"2\",\"list_name\":\"Customers\",\"merge_fields\":{},\"conditionals\":{\"conditions\":[],\"status\":false,\"type\":\"all\"}}"
186
+ }'
187
+ ```
188
+
189
+ ---
190
+
191
+ ### Change Feed Status
192
+
193
+ `POST /fluent-cart/v2/integration/global-feeds/change-status/{integration_id}`
194
+
195
+ #### Parameters
196
+
197
+ | Parameter | Type | Location | Required | Description |
198
+ |-----------|------|----------|----------|-------------|
199
+ | `integration_id` | integer | path | Yes | Feed ID to toggle |
200
+ | `status` | string | body | Yes | `yes` (enable) or `no` (disable) |
201
+
202
+ ---
203
+
204
+ ### Delete Feed
205
+
206
+ `DELETE /fluent-cart/v2/integration/global-feeds/{integration_id}`
207
+
208
+ ---
209
+
210
+ ### Helper Endpoints (`lists`, `dynamic_options`, `chained`)
211
+
212
+ - `GET /integration/feed/lists?integration_name={key}&list_id={id}` — Fetch list merge fields.
213
+ - `GET /integration/feed/dynamic_options?option_key={key}&sub_option_key={slug}&search={term}` — Asynchronously fetch dynamic option dropdowns (WP post types, CRM tags, etc.).
214
+ - `POST /integration/feed/chained` — Dependent input handling via `fluent_cart/integration/chained_{route}` filter.
215
+
216
+ ---
217
+
218
+ ## Product-Level Integrations
219
+
220
+ Product-specific integration feeds fire automations only when orders contain the specific product (and optional variations).
221
+
222
+ **Prefix:** `/fluent-cart/v2/products/{product_id}/integrations` | **Policy:** `ProductPolicy`
223
+
224
+ ### List Product Integration Feeds
225
+
226
+ `GET /fluent-cart/v2/products/{productId}/integrations`
227
+
228
+ #### Response
229
+
230
+ ```json
231
+ {
232
+ "feeds": [
233
+ {
234
+ "id": 15,
235
+ "name": "Tag VIP buyers",
236
+ "enabled": "yes",
237
+ "provider": "fluent-crm",
238
+ "feed": {
239
+ "name": "Tag VIP buyers",
240
+ "enabled": "yes",
241
+ "list_id": "3",
242
+ "list_name": "VIP Customers",
243
+ "merge_fields": {},
244
+ "conditional_variation_ids": [101, 102],
245
+ "conditionals": {
246
+ "conditions": [],
247
+ "status": false,
248
+ "type": "all"
249
+ }
250
+ },
251
+ "scope": "product"
252
+ }
253
+ ]
254
+ }
255
+ ```
256
+
257
+ ---
258
+
259
+ ### Get Product Integration Settings
260
+
261
+ `GET /fluent-cart/v2/products/{product_id}/integrations/{integration_name}/settings`
262
+
263
+ Returns form schema, saved feed values, and `product_variations` list for targeting specific variations.
264
+
265
+ #### Response
266
+
267
+ ```json
268
+ {
269
+ "settings": {
270
+ "conditional_variation_ids": []
271
+ },
272
+ "product_variations": [
273
+ { "id": 101, "title": "Basic Plan" },
274
+ { "id": 102, "title": "Pro Plan" }
275
+ ],
276
+ "scope": "product"
277
+ }
278
+ ```
279
+
280
+ ---
281
+
282
+ ### Save Product Integration Feed
283
+
284
+ `POST /fluent-cart/v2/products/{product_id}/integrations`
285
+
286
+ #### Parameters
287
+
288
+ | Parameter | Type | Location | Required | Description |
289
+ |-----------|------|----------|----------|-------------|
290
+ | `product_id` | integer | path | Yes | Product ID |
291
+ | `integration_name` | string | body | Yes | Integration provider key (e.g. `fluent-crm`) |
292
+ | `integration_id` | integer | body | No | Feed ID to update. Omit to create new feed |
293
+ | `integration` | string (JSON) | body | Yes | JSON string containing `name`, `enabled`, `list_id`, `merge_fields`, `conditional_variation_ids`, `conditionals` |
294
+
295
+ #### Request Example
296
+
297
+ ```json
298
+ {
299
+ "integration_name": "fluent-crm",
300
+ "integration": "{\"name\":\"Tag VIP buyers\",\"enabled\":\"yes\",\"list_id\":\"3\",\"conditional_variation_ids\":[101],\"merge_fields\":{},\"conditionals\":{\"conditions\":[],\"status\":false,\"type\":\"all\"}}"
301
+ }
302
+ ```
303
+
304
+ ---
305
+
306
+ ### Change Product Feed Status
307
+
308
+ `POST /fluent-cart/v2/products/{product_id}/integrations/feed/change-status`
309
+
310
+ > **Note:** Requires `product_id` in both URL path and request body!
311
+
312
+ #### Parameters
313
+
314
+ | Parameter | Type | Location | Required | Description |
315
+ |-----------|------|----------|----------|-------------|
316
+ | `product_id` | integer | path & body | Yes | Product ID |
317
+ | `notification_id` | integer | body | Yes | Feed ID to toggle |
318
+ | `status` | string | body | Yes | `yes` or `no` |
319
+
320
+ ---
321
+
322
+ ### Delete Product Integration Feed
323
+
324
+ `DELETE /fluent-cart/v2/products/{product_id}/integrations/{integration_id}`