fluentcart-developer 3.0.0 → 3.0.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 (609) hide show
  1. package/LICENSE.md +26 -26
  2. package/README.md +59 -59
  3. package/dist/cards/fluentcart/templates-native.js +1087 -1087
  4. package/dist/cards/fluentcart/tools.js +2309 -2309
  5. package/dist/skills/fluentcart-developer/SKILL.md +108 -108
  6. package/dist/skills/fluentcart-developer/examples/README.md +30 -30
  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-custom-addon/fluentcart-custom-addon.php +113 -113
  10. package/dist/skills/fluentcart-developer/examples/sample-custom-payment-gateway/fluentcart-custom-gateway-example.php +148 -148
  11. package/dist/skills/fluentcart-developer/examples/sample-fee-surcharge-plugin/fluentcart-fee-surcharge.php +38 -38
  12. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/README.md +22 -22
  13. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/sample-plugin-with-licensing-sdk.php +79 -79
  14. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/FluentLicensing.php +303 -303
  15. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/LicenseSettings.php +566 -566
  16. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/PluginUpdater.php +304 -304
  17. package/dist/skills/fluentcart-developer/examples/sample-shipping-carrier/fluentcart-custom-shipping-carrier.php +61 -61
  18. package/dist/skills/fluentcart-developer/references/api/authentication.md +452 -452
  19. package/dist/skills/fluentcart-developer/references/api/coupons.md +786 -786
  20. package/dist/skills/fluentcart-developer/references/api/customers.md +889 -889
  21. package/dist/skills/fluentcart-developer/references/api/files.md +609 -609
  22. package/dist/skills/fluentcart-developer/references/api/index.md +432 -432
  23. package/dist/skills/fluentcart-developer/references/api/licensing.md +633 -633
  24. package/dist/skills/fluentcart-developer/references/api/order-bump.md +384 -384
  25. package/dist/skills/fluentcart-developer/references/api/orders.md +814 -814
  26. package/dist/skills/fluentcart-developer/references/api/products.md +866 -866
  27. package/dist/skills/fluentcart-developer/references/api/roles-permissions.md +536 -536
  28. package/dist/skills/fluentcart-developer/references/api/subscriptions.md +827 -827
  29. package/dist/skills/fluentcart-developer/references/database/index.md +44 -44
  30. package/dist/skills/fluentcart-developer/references/database/models/activity.md +178 -178
  31. package/dist/skills/fluentcart-developer/references/database/models/applied-coupon.md +291 -291
  32. package/dist/skills/fluentcart-developer/references/database/models/attribute-group.md +239 -239
  33. package/dist/skills/fluentcart-developer/references/database/models/attribute-relation.md +181 -181
  34. package/dist/skills/fluentcart-developer/references/database/models/attribute-term.md +219 -219
  35. package/dist/skills/fluentcart-developer/references/database/models/cart.md +645 -645
  36. package/dist/skills/fluentcart-developer/references/database/models/coupon.md +427 -427
  37. package/dist/skills/fluentcart-developer/references/database/models/customer-addresses.md +348 -348
  38. package/dist/skills/fluentcart-developer/references/database/models/customer-meta.md +156 -156
  39. package/dist/skills/fluentcart-developer/references/database/models/customer.md +584 -584
  40. package/dist/skills/fluentcart-developer/references/database/models/dynamic-model.md +163 -163
  41. package/dist/skills/fluentcart-developer/references/database/models/label-relationship.md +155 -155
  42. package/dist/skills/fluentcart-developer/references/database/models/label.md +153 -153
  43. package/dist/skills/fluentcart-developer/references/database/models/license-activation.md +182 -182
  44. package/dist/skills/fluentcart-developer/references/database/models/license-meta.md +163 -163
  45. package/dist/skills/fluentcart-developer/references/database/models/license-site.md +208 -208
  46. package/dist/skills/fluentcart-developer/references/database/models/license.md +640 -640
  47. package/dist/skills/fluentcart-developer/references/database/models/meta.md +233 -233
  48. package/dist/skills/fluentcart-developer/references/database/models/order-address.md +391 -391
  49. package/dist/skills/fluentcart-developer/references/database/models/order-download-permission.md +144 -144
  50. package/dist/skills/fluentcart-developer/references/database/models/order-item.md +383 -383
  51. package/dist/skills/fluentcart-developer/references/database/models/order-meta.md +303 -303
  52. package/dist/skills/fluentcart-developer/references/database/models/order-operation.md +158 -158
  53. package/dist/skills/fluentcart-developer/references/database/models/order-promotion-stat.md +175 -175
  54. package/dist/skills/fluentcart-developer/references/database/models/order-promotion.md +250 -250
  55. package/dist/skills/fluentcart-developer/references/database/models/order-tax-rate.md +172 -172
  56. package/dist/skills/fluentcart-developer/references/database/models/order-transaction.md +440 -440
  57. package/dist/skills/fluentcart-developer/references/database/models/order.md +727 -727
  58. package/dist/skills/fluentcart-developer/references/database/models/product-detail.md +397 -397
  59. package/dist/skills/fluentcart-developer/references/database/models/product-download.md +258 -258
  60. package/dist/skills/fluentcart-developer/references/database/models/product-meta.md +153 -153
  61. package/dist/skills/fluentcart-developer/references/database/models/product-variation.md +556 -556
  62. package/dist/skills/fluentcart-developer/references/database/models/product.md +580 -580
  63. package/dist/skills/fluentcart-developer/references/database/models/relationships.md +427 -427
  64. package/dist/skills/fluentcart-developer/references/database/models/scheduled-action.md +175 -175
  65. package/dist/skills/fluentcart-developer/references/database/models/shipping-class.md +148 -148
  66. package/dist/skills/fluentcart-developer/references/database/models/shipping-method.md +280 -280
  67. package/dist/skills/fluentcart-developer/references/database/models/shipping-zone.md +205 -205
  68. package/dist/skills/fluentcart-developer/references/database/models/subscription-meta.md +173 -173
  69. package/dist/skills/fluentcart-developer/references/database/models/subscription.md +528 -528
  70. package/dist/skills/fluentcart-developer/references/database/models/tax-class.md +195 -195
  71. package/dist/skills/fluentcart-developer/references/database/models/tax-rate.md +225 -225
  72. package/dist/skills/fluentcart-developer/references/database/models/user-meta.md +166 -166
  73. package/dist/skills/fluentcart-developer/references/database/models/user.md +220 -220
  74. package/dist/skills/fluentcart-developer/references/database/models.md +404 -404
  75. package/dist/skills/fluentcart-developer/references/database/query-builder.md +860 -860
  76. package/dist/skills/fluentcart-developer/references/database/readme.md +276 -276
  77. package/dist/skills/fluentcart-developer/references/database/schema.md +1002 -1002
  78. package/dist/skills/fluentcart-developer/references/engineering/adding-custom-pages-to-the-customer-dashboard.md +395 -395
  79. package/dist/skills/fluentcart-developer/references/engineering/index.md +4 -4
  80. package/dist/skills/fluentcart-developer/references/engineering.md +4 -4
  81. package/dist/skills/fluentcart-developer/references/getting-started.md +249 -249
  82. package/dist/skills/fluentcart-developer/references/guides/frontend.md +519 -519
  83. package/dist/skills/fluentcart-developer/references/guides/index.md +107 -107
  84. package/dist/skills/fluentcart-developer/references/guides/integrations.md +600 -600
  85. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/index.md +237 -237
  86. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/labels-and-tracking.md +481 -481
  87. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/live-rates.md +269 -269
  88. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/reference.md +223 -223
  89. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/settings.md +370 -370
  90. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier.md +237 -237
  91. package/dist/skills/fluentcart-developer/references/guides/subscriptions.md +217 -217
  92. package/dist/skills/fluentcart-developer/references/hooks/actions/admin-and-templates.md +1079 -1079
  93. package/dist/skills/fluentcart-developer/references/hooks/actions/cart-and-checkout.md +1795 -1795
  94. package/dist/skills/fluentcart-developer/references/hooks/actions/customers-and-users.md +327 -327
  95. package/dist/skills/fluentcart-developer/references/hooks/actions/licenses.md +829 -829
  96. package/dist/skills/fluentcart-developer/references/hooks/actions/modules.md +81 -81
  97. package/dist/skills/fluentcart-developer/references/hooks/actions/orders.md +757 -757
  98. package/dist/skills/fluentcart-developer/references/hooks/actions/payments-and-integrations.md +1163 -1163
  99. package/dist/skills/fluentcart-developer/references/hooks/actions/pro-modules.md +219 -219
  100. package/dist/skills/fluentcart-developer/references/hooks/actions/products-and-coupons.md +1019 -1019
  101. package/dist/skills/fluentcart-developer/references/hooks/actions/subscriptions.md +1290 -1290
  102. package/dist/skills/fluentcart-developer/references/hooks/actions.md +16 -16
  103. package/dist/skills/fluentcart-developer/references/hooks/deprecated.md +60 -60
  104. package/dist/skills/fluentcart-developer/references/hooks/filters/cart-and-checkout.md +2032 -2032
  105. package/dist/skills/fluentcart-developer/references/hooks/filters/customers-and-subscriptions.md +1746 -1746
  106. package/dist/skills/fluentcart-developer/references/hooks/filters/integrations-and-advanced.md +2439 -2439
  107. package/dist/skills/fluentcart-developer/references/hooks/filters/modules.md +464 -464
  108. package/dist/skills/fluentcart-developer/references/hooks/filters/orders-and-payments.md +2658 -2658
  109. package/dist/skills/fluentcart-developer/references/hooks/filters/pro-modules.md +502 -502
  110. package/dist/skills/fluentcart-developer/references/hooks/filters/products-and-pricing.md +1785 -1785
  111. package/dist/skills/fluentcart-developer/references/hooks/filters/settings-and-configuration.md +2966 -2966
  112. package/dist/skills/fluentcart-developer/references/hooks/filters.md +14 -14
  113. package/dist/skills/fluentcart-developer/references/hooks/index.md +35 -35
  114. package/dist/skills/fluentcart-developer/references/index.md +625 -625
  115. package/dist/skills/fluentcart-developer/references/modules/fee-system.md +427 -427
  116. package/dist/skills/fluentcart-developer/references/modules/ghost-product-selling.md +440 -440
  117. package/dist/skills/fluentcart-developer/references/modules/index.md +484 -484
  118. package/dist/skills/fluentcart-developer/references/modules/licensing.md +342 -342
  119. package/dist/skills/fluentcart-developer/references/modules/order-bump.md +433 -433
  120. package/dist/skills/fluentcart-developer/references/modules/payment-methods.md +129 -129
  121. package/dist/skills/fluentcart-developer/references/modules/refunds.md +170 -170
  122. package/dist/skills/fluentcart-developer/references/modules/shipping.md +846 -846
  123. package/dist/skills/fluentcart-developer/references/modules/storage.md +986 -986
  124. package/dist/skills/fluentcart-developer/references/modules/subscription-vendor-ids.md +186 -186
  125. package/dist/skills/fluentcart-developer/references/modules/subscriptions.md +678 -678
  126. package/dist/skills/fluentcart-developer/references/payment-methods-integration/index.md +164 -164
  127. package/dist/skills/fluentcart-developer/references/payment-methods-integration/paddle-example.md +1648 -1648
  128. package/dist/skills/fluentcart-developer/references/payment-methods-integration/payment/setting/fields.md +353 -353
  129. package/dist/skills/fluentcart-developer/references/payment-methods-integration/quick-implementation.md +1079 -1079
  130. package/dist/skills/fluentcart-developer/references/payment-methods-integration.md +164 -164
  131. package/dist/skills/fluentcart-developer/references/restapi/checkout.md +573 -573
  132. package/dist/skills/fluentcart-developer/references/restapi/coupons.md +958 -958
  133. package/dist/skills/fluentcart-developer/references/restapi/customer-profile.md +1423 -1423
  134. package/dist/skills/fluentcart-developer/references/restapi/customers.md +1103 -1103
  135. package/dist/skills/fluentcart-developer/references/restapi/dashboard.md +1083 -1083
  136. package/dist/skills/fluentcart-developer/references/restapi/data-export.md +132 -132
  137. package/dist/skills/fluentcart-developer/references/restapi/email-notifications.md +846 -846
  138. package/dist/skills/fluentcart-developer/references/restapi/files.md +313 -313
  139. package/dist/skills/fluentcart-developer/references/restapi/index.md +127 -127
  140. package/dist/skills/fluentcart-developer/references/restapi/integrations.md +1000 -1000
  141. package/dist/skills/fluentcart-developer/references/restapi/inventory.md +192 -192
  142. package/dist/skills/fluentcart-developer/references/restapi/labels-and-attributes.md +797 -797
  143. package/dist/skills/fluentcart-developer/references/restapi/licensing.md +1733 -1733
  144. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-available-shipping-methods.md +30 -30
  145. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-checkout-summary.md +28 -28
  146. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-country-info.md +29 -29
  147. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-order-info.md +28 -28
  148. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-shipping-methods-list-view.md +30 -30
  149. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/login.md +66 -66
  150. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/place-order.md +179 -179
  151. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/apply-coupon.md +83 -83
  152. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/cancel-coupon.md +87 -87
  153. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/check-product-eligibility.md +59 -59
  154. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/create-coupon.md +230 -230
  155. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/delete-coupon.md +29 -29
  156. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon-settings.md +20 -20
  157. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon.md +27 -27
  158. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupon-codes.md +20 -20
  159. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupons.md +37 -37
  160. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/re-apply-coupons.md +75 -75
  161. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/store-coupon-settings.md +40 -40
  162. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/update-coupon.md +133 -133
  163. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-address-checkout.md +138 -138
  164. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-profile-address.md +119 -119
  165. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/dashboard-overview.md +22 -22
  166. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/delete-profile-address.md +46 -46
  167. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-order-details.md +30 -30
  168. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-portal-sections.md +29 -29
  169. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-profile-details.md +22 -22
  170. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-transaction-billing-address.md +30 -30
  171. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-upgrade-paths.md +31 -31
  172. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-downloads.md +29 -29
  173. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-orders.md +28 -28
  174. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/make-profile-address-primary.md +55 -55
  175. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/pause-subscription.md +29 -29
  176. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/resume-subscription.md +29 -29
  177. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/save-transaction-billing-address.md +92 -92
  178. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/select-address-for-checkout.md +32 -32
  179. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-address.md +115 -115
  180. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-details.md +69 -69
  181. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/attach-user.md +50 -50
  182. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/bulk-actions.md +65 -65
  183. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-address.md +135 -135
  184. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-customer.md +108 -108
  185. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/delete-address.md +62 -62
  186. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/detach-user.md +28 -28
  187. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/find-customer-order.md +27 -27
  188. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-attachable-users.md +20 -20
  189. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-addresses.md +28 -28
  190. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-orders.md +37 -37
  191. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-stats.md +27 -27
  192. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer.md +32 -32
  193. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/list-customers.md +37 -37
  194. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/recalculate-ltv.md +28 -28
  195. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/set-primary-address.md +72 -72
  196. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-additional-info.md +55 -55
  197. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-address.md +144 -144
  198. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-customer.md +123 -123
  199. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/attach-note-to-order.md +49 -49
  200. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-all-pages.md +21 -21
  201. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-single-page.md +55 -55
  202. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/delete-activity.md +28 -28
  203. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-country-info.md +29 -29
  204. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-dashboard-stats.md +22 -22
  205. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-filter-options.md +31 -31
  206. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-data.md +20 -20
  207. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-settings.md +20 -20
  208. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-print-templates.md +20 -20
  209. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-search-options.md +27 -27
  210. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-widgets.md +28 -28
  211. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/initialize-app.md +20 -20
  212. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-activities.md +33 -33
  213. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-attachments.md +21 -21
  214. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-countries.md +20 -20
  215. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/mark-activity-read.md +53 -53
  216. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/run-data-backfills.md +21 -21
  217. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-settings.md +54 -54
  218. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-tax-settings.md +73 -73
  219. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-print-templates.md +64 -64
  220. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/upload-attachment.md +42 -42
  221. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-customers-batch.md +129 -129
  222. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-licenses-batch.md +133 -133
  223. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-orders-batch.md +129 -129
  224. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-subscriptions-batch.md +129 -129
  225. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-customers-export-schema.md +21 -21
  226. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-licenses-export-schema.md +26 -26
  227. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-orders-export-schema.md +21 -21
  228. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-subscriptions-export-schema.md +21 -21
  229. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/enable-notification.md +57 -57
  230. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-digest-settings.md +22 -22
  231. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-notification.md +30 -30
  232. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-reminders.md +22 -22
  233. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-settings.md +22 -22
  234. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-shortcodes.md +22 -22
  235. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/list-notifications.md +20 -20
  236. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-default-template.md +66 -66
  237. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-notification.md +50 -50
  238. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-digest-settings.md +101 -101
  239. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-reminders.md +162 -162
  240. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-settings.md +99 -99
  241. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-digest-test.md +47 -47
  242. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-manual-reminder.md +51 -51
  243. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/update-notification.md +93 -93
  244. package/dist/skills/fluentcart-developer/references/restapi/operations/files/delete-file.md +31 -31
  245. package/dist/skills/fluentcart-developer/references/restapi/operations/files/get-bucket-list.md +28 -28
  246. package/dist/skills/fluentcart-developer/references/restapi/operations/files/list-files.md +30 -30
  247. package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-editor-file.md +32 -32
  248. package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-file.md +34 -34
  249. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/chained-data-request.md +46 -46
  250. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/change-feed-status.md +51 -51
  251. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/delete-feed.md +27 -27
  252. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-dynamic-options.md +29 -29
  253. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-lists.md +27 -27
  254. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-settings.md +27 -27
  255. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-feeds.md +20 -20
  256. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-settings.md +26 -26
  257. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/install-addon-plugin.md +49 -49
  258. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/list-addons.md +20 -20
  259. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/save-feed-settings.md +52 -52
  260. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/set-global-settings.md +50 -50
  261. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/bulk-update-stock.md +94 -94
  262. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/export-inventory.md +81 -81
  263. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-adjustment-history.md +26 -26
  264. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-inventory-stats.md +21 -21
  265. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/list-inventory.md +33 -33
  266. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/update-stock.md +75 -75
  267. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-attribute-group.md +31 -31
  268. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-label.md +31 -31
  269. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-terms.md +90 -90
  270. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-group.md +28 -28
  271. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-term.md +29 -29
  272. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-group.md +28 -28
  273. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-library.md +20 -20
  274. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-groups.md +32 -32
  275. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-terms.md +33 -33
  276. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-labels.md +20 -20
  277. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-groups.md +51 -51
  278. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-terms.md +56 -56
  279. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-group.md +37 -37
  280. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-term.md +39 -39
  281. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-label-selections.md +32 -32
  282. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-plugin-license.md +41 -41
  283. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-site-admin.md +60 -60
  284. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-plugin-license.md +18 -18
  285. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-admin.md +67 -67
  286. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-customer.md +47 -47
  287. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/delete-license.md +24 -24
  288. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/extend-license-validity.md +47 -47
  289. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-license-details.md +25 -25
  290. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-licenses-admin.md +26 -26
  291. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-activations.md +25 -25
  292. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-details.md +25 -25
  293. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-site.md +30 -30
  294. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-plugin-license-status.md +18 -18
  295. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-product-license-settings.md +24 -24
  296. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-customer-licenses.md +25 -25
  297. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-license-sites.md +33 -33
  298. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-licenses.md +38 -38
  299. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-activate-license.md +54 -54
  300. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-check-license.md +26 -26
  301. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-deactivate-license.md +46 -46
  302. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-download-license-package.md +23 -23
  303. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-get-license-version.md +26 -26
  304. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/regenerate-license-key.md +24 -24
  305. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/save-product-license-settings.md +193 -193
  306. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-activation-limit.md +53 -53
  307. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-status.md +52 -52
  308. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/create-order-bump.md +47 -47
  309. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/delete-order-bump.md +25 -25
  310. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/get-order-bump.md +25 -25
  311. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/list-order-bumps.md +29 -29
  312. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/update-order-bump.md +141 -141
  313. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/accept-dispute.md +47 -47
  314. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/bulk-actions.md +72 -72
  315. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-shipping.md +67 -67
  316. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-tax.md +98 -98
  317. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/change-customer.md +50 -50
  318. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/charge-now.md +29 -29
  319. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-and-change-customer.md +92 -92
  320. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-custom-order-item.md +68 -68
  321. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-order.md +351 -351
  322. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-renewal-now.md +29 -29
  323. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/delete-order.md +28 -28
  324. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/generate-missing-licenses.md +29 -29
  325. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order-transactions.md +27 -27
  326. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order.md +27 -27
  327. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-renewal.md +28 -28
  328. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-shipping-methods.md +28 -28
  329. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-single-transaction.md +28 -28
  330. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-order-currencies.md +22 -22
  331. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-orders.md +42 -42
  332. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-renewals.md +28 -28
  333. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/mark-as-paid.md +61 -61
  334. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/price-order.md +135 -135
  335. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/refund-order.md +72 -72
  336. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/resend-renewal-invoice.md +29 -29
  337. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/skip-renewal.md +48 -48
  338. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-order-statuses.md +28 -28
  339. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-pending-transaction.md +29 -29
  340. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address-id.md +60 -60
  341. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address.md +98 -98
  342. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order.md +172 -172
  343. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-statuses.md +77 -77
  344. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-subscription-details.md +84 -84
  345. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-transaction-status.md +51 -51
  346. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/void-renewal.md +30 -30
  347. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/create-pdf-template.md +42 -42
  348. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/delete-pdf-template.md +26 -26
  349. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/download-pdf-preview.md +44 -44
  350. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-factory-default-templates.md +19 -19
  351. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-status.md +21 -21
  352. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-template.md +26 -26
  353. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-saved-templates.md +21 -21
  354. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-seller-details.md +19 -19
  355. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/list-pdf-templates.md +19 -19
  356. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-pdf-template.md +53 -53
  357. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-seller-details.md +97 -97
  358. package/dist/skills/fluentcart-developer/references/restapi/operations/products/add-product-terms.md +64 -64
  359. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-edit-fetch.md +30 -30
  360. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-insert-products.md +62 -62
  361. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-products.md +59 -59
  362. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-variants.md +83 -83
  363. package/dist/skills/fluentcart-developer/references/restapi/operations/products/change-integration-status.md +64 -64
  364. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-dummy-products.md +45 -45
  365. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-product.md +81 -81
  366. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-variation.md +181 -181
  367. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-downloadable-file.md +27 -27
  368. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product-integration.md +30 -30
  369. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product.md +27 -27
  370. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-taxonomy-term.md +55 -55
  371. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-upgrade-path.md +27 -27
  372. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-variation.md +27 -27
  373. package/dist/skills/fluentcart-developer/references/restapi/operations/products/do-bulk-action.md +56 -56
  374. package/dist/skills/fluentcart-developer/references/restapi/operations/products/duplicate-product.md +56 -56
  375. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-products-by-ids.md +26 -26
  376. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-taxonomy-terms.md +20 -20
  377. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-terms-by-parent.md +60 -60
  378. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-variations-by-ids.md +26 -26
  379. package/dist/skills/fluentcart-developer/references/restapi/operations/products/find-subscription-variants.md +26 -26
  380. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-bundle-info.md +27 -27
  381. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-downloadable-url.md +27 -27
  382. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-max-excerpt-word-count.md +20 -20
  383. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-pricing-widgets.md +27 -27
  384. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-feeds.md +29 -29
  385. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-settings.md +31 -31
  386. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-pricing.md +28 -28
  387. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product.md +28 -28
  388. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-related-products.md +31 -31
  389. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-upgrade-settings.md +27 -27
  390. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-variation-upgrade-paths.md +28 -28
  391. package/dist/skills/fluentcart-developer/references/restapi/operations/products/group-bulk-update-variants.md +103 -103
  392. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-all-variants.md +26 -26
  393. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-product-variations.md +26 -26
  394. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-products.md +34 -34
  395. package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-shipping-class.md +27 -27
  396. package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-tax-class.md +27 -27
  397. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-bundle-info.md +56 -56
  398. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-product-integration.md +62 -62
  399. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-upgrade-path.md +78 -78
  400. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-product-variant-options.md +29 -29
  401. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-products-by-name.md +28 -28
  402. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-variants-by-name.md +28 -28
  403. package/dist/skills/fluentcart-developer/references/restapi/operations/products/set-variation-media.md +74 -74
  404. package/dist/skills/fluentcart-developer/references/restapi/operations/products/suggest-sku.md +28 -28
  405. package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-downloadable-files.md +134 -134
  406. package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-taxonomy-terms.md +61 -61
  407. package/dist/skills/fluentcart-developer/references/restapi/operations/products/toggle-product-tax-exemption.md +56 -56
  408. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-downloadable-file.md +98 -98
  409. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-inventory.md +56 -56
  410. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-long-desc-editor-mode.md +49 -49
  411. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-manage-stock.md +53 -53
  412. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-detail.md +58 -58
  413. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-pricing.md +225 -225
  414. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-shipping-class.md +49 -49
  415. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-tax-class.md +49 -49
  416. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-upgrade-path.md +78 -78
  417. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-option.md +79 -79
  418. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-tax-exemption.md +56 -56
  419. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation-pricing-table.md +49 -49
  420. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation.md +105 -105
  421. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/get-product-views.md +34 -34
  422. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/list-products.md +42 -42
  423. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/search-products.md +30 -30
  424. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/channel-rules.md +24 -24
  425. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/country-heat-map.md +22 -22
  426. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupon-overview.md +37 -37
  427. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupons.md +36 -36
  428. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-insights.md +31 -31
  429. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-overview.md +36 -36
  430. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-repeat.md +35 -35
  431. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segment-customers.md +36 -36
  432. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segments.md +30 -30
  433. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-value.md +34 -34
  434. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/dashboard-stats.md +30 -30
  435. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/failed-orders.md +34 -34
  436. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-new-vs-returning-customer.md +34 -34
  437. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-by-day-and-hour.md +34 -34
  438. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-meta.md +29 -29
  439. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-top-sold-products.md +34 -34
  440. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/future-renewals.md +31 -31
  441. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/generate-retention-snapshots.md +24 -24
  442. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-overview.md +30 -30
  443. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-activities.md +26 -26
  444. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-orders.md +20 -20
  445. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-revenue.md +37 -37
  446. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-at-risk.md +35 -35
  447. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-variations.md +33 -33
  448. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments.md +33 -33
  449. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/item-count-distribution.md +34 -34
  450. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-chart.md +30 -30
  451. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-pie-chart.md +22 -22
  452. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-summary.md +22 -22
  453. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/locations.md +43 -43
  454. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-chart.md +37 -37
  455. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-completion-time.md +34 -34
  456. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-mix.md +34 -34
  457. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-value-distribution.md +34 -34
  458. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-disputes.md +38 -38
  459. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-methods.md +36 -36
  460. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods.md +37 -37
  461. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison-launch.md +33 -33
  462. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison.md +40 -40
  463. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-detail.md +37 -37
  464. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-sales.md +37 -37
  465. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/refunds-overview.md +37 -37
  466. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/retention-snapshots-step.md +45 -45
  467. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sales-growth-chart.md +35 -35
  468. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/save-channel-rules.md +73 -73
  469. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/source-channels.md +37 -37
  470. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sources.md +49 -49
  471. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-cohorts.md +33 -33
  472. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-health.md +30 -30
  473. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-rebuys.md +37 -37
  474. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-retention.md +34 -34
  475. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-variations.md +22 -22
  476. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscriptions-overview.md +37 -37
  477. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/weeks-between-refund.md +34 -34
  478. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/assign-role.md +48 -48
  479. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/delete-role-assignment.md +47 -47
  480. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/get-role.md +25 -25
  481. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-managers.md +18 -18
  482. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-roles.md +18 -18
  483. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/search-users.md +25 -25
  484. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/update-role.md +43 -43
  485. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/create-saved-view.md +106 -106
  486. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/delete-saved-view.md +26 -26
  487. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/list-saved-views.md +25 -25
  488. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/update-saved-view.md +83 -83
  489. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-payment-addon.md +44 -44
  490. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-plugin-addon.md +44 -44
  491. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/change-storage-driver-status.md +56 -56
  492. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/check-paypal-webhook.md +26 -26
  493. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/create-storage-bucket.md +63 -63
  494. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/disconnect-payment-method.md +55 -55
  495. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/exchange-paypal-seller-auth-token.md +62 -62
  496. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-active-storage-drivers.md +20 -20
  497. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-checkout-fields.md +22 -22
  498. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-email-shortcodes.md +20 -20
  499. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-config-snippets.md +26 -26
  500. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-status.md +20 -20
  501. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-module-settings.md +20 -20
  502. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-connection-info.md +26 -26
  503. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-settings.md +26 -26
  504. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-permissions.md +22 -22
  505. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-plugin-addons.md +20 -20
  506. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-storage-driver-settings.md +27 -27
  507. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-store-settings.md +26 -26
  508. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-mcp-adapter.md +21 -21
  509. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-payment-addon.md +60 -60
  510. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-plugin-addon.md +64 -64
  511. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-payment-methods.md +20 -20
  512. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-storage-drivers.md +20 -20
  513. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-storage-buckets.md +67 -67
  514. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reorder-payment-methods.md +55 -55
  515. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reset-storage-driver-settings.md +45 -45
  516. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-checkout-fields.md +133 -133
  517. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-confirmation-settings.md +68 -68
  518. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-module-settings.md +68 -68
  519. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-design.md +67 -67
  520. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-settings.md +58 -58
  521. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-permissions.md +68 -68
  522. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-storage-driver-settings.md +62 -62
  523. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-store-settings.md +239 -239
  524. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/setup-paypal-webhook.md +48 -48
  525. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/toggle-mcp.md +40 -40
  526. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-storage-driver-connection.md +62 -62
  527. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-turnstile-keys.md +55 -55
  528. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-class.md +73 -73
  529. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-method.md +110 -110
  530. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-zone.md +56 -56
  531. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-class.md +29 -29
  532. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-method.md +29 -29
  533. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-zone.md +29 -29
  534. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class-profile.md +30 -30
  535. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class.md +29 -29
  536. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-packages.md +22 -22
  537. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-zone.md +27 -27
  538. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-countries.md +22 -22
  539. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-states.md +28 -28
  540. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-classes.md +31 -31
  541. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-zones.md +31 -31
  542. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/save-shipping-packages.md +112 -112
  543. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-class.md +79 -79
  544. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-method.md +113 -113
  545. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-zone.md +62 -62
  546. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-zone-order.md +52 -52
  547. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-auto-renew.md +30 -30
  548. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-subscription.md +52 -52
  549. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/confirm-subscription-switch.md +70 -70
  550. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/fetch-subscription-remote.md +28 -28
  551. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/generate-early-payment-link.md +29 -29
  552. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-customer-subscription.md +27 -27
  553. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-or-create-plan.md +69 -69
  554. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-setup-intent-attempts.md +30 -30
  555. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-subscription.md +28 -28
  556. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/initiate-early-payment.md +31 -31
  557. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-customer-subscriptions.md +27 -27
  558. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-subscriptions.md +39 -39
  559. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/pause-subscription.md +28 -28
  560. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/reactivate-subscription.md +28 -28
  561. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/resume-subscription.md +28 -28
  562. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/switch-payment-method.md +70 -70
  563. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-payment-method.md +69 -69
  564. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-vendor-ids.md +56 -56
  565. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/verify-vendor-ids.md +56 -56
  566. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-class.md +51 -51
  567. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-rate.md +117 -117
  568. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-product-override.md +27 -27
  569. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-shipping-tax-override.md +27 -27
  570. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-class.md +28 -28
  571. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-rate.md +27 -27
  572. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-id.md +27 -27
  573. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-rates.md +28 -28
  574. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-eu-vat-product-overrides.md +20 -20
  575. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-oss-country-rates.md +20 -20
  576. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-preconfigured-tax-rates.md +20 -20
  577. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-product-overrides.md +27 -27
  578. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-tax-settings.md +20 -20
  579. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-all-tax-rates.md +20 -20
  580. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-classes.md +20 -20
  581. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-records.md +37 -37
  582. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/mark-taxes-as-filed.md +58 -58
  583. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/reset-eu-vat-rates.md +21 -21
  584. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-configured-countries.md +57 -57
  585. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-country-tax-id.md +50 -50
  586. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-eu-vat-cross-border-settings.md +127 -127
  587. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-oss-country-rates.md +100 -100
  588. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-product-override.md +110 -110
  589. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-shipping-tax-override.md +52 -52
  590. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-tax-settings.md +166 -166
  591. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-country-status.md +54 -54
  592. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-tax-rate.md +116 -116
  593. package/dist/skills/fluentcart-developer/references/restapi/order-bumps.md +433 -433
  594. package/dist/skills/fluentcart-developer/references/restapi/orders.md +1212 -1212
  595. package/dist/skills/fluentcart-developer/references/restapi/pdf-templates.md +212 -212
  596. package/dist/skills/fluentcart-developer/references/restapi/products.md +2485 -2485
  597. package/dist/skills/fluentcart-developer/references/restapi/public-shop.md +191 -191
  598. package/dist/skills/fluentcart-developer/references/restapi/reports.md +3773 -3773
  599. package/dist/skills/fluentcart-developer/references/restapi/roles.md +403 -403
  600. package/dist/skills/fluentcart-developer/references/restapi/saved-views.md +136 -136
  601. package/dist/skills/fluentcart-developer/references/restapi/settings.md +1423 -1423
  602. package/dist/skills/fluentcart-developer/references/restapi/shipping.md +905 -905
  603. package/dist/skills/fluentcart-developer/references/restapi/subscriptions.md +1169 -1169
  604. package/dist/skills/fluentcart-developer/references/restapi/tax.md +1551 -1551
  605. package/dist/skills/fluentcart-developer/references/restapi.md +127 -127
  606. package/dist/skills/fluentcart-developer/scripts/cli.js +1 -1
  607. package/dist/version.d.ts +1 -1
  608. package/dist/version.js +1 -1
  609. package/package.json +66 -65
@@ -1,1733 +1,1733 @@
1
- # Licensing API
2
-
3
- Pro Feature
4
-
5
- All licensing endpoints require FluentCart Pro to be installed and activated.
6
-
7
- Manage software licenses including listing, activation, site management, product license settings, and the public license validation API for integrating with your software products.
8
-
9
- **Base URL:** `https://your-site.com/wp-json/fluent-cart/v2`
10
-
11
- ---
12
-
13
- ## Admin License Management
14
-
15
- Admin endpoints require an authenticated WordPress user with the appropriate FluentCart capability. Authorization is handled by the `LicensePolicy`.
16
-
17
- ---
18
-
19
- ### List Licenses
20
-
21
- GET `/fluent-cart/v2/licensing/licenses`
22
-
23
- Retrieve a paginated list of all licenses with optional filtering, sorting, and search.
24
-
25
- - **Permission:** `licenses/view`
26
- - **Policy:** `LicensePolicy`
27
-
28
- #### Parameters
29
-
30
- | Parameter | Type | Location | Required | Description |
31
- | --- | --- | --- | --- | --- |
32
- | `page` | integer | query | No | Page number for pagination |
33
- | `per_page` | integer | query | No | Number of records per page (default: 10, max: 200) |
34
- | `search` | string | query | No | Search term. Searches across license key, order ID, customer name, customer email, and activated site URLs. Also supports operator syntax (e.g., `license_key = abc123`) |
35
- | `sort_by` | string | query | No | Column to sort by (default: `id`). Must be a fillable column on the License model |
36
- | `sort_type` | string | query | No | Sort direction: `asc` or `desc` (default: `desc`) |
37
- | `active_view` | string | query | No | Tab filter. One of: `active`, `expired`, `disabled`, `inactive` |
38
- | `filter_type` | string | query | No | Filter mode: `simple` (default) or `advanced` |
39
- | `advanced_filters` | string (JSON) | query | No | JSON-encoded array of advanced filter groups (requires Pro). Supports filtering by product, customer, and license properties |
40
- | `with` | array/string | query | No | Eager-load relations. Supports relation names and `{relation}Count` for counts |
41
- | `select` | array/string | query | No | Comma-separated list of columns to select |
42
- | `scopes` | array | query | No | Model scopes to apply |
43
- | `include_ids` | array/string | query | No | Comma-separated IDs that must always be included in results |
44
- | `limit` | integer | query | No | Limit number of records (used with non-paginated queries) |
45
- | `offset` | integer | query | No | Offset for records |
46
- | `user_tz` | string | query | No | User timezone for date filtering (e.g., `America/New_York`) |
47
-
48
- #### Tab Filter Behavior
49
-
50
- | `active_view` Value | Behavior |
51
- | --- | --- |
52
- | `active` | Licenses with status `active` whose expiration date is in the future or is null (lifetime) |
53
- | `expired` | Licenses whose expiration date is in the past |
54
- | `disabled` | Licenses with status `disabled` |
55
- | `inactive` | Licenses with status `active` but no site activations |
56
-
57
- #### Advanced Filter Options
58
-
59
- When using `filter_type=advanced`, the following filter categories are available:
60
-
61
- | Category | Filter | Type | Description |
62
- | --- | --- | --- | --- |
63
- | Product | `product` | remote tree select | Filter by product variation |
64
- | Customer | `customer_first_name` | text (relation) | Filter by customer first name |
65
- | Customer | `customer_last_name` | text (relation) | Filter by customer last name |
66
- | License | `license_key` | text | Filter by license key |
67
- | License | `status` | selections (multiple) | Filter by license status: `active`, `disabled`, `expired` |
68
- | License | `activation_count` | numeric | Filter by number of activations |
69
- | License | `expiration_date` | dates | Filter by expiration date range |
70
-
71
- #### Response
72
-
73
- ```
74
- {
75
- "licenses": {
76
- "current_page": 1,
77
- "data": [
78
- {
79
- "id": 1,
80
- "status": "active",
81
- "limit": 5,
82
- "activation_count": 2,
83
- "license_key": "XXXX-XXXX-XXXX-XXXX",
84
- "product_id": 10,
85
- "variation_id": 15,
86
- "order_id": 42,
87
- "parent_id": null,
88
- "customer_id": 7,
89
- "expiration_date": "2026-01-15 00:00:00",
90
- "subscription_id": 3,
91
- "created_at": "2025-01-15 10:30:00",
92
- "updated_at": "2025-06-15 10:35:00"
93
- }
94
- ],
95
- "per_page": 10,
96
- "total": 50,
97
- "last_page": 5
98
- }
99
- }
100
- ```
101
-
102
- Status Override
103
-
104
- If a license has an `expiration_date` in the past, its `status` field is dynamically overridden to `expired` in the response, even if the stored status is `active`.
105
-
106
- #### Example
107
-
108
- ```
109
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/licensing/licenses?page=1&per_page=10&active_view=active" \
110
- -u "username:app_password"
111
- ```
112
-
113
- ---
114
-
115
- ### Get Customer Licenses (Admin)
116
-
117
- GET `/fluent-cart/v2/licensing/licenses/customer/{id}`
118
-
119
- Retrieve a paginated list of licenses belonging to a specific customer.
120
-
121
- - **Permission:** `licenses/view`
122
- - **Policy:** `LicensePolicy`
123
-
124
- #### Parameters
125
-
126
- | Parameter | Type | Location | Required | Description |
127
- | --- | --- | --- | --- | --- |
128
- | `id` | integer | path | Yes | The customer ID |
129
- | `page` | integer | query | No | Page number for pagination (default: 1) |
130
- | `per_page` | integer | query | No | Number of records per page (default: 10) |
131
-
132
- #### Response
133
-
134
- ```
135
- {
136
- "licenses": {
137
- "current_page": 1,
138
- "data": [
139
- {
140
- "id": 1,
141
- "status": "active",
142
- "limit": 5,
143
- "activation_count": 2,
144
- "license_key": "XXXX-XXXX-XXXX-XXXX",
145
- "product_id": 10,
146
- "variation_id": 15,
147
- "order_id": 42,
148
- "customer_id": 7,
149
- "expiration_date": "2026-01-15 00:00:00",
150
- "customer": { ... },
151
- "product_variant": { ... },
152
- "order": { ... },
153
- "product": { ... },
154
- "activations_count": 2
155
- }
156
- ],
157
- "per_page": 10,
158
- "total": 5,
159
- "last_page": 1
160
- }
161
- }
162
- ```
163
-
164
- #### Example
165
-
166
- ```
167
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/customer/7?per_page=10" \
168
- -u "username:app_password"
169
- ```
170
-
171
- ---
172
-
173
- ### Get License Details
174
-
175
- GET `/fluent-cart/v2/licensing/licenses/{id}`
176
-
177
- Retrieve the full details of a single license including the associated order, activations, product information, downloads, labels, and previous orders.
178
-
179
- - **Permission:** `licenses/view`
180
- - **Policy:** `LicensePolicy`
181
-
182
- #### Parameters
183
-
184
- | Parameter | Type | Location | Required | Description |
185
- | --- | --- | --- | --- | --- |
186
- | `id` | integer | path | Yes | The license ID |
187
-
188
- #### Response
189
-
190
- ```
191
- {
192
- "license": {
193
- "id": 1,
194
- "status": "active",
195
- "limit": 5,
196
- "activation_count": 2,
197
- "license_key": "XXXX-XXXX-XXXX-XXXX",
198
- "product_id": 10,
199
- "variation_id": 15,
200
- "order_id": 42,
201
- "customer_id": 7,
202
- "expiration_date": "2026-01-15 00:00:00",
203
- "subscription_id": 3,
204
- "config": {},
205
- "customer": { ... },
206
- "product_variant": { ... },
207
- "labels": [ ... ]
208
- },
209
- "downloads": [
210
- {
211
- "id": 1,
212
- "post_id": 10,
213
- "product_title": "My Plugin",
214
- "variation_titles": ["Pro License"],
215
- "download_url": "https://example.com/?fluent-cart=download&..."
216
- }
217
- ],
218
- "order": {
219
- "id": 42,
220
- "order_items": [ ... ],
221
- "billing_address": { ... },
222
- "shipping_address": { ... }
223
- },
224
- "activations": [
225
- {
226
- "id": 1,
227
- "license_id": 1,
228
- "site_id": 5,
229
- "status": "active",
230
- "is_local": 0,
231
- "activation_hash": "abc123def456...",
232
- "site": {
233
- "id": 5,
234
- "site_url": "example.com"
235
- }
236
- }
237
- ],
238
- "product": {
239
- "ID": 10,
240
- "post_title": "My Plugin",
241
- "variants": [ ... ]
242
- },
243
- "selected_labels": [1, 3],
244
- "orders": [
245
- {
246
- "id": 42,
247
- ...
248
- }
249
- ],
250
- "prev_orders": [ ... ],
251
- "subscription": null,
252
- "upgrade_path_base": "https://example.com/?fluent-cart=custom-payment"
253
- }
254
- ```
255
-
256
- #### Error Response (404)
257
-
258
- ```
259
- {
260
- "data": {
261
- "message": "License not found",
262
- "buttonText": "Back to License List",
263
- "route": "/licenses"
264
- },
265
- "code": "fluent_cart_entity_not_found"
266
- }
267
- ```
268
-
269
- #### Example
270
-
271
- ```
272
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1" \
273
- -u "username:app_password"
274
- ```
275
-
276
- ---
277
-
278
- ### Regenerate License Key
279
-
280
- POST `/fluent-cart/v2/licensing/licenses/{id}/regenerate-key`
281
-
282
- Generate a new random license key for an existing license. The old key is immediately invalidated.
283
-
284
- - **Permission:** `licenses/manage`
285
- - **Policy:** `LicensePolicy`
286
-
287
- #### Parameters
288
-
289
- | Parameter | Type | Location | Required | Description |
290
- | --- | --- | --- | --- | --- |
291
- | `id` | integer | path | Yes | The license ID |
292
-
293
- #### Response
294
-
295
- ```
296
- {
297
- "license": {
298
- "id": 1,
299
- "license_key": "NEW-XXXX-XXXX-XXXX",
300
- "status": "active",
301
- ...
302
- },
303
- "message": "License key regenerated successfully!"
304
- }
305
- ```
306
-
307
- #### Example
308
-
309
- ```
310
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/regenerate-key" \
311
- -u "username:app_password"
312
- ```
313
-
314
- ---
315
-
316
- ### Extend License Validity
317
-
318
- POST `/fluent-cart/v2/licensing/licenses/{id}/extend-validity`
319
-
320
- Change the expiration date of a license. Can extend, reduce, or set to lifetime. If the license status is not `active` or `inactive`, it will be automatically set to `active`.
321
-
322
- - **Permission:** `licenses/manage`
323
- - **Policy:** `LicensePolicy`
324
-
325
- #### Parameters
326
-
327
- | Parameter | Type | Location | Required | Description |
328
- | --- | --- | --- | --- | --- |
329
- | `id` | integer | path | Yes | The license ID |
330
- | `expiration_date` | string | body | Yes | New expiration date in `YYYY-MM-DD HH:MM:SS` format, or the string `lifetime` to remove expiration |
331
-
332
- #### Response
333
-
334
- ```
335
- {
336
- "license": {
337
- "id": 1,
338
- "expiration_date": "2027-01-15 00:00:00",
339
- "status": "active",
340
- ...
341
- },
342
- "message": "License validity extended!"
343
- }
344
- ```
345
-
346
- The response message varies based on the change:
347
-
348
- - `"License validity extended!"` -- when the new date is later than the current date
349
- - `"License validity reduced!"` -- when the new date is earlier than the current date
350
- - `"Marked license as lifetime!"` -- when set to `lifetime`
351
-
352
- #### Error Response (423)
353
-
354
- ```
355
- {
356
- "message": "Invalid expiration date!"
357
- }
358
- ```
359
-
360
- #### Example
361
-
362
- ```
363
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/extend-validity" \
364
- -u "username:app_password" \
365
- -H "Content-Type: application/json" \
366
- -d '{"expiration_date": "2027-06-15 00:00:00"}'
367
- ```
368
-
369
- Set to lifetime:
370
-
371
- ```
372
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/extend-validity" \
373
- -u "username:app_password" \
374
- -H "Content-Type: application/json" \
375
- -d '{"expiration_date": "lifetime"}'
376
- ```
377
-
378
- ---
379
-
380
- ### Update License Status
381
-
382
- POST `/fluent-cart/v2/licensing/licenses/{id}/update_status`
383
-
384
- Change the status of a license.
385
-
386
- - **Permission:** `licenses/manage`
387
- - **Policy:** `LicensePolicy`
388
-
389
- #### Parameters
390
-
391
- | Parameter | Type | Location | Required | Description |
392
- | --- | --- | --- | --- | --- |
393
- | `id` | integer | path | Yes | The license ID |
394
- | `status` | string | body | Yes | New status. One of: `active`, `disabled`, `expired` |
395
-
396
- #### Response
397
-
398
- ```
399
- {
400
- "license": {
401
- "id": 1,
402
- "status": "disabled",
403
- ...
404
- },
405
- "message": "License status has been updated successfully!"
406
- }
407
- ```
408
-
409
- #### Error Response (423)
410
-
411
- ```
412
- {
413
- "message": "Invalid status!"
414
- }
415
- ```
416
-
417
- #### Example
418
-
419
- ```
420
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/update_status" \
421
- -u "username:app_password" \
422
- -H "Content-Type: application/json" \
423
- -d '{"status": "disabled"}'
424
- ```
425
-
426
- ---
427
-
428
- ### Update License Activation Limit
429
-
430
- POST `/fluent-cart/v2/licensing/licenses/{id}/update_limit`
431
-
432
- Change the maximum number of site activations allowed for a license.
433
-
434
- - **Permission:** `licenses/manage`
435
- - **Policy:** `LicensePolicy`
436
-
437
- #### Parameters
438
-
439
- | Parameter | Type | Location | Required | Description |
440
- | --- | --- | --- | --- | --- |
441
- | `id` | integer | path | Yes | The license ID |
442
- | `limit` | integer/string | body | Yes | New activation limit. Use a positive integer for a specific limit, or `0` / `"unlimited"` for unlimited activations |
443
-
444
- #### Response
445
-
446
- ```
447
- {
448
- "license": {
449
- "id": 1,
450
- "limit": 10,
451
- ...
452
- },
453
- "message": "License limit has been updated successfully!"
454
- }
455
- ```
456
-
457
- #### Example
458
-
459
- ```
460
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/update_limit" \
461
- -u "username:app_password" \
462
- -H "Content-Type: application/json" \
463
- -d '{"limit": 10}'
464
- ```
465
-
466
- ---
467
-
468
- ### Deactivate Site (Admin)
469
-
470
- POST `/fluent-cart/v2/licensing/licenses/{id}/deactivate_site`
471
-
472
- Deactivate a specific site activation from a license using the activation ID.
473
-
474
- - **Permission:** `licenses/manage`
475
- - **Policy:** `LicensePolicy`
476
-
477
- #### Parameters
478
-
479
- | Parameter | Type | Location | Required | Description |
480
- | --- | --- | --- | --- | --- |
481
- | `id` | integer | path | Yes | The license ID (URL parameter, used for routing) |
482
- | `id` | string/integer | body | Yes | The license ID or key (used by the service internally) |
483
- | `activation_id` | string/integer | body | Yes | The activation record ID to deactivate |
484
-
485
- #### Response
486
-
487
- ```
488
- {
489
- "message": "Site has been deactivated successfully!"
490
- }
491
- ```
492
-
493
- #### Error Response
494
-
495
- ```
496
- {
497
- "message": "<error message from license manager>"
498
- }
499
- ```
500
-
501
- #### Example
502
-
503
- ```
504
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/deactivate_site" \
505
- -u "username:app_password" \
506
- -H "Content-Type: application/json" \
507
- -d '{"id": 1, "activation_id": 5}'
508
- ```
509
-
510
- ---
511
-
512
- ### Activate Site (Admin)
513
-
514
- POST `/fluent-cart/v2/licensing/licenses/{id}/activate_site`
515
-
516
- Manually activate a site URL on a license from the admin panel.
517
-
518
- - **Permission:** `licenses/manage`
519
- - **Policy:** `LicensePolicy`
520
-
521
- #### Parameters
522
-
523
- | Parameter | Type | Location | Required | Description |
524
- | --- | --- | --- | --- | --- |
525
- | `id` | integer | path | Yes | The license ID (URL parameter, used for routing) |
526
- | `id` | string/integer | body | Yes | The license ID or key (used by the service internally) |
527
- | `url` | string | body | Yes | The site URL to activate |
528
-
529
- #### Response
530
-
531
- ```
532
- {
533
- "message": "Site has been activated successfully!"
534
- }
535
- ```
536
-
537
- #### Error Response (423)
538
-
539
- ```
540
- {
541
- "message": "<error message from license manager>"
542
- }
543
- ```
544
-
545
- #### Example
546
-
547
- ```
548
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/activate_site" \
549
- -u "username:app_password" \
550
- -H "Content-Type: application/json" \
551
- -d '{"id": 1, "url": "https://my-client-site.com"}'
552
- ```
553
-
554
- ---
555
-
556
- ### Delete License
557
-
558
- DELETE `/fluent-cart/v2/licensing/licenses/{id}/delete`
559
-
560
- Permanently delete a license and all its associated data.
561
-
562
- - **Permission:** `licenses/delete`
563
- - **Policy:** `LicensePolicy`
564
-
565
- #### Parameters
566
-
567
- | Parameter | Type | Location | Required | Description |
568
- | --- | --- | --- | --- | --- |
569
- | `id` | integer | path | Yes | The license ID |
570
-
571
- #### Response
572
-
573
- ```
574
- {
575
- "message": "License deleted successfully!"
576
- }
577
- ```
578
-
579
- #### Example
580
-
581
- ```
582
- curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/delete" \
583
- -u "username:app_password"
584
- ```
585
-
586
- ---
587
-
588
- ## Product License Settings
589
-
590
- Endpoints for configuring license settings on a per-product basis. These control how licenses are generated when customers purchase the product.
591
-
592
- ---
593
-
594
- ### Get Product License Settings
595
-
596
- GET `/fluent-cart/v2/licensing/products/{id}/settings`
597
-
598
- Retrieve the license configuration for a specific product, including per-variation activation limits and validity periods.
599
-
600
- - **Permission:** `licenses/view`
601
- - **Policy:** `LicensePolicy`
602
-
603
- #### Parameters
604
-
605
- | Parameter | Type | Location | Required | Description |
606
- | --- | --- | --- | --- | --- |
607
- | `id` | integer | path | Yes | The product ID |
608
-
609
- #### Response
610
-
611
- ```
612
- {
613
- "settings": {
614
- "enabled": "yes",
615
- "version": "1.2.0",
616
- "global_update_file": {
617
- "id": "",
618
- "driver": "local",
619
- "path": "",
620
- "url": ""
621
- },
622
- "variations": [
623
- {
624
- "variation_id": 15,
625
- "title": "Single Site License",
626
- "activation_limit": 1,
627
- "validity": {
628
- "unit": "year",
629
- "value": 1
630
- },
631
- "media": [ ... ],
632
- "subscription_info": "Billed yearly at $49.00",
633
- "setup_fee_info": ""
634
- },
635
- {
636
- "variation_id": 16,
637
- "title": "Unlimited Sites License",
638
- "activation_limit": "",
639
- "validity": {
640
- "unit": "lifetime",
641
- "value": 1
642
- },
643
- "media": [ ... ],
644
- "subscription_info": "",
645
- "setup_fee_info": ""
646
- }
647
- ],
648
- "wp": {
649
- "is_wp": "yes",
650
- "readme_url": "https://example.com/changelog",
651
- "banner_url": "https://example.com/banner.png",
652
- "icon_url": "https://example.com/icon.png",
653
- "required_php": "7.4",
654
- "required_wp": "5.6"
655
- },
656
- "prefix": "",
657
- "changelog": "<h4>1.2.0</h4><ul><li>New feature added</li></ul>",
658
- "license_keys": ""
659
- },
660
- "is_bundle_product": false
661
- }
662
- ```
663
-
664
- #### Response Fields
665
-
666
- | Field | Type | Description |
667
- | --- | --- | --- |
668
- | `settings.enabled` | string | Whether licensing is enabled: `yes` or `no` |
669
- | `settings.version` | string | Current software version number |
670
- | `settings.global_update_file` | object | The downloadable file used for auto-updates |
671
- | `settings.variations` | array | Per-variation license configuration |
672
- | `settings.variations[].activation_limit` | integer/string | Max activations for this variation (empty = unlimited) |
673
- | `settings.variations[].validity.unit` | string | Validity unit: `day`, `week`, `month`, `year`, or `lifetime` |
674
- | `settings.variations[].validity.value` | integer | Number of validity units |
675
- | `settings.wp` | object | WordPress-specific settings for plugin/theme update API |
676
- | `settings.changelog` | string | HTML changelog content |
677
- | `settings.license_keys` | string | Pre-defined license keys (if applicable) |
678
- | `is_bundle_product` | boolean | Whether the product is a bundle (licensing is disabled for bundles) |
679
-
680
- Bundle Products
681
-
682
- Licensing is automatically disabled for bundle products. Bundle item licenses are generated based on each individual bundle item's license settings.
683
-
684
- #### Example
685
-
686
- ```
687
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/licensing/products/10/settings" \
688
- -u "username:app_password"
689
- ```
690
-
691
- ---
692
-
693
- ### Save Product License Settings
694
-
695
- POST `/fluent-cart/v2/licensing/products/{id}/settings`
696
-
697
- Update the license configuration for a specific product.
698
-
699
- - **Permission:** `licenses/manage`
700
- - **Policy:** `LicensePolicy`
701
-
702
- #### Parameters
703
-
704
- | Parameter | Type | Location | Required | Description |
705
- | --- | --- | --- | --- | --- |
706
- | `id` | integer | path | Yes | The product ID |
707
- | `settings` | object | body | Yes | The license settings object |
708
- | `settings.enabled` | string | body | Yes | Enable licensing: `yes` or `no` |
709
- | `settings.version` | string | body | Conditional | Software version (required when `enabled` is `yes`) |
710
- | `settings.global_update_file` | string | body | No | ID of the downloadable file to use for auto-updates |
711
- | `settings.prefix` | string | body | No | License key prefix |
712
- | `settings.variations` | array | body | Yes | Per-variation license configuration |
713
- | `settings.variations[].variation_id` | integer | body | Yes | The variation ID |
714
- | `settings.variations[].activation_limit` | integer/string | body | No | Max site activations (empty or 0 = unlimited, must be >= 0) |
715
- | `settings.variations[].validity` | object | body | Yes | Validity period configuration |
716
- | `settings.variations[].validity.unit` | string | body | Conditional | Validity unit: `day`, `week`, `month`, `year`, or `lifetime` (required when `enabled` is `yes`) |
717
- | `settings.variations[].validity.value` | integer | body | No | Number of validity units (default: 1) |
718
- | `settings.wp` | object | body | No | WordPress update API settings |
719
- | `settings.wp.is_wp` | string | body | No | Whether this is a WordPress plugin/theme: `yes` or `no` |
720
- | `settings.wp.readme_url` | string | body | No | URL to the changelog/readme page |
721
- | `settings.wp.banner_url` | string | body | No | URL to the plugin banner image |
722
- | `settings.wp.icon_url` | string | body | No | URL to the plugin icon |
723
- | `settings.wp.required_php` | string | body | No | Minimum required PHP version |
724
- | `settings.wp.required_wp` | string | body | No | Minimum required WordPress version |
725
- | `settings.changelog` | string | body | No | HTML changelog content |
726
- | `settings.license_keys` | string | body | No | Pre-defined license keys |
727
-
728
- #### Response
729
-
730
- ```
731
- {
732
- "message": "Settings has been updated successfully."
733
- }
734
- ```
735
-
736
- #### Error Response (422)
737
-
738
- For bundle products:
739
-
740
- ```
741
- {
742
- "message": "License settings cannot be saved for bundle products. Licenses are generated according to bundle items' license settings."
743
- }
744
- ```
745
-
746
- #### Validation Errors
747
-
748
- ```
749
- {
750
- "errors": {
751
- "version": ["The version field is required."]
752
- }
753
- }
754
- ```
755
-
756
- #### Example
757
-
758
- ```
759
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/products/10/settings" \
760
- -u "username:app_password" \
761
- -H "Content-Type: application/json" \
762
- -d '{
763
- "settings": {
764
- "enabled": "yes",
765
- "version": "1.3.0",
766
- "global_update_file": "file_abc123",
767
- "variations": [
768
- {
769
- "variation_id": 15,
770
- "activation_limit": 1,
771
- "validity": {
772
- "unit": "year",
773
- "value": 1
774
- }
775
- },
776
- {
777
- "variation_id": 16,
778
- "activation_limit": "",
779
- "validity": {
780
- "unit": "lifetime",
781
- "value": 1
782
- }
783
- }
784
- ],
785
- "wp": {
786
- "is_wp": "yes",
787
- "readme_url": "https://example.com/changelog",
788
- "banner_url": "https://example.com/banner.png",
789
- "icon_url": "https://example.com/icon.png",
790
- "required_php": "7.4",
791
- "required_wp": "5.6"
792
- },
793
- "changelog": "<h4>1.3.0</h4><ul><li>Performance improvements</li></ul>",
794
- "license_keys": ""
795
- }
796
- }'
797
- ```
798
-
799
- ---
800
-
801
- ## Customer Portal
802
-
803
- Customer portal endpoints are authenticated via the logged-in WordPress user. The system resolves the customer from the current user session. Authorization is handled by the `CustomerFrontendPolicy`.
804
-
805
- All customer portal license endpoints use the **license key** (not the numeric ID) for identification.
806
-
807
- ---
808
-
809
- ### List Customer Licenses
810
-
811
- GET `/fluent-cart/v2/customer-profile/licenses/`
812
-
813
- Retrieve a paginated list of licenses belonging to the currently logged-in customer.
814
-
815
- - **Policy:** `CustomerFrontendPolicy`
816
- - **Auth:** Logged-in WordPress user
817
-
818
- #### Parameters
819
-
820
- | Parameter | Type | Location | Required | Description |
821
- | --- | --- | --- | --- | --- |
822
- | `page` | integer | query | No | Page number for pagination (default: 1) |
823
- | `per_page` | integer | query | No | Number of records per page (default: 10) |
824
-
825
- #### Response
826
-
827
- If the user has no associated customer record, the endpoint returns an empty result set rather than an error:
828
-
829
- ```
830
- {
831
- "message": "Unable to find licenses",
832
- "licenses": {
833
- "data": [],
834
- "total": 0
835
- }
836
- }
837
- ```
838
-
839
- Successful response with data:
840
-
841
- ```
842
- {
843
- "licenses": {
844
- "data": [
845
- {
846
- "license_key": "XXXX-XXXX-XXXX-XXXX",
847
- "status": "active",
848
- "expiration_date": "2026-01-15 00:00:00",
849
- "variation_id": 15,
850
- "activation_count": 2,
851
- "limit": 5,
852
- "product_id": 10,
853
- "created_at": "2025-01-15 10:30:00",
854
- "title": "My Plugin",
855
- "subtitle": "Pro License",
856
- "renewal_url": "",
857
- "has_upgrades": true,
858
- "order": {
859
- "uuid": "order-uuid-here"
860
- }
861
- }
862
- ],
863
- "total": 5,
864
- "per_page": 10,
865
- "current_page": 1,
866
- "last_page": 1
867
- }
868
- }
869
- ```
870
-
871
- #### Response Fields
872
-
873
- | Field | Type | Description |
874
- | --- | --- | --- |
875
- | `license_key` | string | The license key |
876
- | `status` | string | Human-readable status: `active` or `expired` or `disabled` |
877
- | `expiration_date` | string/null | Expiration date in GMT, or `null` for lifetime licenses |
878
- | `activation_count` | integer | Current number of active site activations |
879
- | `limit` | integer | Maximum allowed activations (0 = unlimited) |
880
- | `title` | string | Product title |
881
- | `subtitle` | string | Product variation title |
882
- | `renewal_url` | string | URL to renew an expired subscription-based license (empty if not applicable) |
883
- | `has_upgrades` | boolean | Whether upgrade paths exist for this license's variation |
884
- | `order.uuid` | string | Parent order UUID |
885
-
886
- #### Example
887
-
888
- ```
889
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/licenses/?page=1&per_page=10" \
890
- -H "X-WP-Nonce: <nonce>"
891
- ```
892
-
893
- ---
894
-
895
- ### Get Customer License Details
896
-
897
- GET `/fluent-cart/v2/customer-profile/licenses/{license_key}`
898
-
899
- Retrieve full details of a specific license for the currently logged-in customer.
900
-
901
- - **Policy:** `CustomerFrontendPolicy`
902
- - **Auth:** Logged-in WordPress user
903
-
904
- #### Parameters
905
-
906
- | Parameter | Type | Location | Required | Description |
907
- | --- | --- | --- | --- | --- |
908
- | `license_key` | string | path | Yes | The license key (alphanumeric with dashes) |
909
-
910
- #### Response
911
-
912
- ```
913
- {
914
- "message": "Success",
915
- "license": {
916
- "license_key": "XXXX-XXXX-XXXX-XXXX",
917
- "status": "active",
918
- "expiration_date": "2026-01-15 00:00:00",
919
- "variation_id": 15,
920
- "activation_count": 2,
921
- "limit": 5,
922
- "product_id": 10,
923
- "created_at": "2025-01-15 10:30:00",
924
- "title": "My Plugin",
925
- "subtitle": "Pro License",
926
- "renewal_url": "",
927
- "has_upgrades": true,
928
- "order": {
929
- "uuid": "order-uuid-here"
930
- }
931
- },
932
- "section_parts": {
933
- "before_summary": "",
934
- "after_summary": "",
935
- "end_of_details": "",
936
- "additional_actions": ""
937
- }
938
- }
939
- ```
940
-
941
- #### Response Fields
942
-
943
- | Field | Type | Description |
944
- | --- | --- | --- |
945
- | `license` | object | The formatted license details (see fields in List Customer Licenses) |
946
- | `section_parts` | object | HTML content blocks injected via the `fluent_cart/customer/license_details_section_parts` filter. Used by extensions to add custom UI sections |
947
-
948
- #### Error Response (422)
949
-
950
- ```
951
- {
952
- "message": "License not found"
953
- }
954
- ```
955
-
956
- Customer not found:
957
-
958
- ```
959
- {
960
- "message": "Customer not found"
961
- }
962
- ```
963
-
964
- #### Example
965
-
966
- ```
967
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/licenses/XXXX-XXXX-XXXX-XXXX" \
968
- -H "X-WP-Nonce: <nonce>"
969
- ```
970
-
971
- ---
972
-
973
- ### Get License Activations
974
-
975
- GET `/fluent-cart/v2/customer-profile/licenses/{license_key}/activations`
976
-
977
- Retrieve all site activations for a specific license belonging to the currently logged-in customer.
978
-
979
- - **Policy:** `CustomerFrontendPolicy`
980
- - **Auth:** Logged-in WordPress user
981
-
982
- #### Parameters
983
-
984
- | Parameter | Type | Location | Required | Description |
985
- | --- | --- | --- | --- | --- |
986
- | `license_key` | string | path | Yes | The license key (alphanumeric with dashes) |
987
-
988
- #### Response
989
-
990
- ```
991
- {
992
- "activations": [
993
- {
994
- "site_url": "example.com",
995
- "is_local": 0,
996
- "status": "active",
997
- "created_at": "2025-03-10 14:22:00"
998
- },
999
- {
1000
- "site_url": "staging.example.com",
1001
- "is_local": 1,
1002
- "status": "active",
1003
- "created_at": "2025-03-12 09:15:00"
1004
- }
1005
- ]
1006
- }
1007
- ```
1008
-
1009
- #### Response Fields
1010
-
1011
- | Field | Type | Description |
1012
- | --- | --- | --- |
1013
- | `site_url` | string | The activated site URL (without protocol) |
1014
- | `is_local` | integer | Whether this is a local/staging site (1) or production site (0). Local sites do not count toward the activation limit |
1015
- | `status` | string | Activation status |
1016
- | `created_at` | string | When the activation was created |
1017
-
1018
- #### Error Responses
1019
-
1020
- License not found (422):
1021
-
1022
- ```
1023
- {
1024
- "message": "License not found"
1025
- }
1026
- ```
1027
-
1028
- #### Example
1029
-
1030
- ```
1031
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/licenses/XXXX-XXXX-XXXX-XXXX/activations" \
1032
- -H "X-WP-Nonce: <nonce>"
1033
- ```
1034
-
1035
- ---
1036
-
1037
- ### Deactivate Site (Customer)
1038
-
1039
- POST `/fluent-cart/v2/customer-profile/licenses/{license_key}/deactivate_site`
1040
-
1041
- Deactivate a specific site from a license. The customer can only deactivate sites from their own licenses.
1042
-
1043
- - **Policy:** `CustomerFrontendPolicy`
1044
- - **Auth:** Logged-in WordPress user
1045
-
1046
- #### Parameters
1047
-
1048
- | Parameter | Type | Location | Required | Description |
1049
- | --- | --- | --- | --- | --- |
1050
- | `license_key` | string | path | Yes | The license key (alphanumeric with dashes) |
1051
- | `site_url` | string | body | Yes | The site URL to deactivate |
1052
-
1053
- #### Response
1054
-
1055
- ```
1056
- {
1057
- "message": "Site deactivated successfully"
1058
- }
1059
- ```
1060
-
1061
- #### Error Responses
1062
-
1063
- License not found (422):
1064
-
1065
- ```
1066
- {
1067
- "message": "License not found"
1068
- }
1069
- ```
1070
-
1071
- Site not found or not activated (422):
1072
-
1073
- ```
1074
- {
1075
- "message": "Site not found or not activated for this license"
1076
- }
1077
- ```
1078
-
1079
- #### Example
1080
-
1081
- ```
1082
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/licenses/XXXX-XXXX-XXXX-XXXX/deactivate_site" \
1083
- -H "X-WP-Nonce: <nonce>" \
1084
- -H "Content-Type: application/json" \
1085
- -d '{"site_url": "example.com"}'
1086
- ```
1087
-
1088
- ---
1089
-
1090
- ## Plugin License Management
1091
-
1092
- These endpoints manage the FluentCart Pro plugin's own license activation on your WordPress site. They are used by the FluentCart Pro settings panel to activate, check, and deactivate the plugin license.
1093
-
1094
- Authorization is handled by the `AdminPolicy` (requires WordPress administrator).
1095
-
1096
- ---
1097
-
1098
- ### Get Plugin License Status
1099
-
1100
- GET `/fluent-cart/v2/settings/license/`
1101
-
1102
- Retrieve the current activation status of the FluentCart Pro plugin license on this site.
1103
-
1104
- - **Policy:** `AdminPolicy`
1105
-
1106
- #### Parameters
1107
-
1108
- None.
1109
-
1110
- #### Response
1111
-
1112
- ```
1113
- {
1114
- "status": "valid",
1115
- "license_key": "XXXX-XXXX-XXXX-XXXX",
1116
- "expires": "2026-01-15",
1117
- ...
1118
- }
1119
- ```
1120
-
1121
- The response structure depends on the FluentCart licensing server's response format.
1122
-
1123
- #### Example
1124
-
1125
- ```
1126
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/settings/license/" \
1127
- -u "username:app_password"
1128
- ```
1129
-
1130
- ---
1131
-
1132
- ### Activate Plugin License
1133
-
1134
- POST `/fluent-cart/v2/settings/license/`
1135
-
1136
- Activate a FluentCart Pro license key on this WordPress site.
1137
-
1138
- - **Policy:** `AdminPolicy`
1139
-
1140
- #### Parameters
1141
-
1142
- | Parameter | Type | Location | Required | Description |
1143
- | --- | --- | --- | --- | --- |
1144
- | `license_key` | string | body | Yes | The FluentCart Pro license key to activate |
1145
-
1146
- #### Response
1147
-
1148
- On success:
1149
-
1150
- ```
1151
- {
1152
- "status": "valid",
1153
- "license_key": "XXXX-XXXX-XXXX-XXXX",
1154
- "notice": {
1155
- "id": "fluent_cart_license_activated",
1156
- "html": "<div>Your FluentCart Pro license has been activated successfully.</div>",
1157
- "timeout": 5000
1158
- },
1159
- ...
1160
- }
1161
- ```
1162
-
1163
- #### Error Response
1164
-
1165
- Returns a `WP_Error` if the license key is invalid or activation fails.
1166
-
1167
- #### Example
1168
-
1169
- ```
1170
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/settings/license/" \
1171
- -u "username:app_password" \
1172
- -H "Content-Type: application/json" \
1173
- -d '{"license_key": "XXXX-XXXX-XXXX-XXXX"}'
1174
- ```
1175
-
1176
- ---
1177
-
1178
- ### Deactivate Plugin License
1179
-
1180
- DELETE `/fluent-cart/v2/settings/license/`
1181
-
1182
- Deactivate the FluentCart Pro license from this WordPress site.
1183
-
1184
- - **Policy:** `AdminPolicy`
1185
-
1186
- #### Parameters
1187
-
1188
- None.
1189
-
1190
- #### Response
1191
-
1192
- ```
1193
- {
1194
- "status": "deactivated",
1195
- "notice": {
1196
- "id": "activate_license",
1197
- "html": "<div>License deactivation message</div>"
1198
- },
1199
- ...
1200
- }
1201
- ```
1202
-
1203
- #### Example
1204
-
1205
- ```
1206
- curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/settings/license/" \
1207
- -u "username:app_password"
1208
- ```
1209
-
1210
- ---
1211
-
1212
- ## Public License API
1213
-
1214
- Not a REST API
1215
-
1216
- The public license API does **not** use the WordPress REST API (`wp-json`). Instead, it uses query parameter-based URLs on the site's front end. No authentication is required -- these endpoints are designed to be called by your software products (plugins, themes, apps) from customer sites.
1217
-
1218
- **Base URL:** `https://your-site.com/?fluent-cart={action}`
1219
-
1220
- All public license API endpoints accept parameters via query strings (GET) or POST body, and return JSON responses. These are the endpoints your distributed software should call for license validation, activation, deactivation, version checking, and downloading updates.
1221
-
1222
- ---
1223
-
1224
- ### Check License
1225
-
1226
- `GET/POST` `https://your-site.com/?fluent-cart=check_license`
1227
-
1228
- Verify the validity of a license key and check its activation status for a specific site.
1229
-
1230
- - **Auth:** None required
1231
-
1232
- #### Parameters
1233
-
1234
- | Parameter | Type | Required | Description |
1235
- | --- | --- | --- | --- |
1236
- | `license_key` | string | Conditional | The license key to check. Required if `activation_hash` is not provided |
1237
- | `activation_hash` | string | Conditional | The activation hash from a previous activation. Required if `license_key` is not provided |
1238
- | `item_id` | string | Yes | The product ID (must match the license's product) |
1239
- | `site_url` | string | Yes | The site URL making the request |
1240
-
1241
- #### Response (Valid License)
1242
-
1243
- ```
1244
- {
1245
- "success": true,
1246
- "status": "valid",
1247
- "activation_limit": 5,
1248
- "activation_hash": "abc123def456...",
1249
- "activations_count": 2,
1250
- "license_key": "XXXX-XXXX-XXXX-XXXX",
1251
- "expiration_date": "2026-01-15 00:00:00",
1252
- "product_id": 10,
1253
- "variation_id": 15,
1254
- "variation_title": "Pro License",
1255
- "product_title": "My Plugin",
1256
- "created_at": "2025-01-15 10:30:00",
1257
- "updated_at": "2025-06-15 10:35:00"
1258
- }
1259
- ```
1260
-
1261
- #### Response Fields
1262
-
1263
- | Field | Type | Description |
1264
- | --- | --- | --- |
1265
- | `status` | string | License status: `valid`, `expired`, or `invalid` |
1266
- | `activation_limit` | integer | Maximum allowed site activations (0 = unlimited) |
1267
- | `activation_hash` | string | Unique hash for this site's activation (empty if not activated) |
1268
- | `activations_count` | integer | Current number of active site activations |
1269
- | `license_key` | string | The license key |
1270
- | `expiration_date` | string | Expiration date in GMT, or `lifetime` for non-expiring licenses |
1271
- | `product_id` | string | The product ID |
1272
- | `variation_id` | integer | The product variation ID |
1273
- | `variation_title` | string | The product variation title |
1274
- | `product_title` | string | The product title |
1275
-
1276
- #### Error Response (Validation)
1277
-
1278
- ```
1279
- {
1280
- "success": true,
1281
- "status": "invalid",
1282
- "error_type": "validation_error",
1283
- "message": "license_key, site_url and item_id is required"
1284
- }
1285
- ```
1286
-
1287
- #### Error Types
1288
-
1289
- | `error_type` | Description |
1290
- | --- | --- |
1291
- | `validation_error` | Missing required parameters |
1292
- | `invalid_license` | License key not found |
1293
- | `invalid_activation` | No activation found for this site |
1294
- | `key_mismatch` | License key does not match the provided `item_id` |
1295
-
1296
- #### Example
1297
-
1298
- ```
1299
- curl -X GET "https://example.com/?fluent-cart=check_license&license_key=XXXX-XXXX-XXXX-XXXX&item_id=10&site_url=https://customer-site.com"
1300
- ```
1301
-
1302
- ---
1303
-
1304
- ### Activate License
1305
-
1306
- `POST` `https://your-site.com/?fluent-cart=activate_license`
1307
-
1308
- Activate a license key on a specific site URL. If the site is already activated for this license, the existing activation details are returned. Local/staging sites are detected automatically and do not count toward the activation limit.
1309
-
1310
- - **Auth:** None required
1311
-
1312
- #### Parameters
1313
-
1314
- | Parameter | Type | Required | Description |
1315
- | --- | --- | --- | --- |
1316
- | `license_key` | string | Yes | The license key to activate |
1317
- | `item_id` | string | Yes | The product ID (must match the license's product) |
1318
- | `site_url` | string | Yes | The site URL to activate |
1319
- | `server_version` | string | No | The server software version (e.g., PHP version) |
1320
- | `platform_version` | string | No | The platform version (e.g., WordPress version) |
1321
-
1322
- #### Response (Success)
1323
-
1324
- ```
1325
- {
1326
- "success": true,
1327
- "status": "valid",
1328
- "activation_limit": 5,
1329
- "activation_hash": "abc123def456...",
1330
- "activations_count": 3,
1331
- "license_key": "XXXX-XXXX-XXXX-XXXX",
1332
- "expiration_date": "2026-01-15 00:00:00",
1333
- "product_id": 10,
1334
- "variation_id": 15,
1335
- "variation_title": "Pro License",
1336
- "product_title": "My Plugin",
1337
- "created_at": "2025-01-15 10:30:00",
1338
- "updated_at": "2025-06-15 10:35:00"
1339
- }
1340
- ```
1341
-
1342
- Local/Staging Detection
1343
-
1344
- Sites matching common local/staging patterns are automatically detected and marked with `is_local = 1`. These activations do not count toward the activation limit. Detected patterns include:
1345
-
1346
- - **Subdomains:** `staging.`, `dev.`, `test.`, `qa.`, `sandbox.`, `beta.`, `preview.`, `uat.`, `development.`
1347
- - **Subfolders:** `/staging/`, `/dev/`, `/test/`, etc.
1348
- - **Domains:** `localhost`, `.wpengine.com`, `.kinsta.cloud`, `.cloudwaysapps.com`, `.pantheonsite.io`, and other popular hosting staging domains
1349
-
1350
- #### Error Responses (422)
1351
-
1352
- Missing required fields:
1353
-
1354
- ```
1355
- {
1356
- "success": false,
1357
- "message": "license_key, site_url and item_id is required",
1358
- "error_type": "validation_error"
1359
- }
1360
- ```
1361
-
1362
- License not found:
1363
-
1364
- ```
1365
- {
1366
- "success": false,
1367
- "message": "License not found",
1368
- "error_type": "license_not_found"
1369
- }
1370
- ```
1371
-
1372
- Product mismatch:
1373
-
1374
- ```
1375
- {
1376
- "success": false,
1377
- "message": "This license key is not valid for this product. Did you provide the valid license key?",
1378
- "error_type": "key_mismatch"
1379
- }
1380
- ```
1381
-
1382
- License expired:
1383
-
1384
- ```
1385
- {
1386
- "success": false,
1387
- "message": "The license key is expired. Please renew or purchase a new license",
1388
- "error_type": "license_expired"
1389
- }
1390
- ```
1391
-
1392
- License not active:
1393
-
1394
- ```
1395
- {
1396
- "success": false,
1397
- "message": "The license is not Active. Please contact the support.",
1398
- "error_type": "license_not_active"
1399
- }
1400
- ```
1401
-
1402
- Activation limit reached:
1403
-
1404
- ```
1405
- {
1406
- "success": false,
1407
- "message": "This license key has no activation limit. Please upgrade or purchase a new license.",
1408
- "error_type": "activation_limit_exceeded"
1409
- }
1410
- ```
1411
-
1412
- #### Error Types
1413
-
1414
- | `error_type` | Description |
1415
- | --- | --- |
1416
- | `validation_error` | Missing required parameters |
1417
- | `license_not_found` | License key does not exist |
1418
- | `key_mismatch` | License key does not match the provided `item_id` |
1419
- | `license_expired` | License has expired |
1420
- | `license_not_active` | License status is not active (e.g., disabled) |
1421
- | `activation_limit_exceeded` | No remaining activations available |
1422
- | `activation_error` | General activation error (from filter) |
1423
-
1424
- #### Example
1425
-
1426
- ```
1427
- curl -X POST "https://example.com/?fluent-cart=activate_license" \
1428
- -H "Content-Type: application/x-www-form-urlencoded" \
1429
- -d "license_key=XXXX-XXXX-XXXX-XXXX&item_id=10&site_url=https://customer-site.com&server_version=8.1&platform_version=6.4"
1430
- ```
1431
-
1432
- ---
1433
-
1434
- ### Deactivate License
1435
-
1436
- `POST` `https://your-site.com/?fluent-cart=deactivate_license`
1437
-
1438
- Deactivate a license from a specific site URL. Removes the site activation and decrements the activation count.
1439
-
1440
- - **Auth:** None required
1441
-
1442
- #### Parameters
1443
-
1444
- | Parameter | Type | Required | Description |
1445
- | --- | --- | --- | --- |
1446
- | `license_key` | string | Yes | The license key to deactivate |
1447
- | `item_id` | string | Yes | The product ID (must match the license's product) |
1448
- | `site_url` | string | Yes | The site URL to deactivate |
1449
-
1450
- #### Response (Success)
1451
-
1452
- ```
1453
- {
1454
- "success": true,
1455
- "status": "deactivated",
1456
- "activation_limit": 5,
1457
- "activations_count": 2,
1458
- "expiration_date": "2026-01-15 00:00:00",
1459
- "product_id": 10,
1460
- "variation_id": 15,
1461
- "product_title": "My Plugin",
1462
- "variation_title": "Pro License",
1463
- "created_at": "2025-01-15 10:30:00",
1464
- "updated_at": "2025-06-15 10:35:00"
1465
- }
1466
- ```
1467
-
1468
- #### Error Responses (422)
1469
-
1470
- Missing required fields:
1471
-
1472
- ```
1473
- {
1474
- "success": false,
1475
- "message": "license_key, site_url and item_id is required",
1476
- "error_type": "validation_error"
1477
- }
1478
- ```
1479
-
1480
- License not found or product mismatch:
1481
-
1482
- ```
1483
- {
1484
- "success": false,
1485
- "message": "License not found or does not match with the item_id",
1486
- "error_type": "license_not_found"
1487
- }
1488
- ```
1489
-
1490
- Site not found:
1491
-
1492
- ```
1493
- {
1494
- "success": false,
1495
- "message": "Site not found",
1496
- "error_type": "site_not_found"
1497
- }
1498
- ```
1499
-
1500
- #### Example
1501
-
1502
- ```
1503
- curl -X POST "https://example.com/?fluent-cart=deactivate_license" \
1504
- -H "Content-Type: application/x-www-form-urlencoded" \
1505
- -d "license_key=XXXX-XXXX-XXXX-XXXX&item_id=10&site_url=https://customer-site.com"
1506
- ```
1507
-
1508
- ---
1509
-
1510
- ### Get License Version
1511
-
1512
- `GET/POST` `https://your-site.com/?fluent-cart=get_license_version`
1513
-
1514
- Retrieve the latest version information for a licensed product. This endpoint is designed to integrate with WordPress plugin/theme update mechanisms. It returns version data, changelog, download links, and banner/icon URLs.
1515
-
1516
- - **Auth:** None required
1517
-
1518
- #### Parameters
1519
-
1520
- | Parameter | Type | Required | Description |
1521
- | --- | --- | --- | --- |
1522
- | `item_id` | string | Yes | The product ID |
1523
- | `license_key` | string | Conditional | License key for authenticated download links. Required if `activation_hash` is not provided |
1524
- | `activation_hash` | string | Conditional | Activation hash for authenticated download links. Required if `license_key` is not provided |
1525
- | `site_url` | string | No | The site URL making the request |
1526
-
1527
- #### Response (Valid License)
1528
-
1529
- ```
1530
- {
1531
- "success": true,
1532
- "new_version": "1.3.0",
1533
- "stable_version": "1.3.0",
1534
- "name": "My Plugin",
1535
- "slug": "my-plugin",
1536
- "url": "https://example.com/my-plugin",
1537
- "last_updated": "2025-06-15 10:30:00",
1538
- "homepage": "https://example.com/my-plugin",
1539
- "package": "https://example.com/?fluent-cart=download_license_package&fct_package=...",
1540
- "download_link": "https://example.com/?fluent-cart=download_license_package&fct_package=...",
1541
- "trunk": "https://example.com/?fluent-cart=download_license_package&fct_package=...",
1542
- "license_status": "valid",
1543
- "sections": {
1544
- "description": "Product description here",
1545
- "changelog": "<h4>1.3.0</h4><ul><li>New feature</li></ul>"
1546
- },
1547
- "banners": {
1548
- "low": "https://example.com/banner.png",
1549
- "high": "https://example.com/banner.png"
1550
- },
1551
- "icons": {
1552
- "2x": "https://example.com/icon.png",
1553
- "1x": "https://example.com/icon.png"
1554
- }
1555
- }
1556
- ```
1557
-
1558
- #### Response (Invalid License)
1559
-
1560
- When the license is invalid or expired, version information is still returned but without download links:
1561
-
1562
- ```
1563
- {
1564
- "success": true,
1565
- "new_version": "1.3.0",
1566
- "stable_version": "1.3.0",
1567
- "name": "My Plugin",
1568
- "slug": "my-plugin",
1569
- "package": "",
1570
- "download_link": "",
1571
- "license_message": "Invalid License Key",
1572
- "license_status": "invalid",
1573
- "sections": { ... },
1574
- "banners": { ... },
1575
- "icons": { ... }
1576
- }
1577
- ```
1578
-
1579
- Download Link Expiry
1580
-
1581
- The `package` / `download_link` URL contains a time-limited token that expires after 48 hours. WordPress will use this URL to download the update package.
1582
-
1583
- #### Error Response (422)
1584
-
1585
- Product not found:
1586
-
1587
- ```
1588
- {
1589
- "success": false,
1590
- "message": "Product not found",
1591
- "error_type": "product_not_found"
1592
- }
1593
- ```
1594
-
1595
- Licensing not enabled:
1596
-
1597
- ```
1598
- {
1599
- "success": false,
1600
- "message": "License is not enabled for this product",
1601
- "error_type": "license_not_enabled"
1602
- }
1603
- ```
1604
-
1605
- License settings not found:
1606
-
1607
- ```
1608
- {
1609
- "success": false,
1610
- "message": "License settings not found for this product",
1611
- "error_type": "license_settings_not_found"
1612
- }
1613
- ```
1614
-
1615
- #### Example
1616
-
1617
- ```
1618
- curl -X GET "https://example.com/?fluent-cart=get_license_version&item_id=10&license_key=XXXX-XXXX-XXXX-XXXX&site_url=https://customer-site.com"
1619
- ```
1620
-
1621
- ---
1622
-
1623
- ### Download License Package
1624
-
1625
- `GET` `https://your-site.com/?fluent-cart=download_license_package`
1626
-
1627
- Download the product's update package file. This endpoint is not called directly -- it is used via the signed URLs generated by the [Get License Version](#get-license-version) endpoint. The URL contains an encoded token (`fct_package`) that includes the license key, activation hash, site URL, product ID, and expiration timestamp.
1628
-
1629
- - **Auth:** None required (authentication is embedded in the signed URL)
1630
-
1631
- #### Parameters
1632
-
1633
- | Parameter | Type | Required | Description |
1634
- | --- | --- | --- | --- |
1635
- | `fct_package` | string | Yes | Base64-encoded package data containing license credentials and expiration. This is automatically generated by the version check endpoint |
1636
-
1637
- #### Response
1638
-
1639
- On success, the endpoint responds with an HTTP 302 redirect to the signed download URL for the file. The browser or update mechanism follows the redirect to download the file.
1640
-
1641
- #### Error Responses (422)
1642
-
1643
- Invalid package data:
1644
-
1645
- ```
1646
- {
1647
- "success": false,
1648
- "message": "Invalid package data",
1649
- "error_type": "invalid_package_data"
1650
- }
1651
- ```
1652
-
1653
- Invalid license:
1654
-
1655
- ```
1656
- {
1657
- "success": false,
1658
- "message": "This license key is not valid",
1659
- "error_type": "expired_license"
1660
- }
1661
- ```
1662
-
1663
- No downloadable file:
1664
-
1665
- ```
1666
- {
1667
- "success": false,
1668
- "message": "No downloadable file found for this product",
1669
- "error_type": "downloadable_file_not_found"
1670
- }
1671
- ```
1672
-
1673
- #### Example
1674
-
1675
- This endpoint is typically not called directly. It is accessed via the `package` URL returned by the version check endpoint:
1676
-
1677
- ```
1678
- https://example.com/?fluent-cart=download_license_package&fct_package=WFhYWC1YWFhYLVhYWFgtWFhYWDo6Y3VzdG9tZXItc2l0ZS5jb206MTA6MTczNzAwMDAwMA==
1679
- ```
1680
-
1681
- ---
1682
-
1683
- ## License Statuses
1684
-
1685
- | Status | Description |
1686
- | --- | --- |
1687
- | `active` | License is valid and in use |
1688
- | `inactive` | License is valid but has no site activations |
1689
- | `expired` | License expiration date has passed (includes a configurable grace period, default 15 days) |
1690
- | `disabled` | License has been manually disabled by an admin |
1691
-
1692
- ### Public Status Mapping
1693
-
1694
- The public license API returns simplified statuses:
1695
-
1696
- | Internal Status | Public Status |
1697
- | --- | --- |
1698
- | `active` (not expired) | `valid` |
1699
- | `inactive` (not expired) | `valid` |
1700
- | `expired` | `expired` |
1701
- | `disabled` | `invalid` |
1702
-
1703
- ---
1704
-
1705
- ## Hooks and Filters
1706
-
1707
- | Hook | Type | Description |
1708
- | --- | --- | --- |
1709
- | `fluent_cart/license/check_license_response` | filter | Modify the check license response before returning |
1710
- | `fluent_cart/license/activate_license_response` | filter | Modify the activate license response before returning |
1711
- | `fluent_cart/license/deactivate_license_response` | filter | Modify the deactivate license response before returning |
1712
- | `fluent_cart/license/get_version_response` | filter | Modify the version check response before returning |
1713
- | `fluent_cart/license/checking_error` | filter | Modify error responses during license checking |
1714
- | `fluent_cart/license/check_item_id` | filter | Control whether `item_id` validation is enforced |
1715
- | `fluent_cart/license/site_activated` | action | Fired after a site is successfully activated |
1716
- | `fluent_cart/license/site_deactivated` | action | Fired after a site is successfully deactivated |
1717
- | `fluent_cart/license/sanitized_url` | filter | Modify the sanitized site URL |
1718
- | `fluent_cart/license/staging_subdomain_patterns` | filter | Customize subdomain patterns for local site detection |
1719
- | `fluent_cart/license/staging_subfolder_patterns` | filter | Customize subfolder patterns for local site detection |
1720
- | `fluent_cart/license/staging_domains` | filter | Customize domain patterns for local site detection |
1721
- | `fluent_cart/license/is_staging_site_result` | filter | Override the final local site detection result |
1722
- | `fluent_cart/license/grace_period_in_days` | filter | Change the license expiration grace period (default: 15 days) |
1723
- | `fluent_cart/license/validity_by_variation` | filter | Modify validity settings for a variation during save |
1724
- | `fluent_cart/license/default_validity_by_variation` | filter | Modify the default validity for a new variation |
1725
- | `fluent_cart/license/expiration_date_by_variation` | filter | Modify the calculated expiration timestamp |
1726
- | `fluent_cart/customer/license_details_section_parts` | filter | Add custom HTML sections to the customer portal license detail view |
1727
- | `fluent_cart/licenses_list_filter_query` | filter | Modify the license list query before execution |
1728
- | `fluent_cart_sl/license_deleted` | action | Fired after a license is deleted |
1729
- | `fluent_cart_sl/license_status_updated` | action | Fired after a license status changes |
1730
- | `fluent_cart_sl/license_key_regenerated` | action | Fired after a license key is regenerated |
1731
- | `fluent_cart_sl/license_validity_extended` | action | Fired after a license expiration date is changed |
1732
- | `fluent_cart_sl/license_limit_increased` | action | Fired after a license activation limit is changed |
1733
- | `fluent_cart_sl/site_license_deactivated` | action | Fired after a customer deactivates a site from the portal |
1
+ # Licensing API
2
+
3
+ Pro Feature
4
+
5
+ All licensing endpoints require FluentCart Pro to be installed and activated.
6
+
7
+ Manage software licenses including listing, activation, site management, product license settings, and the public license validation API for integrating with your software products.
8
+
9
+ **Base URL:** `https://your-site.com/wp-json/fluent-cart/v2`
10
+
11
+ ---
12
+
13
+ ## Admin License Management
14
+
15
+ Admin endpoints require an authenticated WordPress user with the appropriate FluentCart capability. Authorization is handled by the `LicensePolicy`.
16
+
17
+ ---
18
+
19
+ ### List Licenses
20
+
21
+ GET `/fluent-cart/v2/licensing/licenses`
22
+
23
+ Retrieve a paginated list of all licenses with optional filtering, sorting, and search.
24
+
25
+ - **Permission:** `licenses/view`
26
+ - **Policy:** `LicensePolicy`
27
+
28
+ #### Parameters
29
+
30
+ | Parameter | Type | Location | Required | Description |
31
+ | --- | --- | --- | --- | --- |
32
+ | `page` | integer | query | No | Page number for pagination |
33
+ | `per_page` | integer | query | No | Number of records per page (default: 10, max: 200) |
34
+ | `search` | string | query | No | Search term. Searches across license key, order ID, customer name, customer email, and activated site URLs. Also supports operator syntax (e.g., `license_key = abc123`) |
35
+ | `sort_by` | string | query | No | Column to sort by (default: `id`). Must be a fillable column on the License model |
36
+ | `sort_type` | string | query | No | Sort direction: `asc` or `desc` (default: `desc`) |
37
+ | `active_view` | string | query | No | Tab filter. One of: `active`, `expired`, `disabled`, `inactive` |
38
+ | `filter_type` | string | query | No | Filter mode: `simple` (default) or `advanced` |
39
+ | `advanced_filters` | string (JSON) | query | No | JSON-encoded array of advanced filter groups (requires Pro). Supports filtering by product, customer, and license properties |
40
+ | `with` | array/string | query | No | Eager-load relations. Supports relation names and `{relation}Count` for counts |
41
+ | `select` | array/string | query | No | Comma-separated list of columns to select |
42
+ | `scopes` | array | query | No | Model scopes to apply |
43
+ | `include_ids` | array/string | query | No | Comma-separated IDs that must always be included in results |
44
+ | `limit` | integer | query | No | Limit number of records (used with non-paginated queries) |
45
+ | `offset` | integer | query | No | Offset for records |
46
+ | `user_tz` | string | query | No | User timezone for date filtering (e.g., `America/New_York`) |
47
+
48
+ #### Tab Filter Behavior
49
+
50
+ | `active_view` Value | Behavior |
51
+ | --- | --- |
52
+ | `active` | Licenses with status `active` whose expiration date is in the future or is null (lifetime) |
53
+ | `expired` | Licenses whose expiration date is in the past |
54
+ | `disabled` | Licenses with status `disabled` |
55
+ | `inactive` | Licenses with status `active` but no site activations |
56
+
57
+ #### Advanced Filter Options
58
+
59
+ When using `filter_type=advanced`, the following filter categories are available:
60
+
61
+ | Category | Filter | Type | Description |
62
+ | --- | --- | --- | --- |
63
+ | Product | `product` | remote tree select | Filter by product variation |
64
+ | Customer | `customer_first_name` | text (relation) | Filter by customer first name |
65
+ | Customer | `customer_last_name` | text (relation) | Filter by customer last name |
66
+ | License | `license_key` | text | Filter by license key |
67
+ | License | `status` | selections (multiple) | Filter by license status: `active`, `disabled`, `expired` |
68
+ | License | `activation_count` | numeric | Filter by number of activations |
69
+ | License | `expiration_date` | dates | Filter by expiration date range |
70
+
71
+ #### Response
72
+
73
+ ```
74
+ {
75
+ "licenses": {
76
+ "current_page": 1,
77
+ "data": [
78
+ {
79
+ "id": 1,
80
+ "status": "active",
81
+ "limit": 5,
82
+ "activation_count": 2,
83
+ "license_key": "XXXX-XXXX-XXXX-XXXX",
84
+ "product_id": 10,
85
+ "variation_id": 15,
86
+ "order_id": 42,
87
+ "parent_id": null,
88
+ "customer_id": 7,
89
+ "expiration_date": "2026-01-15 00:00:00",
90
+ "subscription_id": 3,
91
+ "created_at": "2025-01-15 10:30:00",
92
+ "updated_at": "2025-06-15 10:35:00"
93
+ }
94
+ ],
95
+ "per_page": 10,
96
+ "total": 50,
97
+ "last_page": 5
98
+ }
99
+ }
100
+ ```
101
+
102
+ Status Override
103
+
104
+ If a license has an `expiration_date` in the past, its `status` field is dynamically overridden to `expired` in the response, even if the stored status is `active`.
105
+
106
+ #### Example
107
+
108
+ ```
109
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/licensing/licenses?page=1&per_page=10&active_view=active" \
110
+ -u "username:app_password"
111
+ ```
112
+
113
+ ---
114
+
115
+ ### Get Customer Licenses (Admin)
116
+
117
+ GET `/fluent-cart/v2/licensing/licenses/customer/{id}`
118
+
119
+ Retrieve a paginated list of licenses belonging to a specific customer.
120
+
121
+ - **Permission:** `licenses/view`
122
+ - **Policy:** `LicensePolicy`
123
+
124
+ #### Parameters
125
+
126
+ | Parameter | Type | Location | Required | Description |
127
+ | --- | --- | --- | --- | --- |
128
+ | `id` | integer | path | Yes | The customer ID |
129
+ | `page` | integer | query | No | Page number for pagination (default: 1) |
130
+ | `per_page` | integer | query | No | Number of records per page (default: 10) |
131
+
132
+ #### Response
133
+
134
+ ```
135
+ {
136
+ "licenses": {
137
+ "current_page": 1,
138
+ "data": [
139
+ {
140
+ "id": 1,
141
+ "status": "active",
142
+ "limit": 5,
143
+ "activation_count": 2,
144
+ "license_key": "XXXX-XXXX-XXXX-XXXX",
145
+ "product_id": 10,
146
+ "variation_id": 15,
147
+ "order_id": 42,
148
+ "customer_id": 7,
149
+ "expiration_date": "2026-01-15 00:00:00",
150
+ "customer": { ... },
151
+ "product_variant": { ... },
152
+ "order": { ... },
153
+ "product": { ... },
154
+ "activations_count": 2
155
+ }
156
+ ],
157
+ "per_page": 10,
158
+ "total": 5,
159
+ "last_page": 1
160
+ }
161
+ }
162
+ ```
163
+
164
+ #### Example
165
+
166
+ ```
167
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/customer/7?per_page=10" \
168
+ -u "username:app_password"
169
+ ```
170
+
171
+ ---
172
+
173
+ ### Get License Details
174
+
175
+ GET `/fluent-cart/v2/licensing/licenses/{id}`
176
+
177
+ Retrieve the full details of a single license including the associated order, activations, product information, downloads, labels, and previous orders.
178
+
179
+ - **Permission:** `licenses/view`
180
+ - **Policy:** `LicensePolicy`
181
+
182
+ #### Parameters
183
+
184
+ | Parameter | Type | Location | Required | Description |
185
+ | --- | --- | --- | --- | --- |
186
+ | `id` | integer | path | Yes | The license ID |
187
+
188
+ #### Response
189
+
190
+ ```
191
+ {
192
+ "license": {
193
+ "id": 1,
194
+ "status": "active",
195
+ "limit": 5,
196
+ "activation_count": 2,
197
+ "license_key": "XXXX-XXXX-XXXX-XXXX",
198
+ "product_id": 10,
199
+ "variation_id": 15,
200
+ "order_id": 42,
201
+ "customer_id": 7,
202
+ "expiration_date": "2026-01-15 00:00:00",
203
+ "subscription_id": 3,
204
+ "config": {},
205
+ "customer": { ... },
206
+ "product_variant": { ... },
207
+ "labels": [ ... ]
208
+ },
209
+ "downloads": [
210
+ {
211
+ "id": 1,
212
+ "post_id": 10,
213
+ "product_title": "My Plugin",
214
+ "variation_titles": ["Pro License"],
215
+ "download_url": "https://example.com/?fluent-cart=download&..."
216
+ }
217
+ ],
218
+ "order": {
219
+ "id": 42,
220
+ "order_items": [ ... ],
221
+ "billing_address": { ... },
222
+ "shipping_address": { ... }
223
+ },
224
+ "activations": [
225
+ {
226
+ "id": 1,
227
+ "license_id": 1,
228
+ "site_id": 5,
229
+ "status": "active",
230
+ "is_local": 0,
231
+ "activation_hash": "abc123def456...",
232
+ "site": {
233
+ "id": 5,
234
+ "site_url": "example.com"
235
+ }
236
+ }
237
+ ],
238
+ "product": {
239
+ "ID": 10,
240
+ "post_title": "My Plugin",
241
+ "variants": [ ... ]
242
+ },
243
+ "selected_labels": [1, 3],
244
+ "orders": [
245
+ {
246
+ "id": 42,
247
+ ...
248
+ }
249
+ ],
250
+ "prev_orders": [ ... ],
251
+ "subscription": null,
252
+ "upgrade_path_base": "https://example.com/?fluent-cart=custom-payment"
253
+ }
254
+ ```
255
+
256
+ #### Error Response (404)
257
+
258
+ ```
259
+ {
260
+ "data": {
261
+ "message": "License not found",
262
+ "buttonText": "Back to License List",
263
+ "route": "/licenses"
264
+ },
265
+ "code": "fluent_cart_entity_not_found"
266
+ }
267
+ ```
268
+
269
+ #### Example
270
+
271
+ ```
272
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1" \
273
+ -u "username:app_password"
274
+ ```
275
+
276
+ ---
277
+
278
+ ### Regenerate License Key
279
+
280
+ POST `/fluent-cart/v2/licensing/licenses/{id}/regenerate-key`
281
+
282
+ Generate a new random license key for an existing license. The old key is immediately invalidated.
283
+
284
+ - **Permission:** `licenses/manage`
285
+ - **Policy:** `LicensePolicy`
286
+
287
+ #### Parameters
288
+
289
+ | Parameter | Type | Location | Required | Description |
290
+ | --- | --- | --- | --- | --- |
291
+ | `id` | integer | path | Yes | The license ID |
292
+
293
+ #### Response
294
+
295
+ ```
296
+ {
297
+ "license": {
298
+ "id": 1,
299
+ "license_key": "NEW-XXXX-XXXX-XXXX",
300
+ "status": "active",
301
+ ...
302
+ },
303
+ "message": "License key regenerated successfully!"
304
+ }
305
+ ```
306
+
307
+ #### Example
308
+
309
+ ```
310
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/regenerate-key" \
311
+ -u "username:app_password"
312
+ ```
313
+
314
+ ---
315
+
316
+ ### Extend License Validity
317
+
318
+ POST `/fluent-cart/v2/licensing/licenses/{id}/extend-validity`
319
+
320
+ Change the expiration date of a license. Can extend, reduce, or set to lifetime. If the license status is not `active` or `inactive`, it will be automatically set to `active`.
321
+
322
+ - **Permission:** `licenses/manage`
323
+ - **Policy:** `LicensePolicy`
324
+
325
+ #### Parameters
326
+
327
+ | Parameter | Type | Location | Required | Description |
328
+ | --- | --- | --- | --- | --- |
329
+ | `id` | integer | path | Yes | The license ID |
330
+ | `expiration_date` | string | body | Yes | New expiration date in `YYYY-MM-DD HH:MM:SS` format, or the string `lifetime` to remove expiration |
331
+
332
+ #### Response
333
+
334
+ ```
335
+ {
336
+ "license": {
337
+ "id": 1,
338
+ "expiration_date": "2027-01-15 00:00:00",
339
+ "status": "active",
340
+ ...
341
+ },
342
+ "message": "License validity extended!"
343
+ }
344
+ ```
345
+
346
+ The response message varies based on the change:
347
+
348
+ - `"License validity extended!"` -- when the new date is later than the current date
349
+ - `"License validity reduced!"` -- when the new date is earlier than the current date
350
+ - `"Marked license as lifetime!"` -- when set to `lifetime`
351
+
352
+ #### Error Response (423)
353
+
354
+ ```
355
+ {
356
+ "message": "Invalid expiration date!"
357
+ }
358
+ ```
359
+
360
+ #### Example
361
+
362
+ ```
363
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/extend-validity" \
364
+ -u "username:app_password" \
365
+ -H "Content-Type: application/json" \
366
+ -d '{"expiration_date": "2027-06-15 00:00:00"}'
367
+ ```
368
+
369
+ Set to lifetime:
370
+
371
+ ```
372
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/extend-validity" \
373
+ -u "username:app_password" \
374
+ -H "Content-Type: application/json" \
375
+ -d '{"expiration_date": "lifetime"}'
376
+ ```
377
+
378
+ ---
379
+
380
+ ### Update License Status
381
+
382
+ POST `/fluent-cart/v2/licensing/licenses/{id}/update_status`
383
+
384
+ Change the status of a license.
385
+
386
+ - **Permission:** `licenses/manage`
387
+ - **Policy:** `LicensePolicy`
388
+
389
+ #### Parameters
390
+
391
+ | Parameter | Type | Location | Required | Description |
392
+ | --- | --- | --- | --- | --- |
393
+ | `id` | integer | path | Yes | The license ID |
394
+ | `status` | string | body | Yes | New status. One of: `active`, `disabled`, `expired` |
395
+
396
+ #### Response
397
+
398
+ ```
399
+ {
400
+ "license": {
401
+ "id": 1,
402
+ "status": "disabled",
403
+ ...
404
+ },
405
+ "message": "License status has been updated successfully!"
406
+ }
407
+ ```
408
+
409
+ #### Error Response (423)
410
+
411
+ ```
412
+ {
413
+ "message": "Invalid status!"
414
+ }
415
+ ```
416
+
417
+ #### Example
418
+
419
+ ```
420
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/update_status" \
421
+ -u "username:app_password" \
422
+ -H "Content-Type: application/json" \
423
+ -d '{"status": "disabled"}'
424
+ ```
425
+
426
+ ---
427
+
428
+ ### Update License Activation Limit
429
+
430
+ POST `/fluent-cart/v2/licensing/licenses/{id}/update_limit`
431
+
432
+ Change the maximum number of site activations allowed for a license.
433
+
434
+ - **Permission:** `licenses/manage`
435
+ - **Policy:** `LicensePolicy`
436
+
437
+ #### Parameters
438
+
439
+ | Parameter | Type | Location | Required | Description |
440
+ | --- | --- | --- | --- | --- |
441
+ | `id` | integer | path | Yes | The license ID |
442
+ | `limit` | integer/string | body | Yes | New activation limit. Use a positive integer for a specific limit, or `0` / `"unlimited"` for unlimited activations |
443
+
444
+ #### Response
445
+
446
+ ```
447
+ {
448
+ "license": {
449
+ "id": 1,
450
+ "limit": 10,
451
+ ...
452
+ },
453
+ "message": "License limit has been updated successfully!"
454
+ }
455
+ ```
456
+
457
+ #### Example
458
+
459
+ ```
460
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/update_limit" \
461
+ -u "username:app_password" \
462
+ -H "Content-Type: application/json" \
463
+ -d '{"limit": 10}'
464
+ ```
465
+
466
+ ---
467
+
468
+ ### Deactivate Site (Admin)
469
+
470
+ POST `/fluent-cart/v2/licensing/licenses/{id}/deactivate_site`
471
+
472
+ Deactivate a specific site activation from a license using the activation ID.
473
+
474
+ - **Permission:** `licenses/manage`
475
+ - **Policy:** `LicensePolicy`
476
+
477
+ #### Parameters
478
+
479
+ | Parameter | Type | Location | Required | Description |
480
+ | --- | --- | --- | --- | --- |
481
+ | `id` | integer | path | Yes | The license ID (URL parameter, used for routing) |
482
+ | `id` | string/integer | body | Yes | The license ID or key (used by the service internally) |
483
+ | `activation_id` | string/integer | body | Yes | The activation record ID to deactivate |
484
+
485
+ #### Response
486
+
487
+ ```
488
+ {
489
+ "message": "Site has been deactivated successfully!"
490
+ }
491
+ ```
492
+
493
+ #### Error Response
494
+
495
+ ```
496
+ {
497
+ "message": "<error message from license manager>"
498
+ }
499
+ ```
500
+
501
+ #### Example
502
+
503
+ ```
504
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/deactivate_site" \
505
+ -u "username:app_password" \
506
+ -H "Content-Type: application/json" \
507
+ -d '{"id": 1, "activation_id": 5}'
508
+ ```
509
+
510
+ ---
511
+
512
+ ### Activate Site (Admin)
513
+
514
+ POST `/fluent-cart/v2/licensing/licenses/{id}/activate_site`
515
+
516
+ Manually activate a site URL on a license from the admin panel.
517
+
518
+ - **Permission:** `licenses/manage`
519
+ - **Policy:** `LicensePolicy`
520
+
521
+ #### Parameters
522
+
523
+ | Parameter | Type | Location | Required | Description |
524
+ | --- | --- | --- | --- | --- |
525
+ | `id` | integer | path | Yes | The license ID (URL parameter, used for routing) |
526
+ | `id` | string/integer | body | Yes | The license ID or key (used by the service internally) |
527
+ | `url` | string | body | Yes | The site URL to activate |
528
+
529
+ #### Response
530
+
531
+ ```
532
+ {
533
+ "message": "Site has been activated successfully!"
534
+ }
535
+ ```
536
+
537
+ #### Error Response (423)
538
+
539
+ ```
540
+ {
541
+ "message": "<error message from license manager>"
542
+ }
543
+ ```
544
+
545
+ #### Example
546
+
547
+ ```
548
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/activate_site" \
549
+ -u "username:app_password" \
550
+ -H "Content-Type: application/json" \
551
+ -d '{"id": 1, "url": "https://my-client-site.com"}'
552
+ ```
553
+
554
+ ---
555
+
556
+ ### Delete License
557
+
558
+ DELETE `/fluent-cart/v2/licensing/licenses/{id}/delete`
559
+
560
+ Permanently delete a license and all its associated data.
561
+
562
+ - **Permission:** `licenses/delete`
563
+ - **Policy:** `LicensePolicy`
564
+
565
+ #### Parameters
566
+
567
+ | Parameter | Type | Location | Required | Description |
568
+ | --- | --- | --- | --- | --- |
569
+ | `id` | integer | path | Yes | The license ID |
570
+
571
+ #### Response
572
+
573
+ ```
574
+ {
575
+ "message": "License deleted successfully!"
576
+ }
577
+ ```
578
+
579
+ #### Example
580
+
581
+ ```
582
+ curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/licensing/licenses/1/delete" \
583
+ -u "username:app_password"
584
+ ```
585
+
586
+ ---
587
+
588
+ ## Product License Settings
589
+
590
+ Endpoints for configuring license settings on a per-product basis. These control how licenses are generated when customers purchase the product.
591
+
592
+ ---
593
+
594
+ ### Get Product License Settings
595
+
596
+ GET `/fluent-cart/v2/licensing/products/{id}/settings`
597
+
598
+ Retrieve the license configuration for a specific product, including per-variation activation limits and validity periods.
599
+
600
+ - **Permission:** `licenses/view`
601
+ - **Policy:** `LicensePolicy`
602
+
603
+ #### Parameters
604
+
605
+ | Parameter | Type | Location | Required | Description |
606
+ | --- | --- | --- | --- | --- |
607
+ | `id` | integer | path | Yes | The product ID |
608
+
609
+ #### Response
610
+
611
+ ```
612
+ {
613
+ "settings": {
614
+ "enabled": "yes",
615
+ "version": "1.2.0",
616
+ "global_update_file": {
617
+ "id": "",
618
+ "driver": "local",
619
+ "path": "",
620
+ "url": ""
621
+ },
622
+ "variations": [
623
+ {
624
+ "variation_id": 15,
625
+ "title": "Single Site License",
626
+ "activation_limit": 1,
627
+ "validity": {
628
+ "unit": "year",
629
+ "value": 1
630
+ },
631
+ "media": [ ... ],
632
+ "subscription_info": "Billed yearly at $49.00",
633
+ "setup_fee_info": ""
634
+ },
635
+ {
636
+ "variation_id": 16,
637
+ "title": "Unlimited Sites License",
638
+ "activation_limit": "",
639
+ "validity": {
640
+ "unit": "lifetime",
641
+ "value": 1
642
+ },
643
+ "media": [ ... ],
644
+ "subscription_info": "",
645
+ "setup_fee_info": ""
646
+ }
647
+ ],
648
+ "wp": {
649
+ "is_wp": "yes",
650
+ "readme_url": "https://example.com/changelog",
651
+ "banner_url": "https://example.com/banner.png",
652
+ "icon_url": "https://example.com/icon.png",
653
+ "required_php": "7.4",
654
+ "required_wp": "5.6"
655
+ },
656
+ "prefix": "",
657
+ "changelog": "<h4>1.2.0</h4><ul><li>New feature added</li></ul>",
658
+ "license_keys": ""
659
+ },
660
+ "is_bundle_product": false
661
+ }
662
+ ```
663
+
664
+ #### Response Fields
665
+
666
+ | Field | Type | Description |
667
+ | --- | --- | --- |
668
+ | `settings.enabled` | string | Whether licensing is enabled: `yes` or `no` |
669
+ | `settings.version` | string | Current software version number |
670
+ | `settings.global_update_file` | object | The downloadable file used for auto-updates |
671
+ | `settings.variations` | array | Per-variation license configuration |
672
+ | `settings.variations[].activation_limit` | integer/string | Max activations for this variation (empty = unlimited) |
673
+ | `settings.variations[].validity.unit` | string | Validity unit: `day`, `week`, `month`, `year`, or `lifetime` |
674
+ | `settings.variations[].validity.value` | integer | Number of validity units |
675
+ | `settings.wp` | object | WordPress-specific settings for plugin/theme update API |
676
+ | `settings.changelog` | string | HTML changelog content |
677
+ | `settings.license_keys` | string | Pre-defined license keys (if applicable) |
678
+ | `is_bundle_product` | boolean | Whether the product is a bundle (licensing is disabled for bundles) |
679
+
680
+ Bundle Products
681
+
682
+ Licensing is automatically disabled for bundle products. Bundle item licenses are generated based on each individual bundle item's license settings.
683
+
684
+ #### Example
685
+
686
+ ```
687
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/licensing/products/10/settings" \
688
+ -u "username:app_password"
689
+ ```
690
+
691
+ ---
692
+
693
+ ### Save Product License Settings
694
+
695
+ POST `/fluent-cart/v2/licensing/products/{id}/settings`
696
+
697
+ Update the license configuration for a specific product.
698
+
699
+ - **Permission:** `licenses/manage`
700
+ - **Policy:** `LicensePolicy`
701
+
702
+ #### Parameters
703
+
704
+ | Parameter | Type | Location | Required | Description |
705
+ | --- | --- | --- | --- | --- |
706
+ | `id` | integer | path | Yes | The product ID |
707
+ | `settings` | object | body | Yes | The license settings object |
708
+ | `settings.enabled` | string | body | Yes | Enable licensing: `yes` or `no` |
709
+ | `settings.version` | string | body | Conditional | Software version (required when `enabled` is `yes`) |
710
+ | `settings.global_update_file` | string | body | No | ID of the downloadable file to use for auto-updates |
711
+ | `settings.prefix` | string | body | No | License key prefix |
712
+ | `settings.variations` | array | body | Yes | Per-variation license configuration |
713
+ | `settings.variations[].variation_id` | integer | body | Yes | The variation ID |
714
+ | `settings.variations[].activation_limit` | integer/string | body | No | Max site activations (empty or 0 = unlimited, must be >= 0) |
715
+ | `settings.variations[].validity` | object | body | Yes | Validity period configuration |
716
+ | `settings.variations[].validity.unit` | string | body | Conditional | Validity unit: `day`, `week`, `month`, `year`, or `lifetime` (required when `enabled` is `yes`) |
717
+ | `settings.variations[].validity.value` | integer | body | No | Number of validity units (default: 1) |
718
+ | `settings.wp` | object | body | No | WordPress update API settings |
719
+ | `settings.wp.is_wp` | string | body | No | Whether this is a WordPress plugin/theme: `yes` or `no` |
720
+ | `settings.wp.readme_url` | string | body | No | URL to the changelog/readme page |
721
+ | `settings.wp.banner_url` | string | body | No | URL to the plugin banner image |
722
+ | `settings.wp.icon_url` | string | body | No | URL to the plugin icon |
723
+ | `settings.wp.required_php` | string | body | No | Minimum required PHP version |
724
+ | `settings.wp.required_wp` | string | body | No | Minimum required WordPress version |
725
+ | `settings.changelog` | string | body | No | HTML changelog content |
726
+ | `settings.license_keys` | string | body | No | Pre-defined license keys |
727
+
728
+ #### Response
729
+
730
+ ```
731
+ {
732
+ "message": "Settings has been updated successfully."
733
+ }
734
+ ```
735
+
736
+ #### Error Response (422)
737
+
738
+ For bundle products:
739
+
740
+ ```
741
+ {
742
+ "message": "License settings cannot be saved for bundle products. Licenses are generated according to bundle items' license settings."
743
+ }
744
+ ```
745
+
746
+ #### Validation Errors
747
+
748
+ ```
749
+ {
750
+ "errors": {
751
+ "version": ["The version field is required."]
752
+ }
753
+ }
754
+ ```
755
+
756
+ #### Example
757
+
758
+ ```
759
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/licensing/products/10/settings" \
760
+ -u "username:app_password" \
761
+ -H "Content-Type: application/json" \
762
+ -d '{
763
+ "settings": {
764
+ "enabled": "yes",
765
+ "version": "1.3.0",
766
+ "global_update_file": "file_abc123",
767
+ "variations": [
768
+ {
769
+ "variation_id": 15,
770
+ "activation_limit": 1,
771
+ "validity": {
772
+ "unit": "year",
773
+ "value": 1
774
+ }
775
+ },
776
+ {
777
+ "variation_id": 16,
778
+ "activation_limit": "",
779
+ "validity": {
780
+ "unit": "lifetime",
781
+ "value": 1
782
+ }
783
+ }
784
+ ],
785
+ "wp": {
786
+ "is_wp": "yes",
787
+ "readme_url": "https://example.com/changelog",
788
+ "banner_url": "https://example.com/banner.png",
789
+ "icon_url": "https://example.com/icon.png",
790
+ "required_php": "7.4",
791
+ "required_wp": "5.6"
792
+ },
793
+ "changelog": "<h4>1.3.0</h4><ul><li>Performance improvements</li></ul>",
794
+ "license_keys": ""
795
+ }
796
+ }'
797
+ ```
798
+
799
+ ---
800
+
801
+ ## Customer Portal
802
+
803
+ Customer portal endpoints are authenticated via the logged-in WordPress user. The system resolves the customer from the current user session. Authorization is handled by the `CustomerFrontendPolicy`.
804
+
805
+ All customer portal license endpoints use the **license key** (not the numeric ID) for identification.
806
+
807
+ ---
808
+
809
+ ### List Customer Licenses
810
+
811
+ GET `/fluent-cart/v2/customer-profile/licenses/`
812
+
813
+ Retrieve a paginated list of licenses belonging to the currently logged-in customer.
814
+
815
+ - **Policy:** `CustomerFrontendPolicy`
816
+ - **Auth:** Logged-in WordPress user
817
+
818
+ #### Parameters
819
+
820
+ | Parameter | Type | Location | Required | Description |
821
+ | --- | --- | --- | --- | --- |
822
+ | `page` | integer | query | No | Page number for pagination (default: 1) |
823
+ | `per_page` | integer | query | No | Number of records per page (default: 10) |
824
+
825
+ #### Response
826
+
827
+ If the user has no associated customer record, the endpoint returns an empty result set rather than an error:
828
+
829
+ ```
830
+ {
831
+ "message": "Unable to find licenses",
832
+ "licenses": {
833
+ "data": [],
834
+ "total": 0
835
+ }
836
+ }
837
+ ```
838
+
839
+ Successful response with data:
840
+
841
+ ```
842
+ {
843
+ "licenses": {
844
+ "data": [
845
+ {
846
+ "license_key": "XXXX-XXXX-XXXX-XXXX",
847
+ "status": "active",
848
+ "expiration_date": "2026-01-15 00:00:00",
849
+ "variation_id": 15,
850
+ "activation_count": 2,
851
+ "limit": 5,
852
+ "product_id": 10,
853
+ "created_at": "2025-01-15 10:30:00",
854
+ "title": "My Plugin",
855
+ "subtitle": "Pro License",
856
+ "renewal_url": "",
857
+ "has_upgrades": true,
858
+ "order": {
859
+ "uuid": "order-uuid-here"
860
+ }
861
+ }
862
+ ],
863
+ "total": 5,
864
+ "per_page": 10,
865
+ "current_page": 1,
866
+ "last_page": 1
867
+ }
868
+ }
869
+ ```
870
+
871
+ #### Response Fields
872
+
873
+ | Field | Type | Description |
874
+ | --- | --- | --- |
875
+ | `license_key` | string | The license key |
876
+ | `status` | string | Human-readable status: `active` or `expired` or `disabled` |
877
+ | `expiration_date` | string/null | Expiration date in GMT, or `null` for lifetime licenses |
878
+ | `activation_count` | integer | Current number of active site activations |
879
+ | `limit` | integer | Maximum allowed activations (0 = unlimited) |
880
+ | `title` | string | Product title |
881
+ | `subtitle` | string | Product variation title |
882
+ | `renewal_url` | string | URL to renew an expired subscription-based license (empty if not applicable) |
883
+ | `has_upgrades` | boolean | Whether upgrade paths exist for this license's variation |
884
+ | `order.uuid` | string | Parent order UUID |
885
+
886
+ #### Example
887
+
888
+ ```
889
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/licenses/?page=1&per_page=10" \
890
+ -H "X-WP-Nonce: <nonce>"
891
+ ```
892
+
893
+ ---
894
+
895
+ ### Get Customer License Details
896
+
897
+ GET `/fluent-cart/v2/customer-profile/licenses/{license_key}`
898
+
899
+ Retrieve full details of a specific license for the currently logged-in customer.
900
+
901
+ - **Policy:** `CustomerFrontendPolicy`
902
+ - **Auth:** Logged-in WordPress user
903
+
904
+ #### Parameters
905
+
906
+ | Parameter | Type | Location | Required | Description |
907
+ | --- | --- | --- | --- | --- |
908
+ | `license_key` | string | path | Yes | The license key (alphanumeric with dashes) |
909
+
910
+ #### Response
911
+
912
+ ```
913
+ {
914
+ "message": "Success",
915
+ "license": {
916
+ "license_key": "XXXX-XXXX-XXXX-XXXX",
917
+ "status": "active",
918
+ "expiration_date": "2026-01-15 00:00:00",
919
+ "variation_id": 15,
920
+ "activation_count": 2,
921
+ "limit": 5,
922
+ "product_id": 10,
923
+ "created_at": "2025-01-15 10:30:00",
924
+ "title": "My Plugin",
925
+ "subtitle": "Pro License",
926
+ "renewal_url": "",
927
+ "has_upgrades": true,
928
+ "order": {
929
+ "uuid": "order-uuid-here"
930
+ }
931
+ },
932
+ "section_parts": {
933
+ "before_summary": "",
934
+ "after_summary": "",
935
+ "end_of_details": "",
936
+ "additional_actions": ""
937
+ }
938
+ }
939
+ ```
940
+
941
+ #### Response Fields
942
+
943
+ | Field | Type | Description |
944
+ | --- | --- | --- |
945
+ | `license` | object | The formatted license details (see fields in List Customer Licenses) |
946
+ | `section_parts` | object | HTML content blocks injected via the `fluent_cart/customer/license_details_section_parts` filter. Used by extensions to add custom UI sections |
947
+
948
+ #### Error Response (422)
949
+
950
+ ```
951
+ {
952
+ "message": "License not found"
953
+ }
954
+ ```
955
+
956
+ Customer not found:
957
+
958
+ ```
959
+ {
960
+ "message": "Customer not found"
961
+ }
962
+ ```
963
+
964
+ #### Example
965
+
966
+ ```
967
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/licenses/XXXX-XXXX-XXXX-XXXX" \
968
+ -H "X-WP-Nonce: <nonce>"
969
+ ```
970
+
971
+ ---
972
+
973
+ ### Get License Activations
974
+
975
+ GET `/fluent-cart/v2/customer-profile/licenses/{license_key}/activations`
976
+
977
+ Retrieve all site activations for a specific license belonging to the currently logged-in customer.
978
+
979
+ - **Policy:** `CustomerFrontendPolicy`
980
+ - **Auth:** Logged-in WordPress user
981
+
982
+ #### Parameters
983
+
984
+ | Parameter | Type | Location | Required | Description |
985
+ | --- | --- | --- | --- | --- |
986
+ | `license_key` | string | path | Yes | The license key (alphanumeric with dashes) |
987
+
988
+ #### Response
989
+
990
+ ```
991
+ {
992
+ "activations": [
993
+ {
994
+ "site_url": "example.com",
995
+ "is_local": 0,
996
+ "status": "active",
997
+ "created_at": "2025-03-10 14:22:00"
998
+ },
999
+ {
1000
+ "site_url": "staging.example.com",
1001
+ "is_local": 1,
1002
+ "status": "active",
1003
+ "created_at": "2025-03-12 09:15:00"
1004
+ }
1005
+ ]
1006
+ }
1007
+ ```
1008
+
1009
+ #### Response Fields
1010
+
1011
+ | Field | Type | Description |
1012
+ | --- | --- | --- |
1013
+ | `site_url` | string | The activated site URL (without protocol) |
1014
+ | `is_local` | integer | Whether this is a local/staging site (1) or production site (0). Local sites do not count toward the activation limit |
1015
+ | `status` | string | Activation status |
1016
+ | `created_at` | string | When the activation was created |
1017
+
1018
+ #### Error Responses
1019
+
1020
+ License not found (422):
1021
+
1022
+ ```
1023
+ {
1024
+ "message": "License not found"
1025
+ }
1026
+ ```
1027
+
1028
+ #### Example
1029
+
1030
+ ```
1031
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/customer-profile/licenses/XXXX-XXXX-XXXX-XXXX/activations" \
1032
+ -H "X-WP-Nonce: <nonce>"
1033
+ ```
1034
+
1035
+ ---
1036
+
1037
+ ### Deactivate Site (Customer)
1038
+
1039
+ POST `/fluent-cart/v2/customer-profile/licenses/{license_key}/deactivate_site`
1040
+
1041
+ Deactivate a specific site from a license. The customer can only deactivate sites from their own licenses.
1042
+
1043
+ - **Policy:** `CustomerFrontendPolicy`
1044
+ - **Auth:** Logged-in WordPress user
1045
+
1046
+ #### Parameters
1047
+
1048
+ | Parameter | Type | Location | Required | Description |
1049
+ | --- | --- | --- | --- | --- |
1050
+ | `license_key` | string | path | Yes | The license key (alphanumeric with dashes) |
1051
+ | `site_url` | string | body | Yes | The site URL to deactivate |
1052
+
1053
+ #### Response
1054
+
1055
+ ```
1056
+ {
1057
+ "message": "Site deactivated successfully"
1058
+ }
1059
+ ```
1060
+
1061
+ #### Error Responses
1062
+
1063
+ License not found (422):
1064
+
1065
+ ```
1066
+ {
1067
+ "message": "License not found"
1068
+ }
1069
+ ```
1070
+
1071
+ Site not found or not activated (422):
1072
+
1073
+ ```
1074
+ {
1075
+ "message": "Site not found or not activated for this license"
1076
+ }
1077
+ ```
1078
+
1079
+ #### Example
1080
+
1081
+ ```
1082
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/customer-profile/licenses/XXXX-XXXX-XXXX-XXXX/deactivate_site" \
1083
+ -H "X-WP-Nonce: <nonce>" \
1084
+ -H "Content-Type: application/json" \
1085
+ -d '{"site_url": "example.com"}'
1086
+ ```
1087
+
1088
+ ---
1089
+
1090
+ ## Plugin License Management
1091
+
1092
+ These endpoints manage the FluentCart Pro plugin's own license activation on your WordPress site. They are used by the FluentCart Pro settings panel to activate, check, and deactivate the plugin license.
1093
+
1094
+ Authorization is handled by the `AdminPolicy` (requires WordPress administrator).
1095
+
1096
+ ---
1097
+
1098
+ ### Get Plugin License Status
1099
+
1100
+ GET `/fluent-cart/v2/settings/license/`
1101
+
1102
+ Retrieve the current activation status of the FluentCart Pro plugin license on this site.
1103
+
1104
+ - **Policy:** `AdminPolicy`
1105
+
1106
+ #### Parameters
1107
+
1108
+ None.
1109
+
1110
+ #### Response
1111
+
1112
+ ```
1113
+ {
1114
+ "status": "valid",
1115
+ "license_key": "XXXX-XXXX-XXXX-XXXX",
1116
+ "expires": "2026-01-15",
1117
+ ...
1118
+ }
1119
+ ```
1120
+
1121
+ The response structure depends on the FluentCart licensing server's response format.
1122
+
1123
+ #### Example
1124
+
1125
+ ```
1126
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/settings/license/" \
1127
+ -u "username:app_password"
1128
+ ```
1129
+
1130
+ ---
1131
+
1132
+ ### Activate Plugin License
1133
+
1134
+ POST `/fluent-cart/v2/settings/license/`
1135
+
1136
+ Activate a FluentCart Pro license key on this WordPress site.
1137
+
1138
+ - **Policy:** `AdminPolicy`
1139
+
1140
+ #### Parameters
1141
+
1142
+ | Parameter | Type | Location | Required | Description |
1143
+ | --- | --- | --- | --- | --- |
1144
+ | `license_key` | string | body | Yes | The FluentCart Pro license key to activate |
1145
+
1146
+ #### Response
1147
+
1148
+ On success:
1149
+
1150
+ ```
1151
+ {
1152
+ "status": "valid",
1153
+ "license_key": "XXXX-XXXX-XXXX-XXXX",
1154
+ "notice": {
1155
+ "id": "fluent_cart_license_activated",
1156
+ "html": "<div>Your FluentCart Pro license has been activated successfully.</div>",
1157
+ "timeout": 5000
1158
+ },
1159
+ ...
1160
+ }
1161
+ ```
1162
+
1163
+ #### Error Response
1164
+
1165
+ Returns a `WP_Error` if the license key is invalid or activation fails.
1166
+
1167
+ #### Example
1168
+
1169
+ ```
1170
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/settings/license/" \
1171
+ -u "username:app_password" \
1172
+ -H "Content-Type: application/json" \
1173
+ -d '{"license_key": "XXXX-XXXX-XXXX-XXXX"}'
1174
+ ```
1175
+
1176
+ ---
1177
+
1178
+ ### Deactivate Plugin License
1179
+
1180
+ DELETE `/fluent-cart/v2/settings/license/`
1181
+
1182
+ Deactivate the FluentCart Pro license from this WordPress site.
1183
+
1184
+ - **Policy:** `AdminPolicy`
1185
+
1186
+ #### Parameters
1187
+
1188
+ None.
1189
+
1190
+ #### Response
1191
+
1192
+ ```
1193
+ {
1194
+ "status": "deactivated",
1195
+ "notice": {
1196
+ "id": "activate_license",
1197
+ "html": "<div>License deactivation message</div>"
1198
+ },
1199
+ ...
1200
+ }
1201
+ ```
1202
+
1203
+ #### Example
1204
+
1205
+ ```
1206
+ curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/settings/license/" \
1207
+ -u "username:app_password"
1208
+ ```
1209
+
1210
+ ---
1211
+
1212
+ ## Public License API
1213
+
1214
+ Not a REST API
1215
+
1216
+ The public license API does **not** use the WordPress REST API (`wp-json`). Instead, it uses query parameter-based URLs on the site's front end. No authentication is required -- these endpoints are designed to be called by your software products (plugins, themes, apps) from customer sites.
1217
+
1218
+ **Base URL:** `https://your-site.com/?fluent-cart={action}`
1219
+
1220
+ All public license API endpoints accept parameters via query strings (GET) or POST body, and return JSON responses. These are the endpoints your distributed software should call for license validation, activation, deactivation, version checking, and downloading updates.
1221
+
1222
+ ---
1223
+
1224
+ ### Check License
1225
+
1226
+ `GET/POST` `https://your-site.com/?fluent-cart=check_license`
1227
+
1228
+ Verify the validity of a license key and check its activation status for a specific site.
1229
+
1230
+ - **Auth:** None required
1231
+
1232
+ #### Parameters
1233
+
1234
+ | Parameter | Type | Required | Description |
1235
+ | --- | --- | --- | --- |
1236
+ | `license_key` | string | Conditional | The license key to check. Required if `activation_hash` is not provided |
1237
+ | `activation_hash` | string | Conditional | The activation hash from a previous activation. Required if `license_key` is not provided |
1238
+ | `item_id` | string | Yes | The product ID (must match the license's product) |
1239
+ | `site_url` | string | Yes | The site URL making the request |
1240
+
1241
+ #### Response (Valid License)
1242
+
1243
+ ```
1244
+ {
1245
+ "success": true,
1246
+ "status": "valid",
1247
+ "activation_limit": 5,
1248
+ "activation_hash": "abc123def456...",
1249
+ "activations_count": 2,
1250
+ "license_key": "XXXX-XXXX-XXXX-XXXX",
1251
+ "expiration_date": "2026-01-15 00:00:00",
1252
+ "product_id": 10,
1253
+ "variation_id": 15,
1254
+ "variation_title": "Pro License",
1255
+ "product_title": "My Plugin",
1256
+ "created_at": "2025-01-15 10:30:00",
1257
+ "updated_at": "2025-06-15 10:35:00"
1258
+ }
1259
+ ```
1260
+
1261
+ #### Response Fields
1262
+
1263
+ | Field | Type | Description |
1264
+ | --- | --- | --- |
1265
+ | `status` | string | License status: `valid`, `expired`, or `invalid` |
1266
+ | `activation_limit` | integer | Maximum allowed site activations (0 = unlimited) |
1267
+ | `activation_hash` | string | Unique hash for this site's activation (empty if not activated) |
1268
+ | `activations_count` | integer | Current number of active site activations |
1269
+ | `license_key` | string | The license key |
1270
+ | `expiration_date` | string | Expiration date in GMT, or `lifetime` for non-expiring licenses |
1271
+ | `product_id` | string | The product ID |
1272
+ | `variation_id` | integer | The product variation ID |
1273
+ | `variation_title` | string | The product variation title |
1274
+ | `product_title` | string | The product title |
1275
+
1276
+ #### Error Response (Validation)
1277
+
1278
+ ```
1279
+ {
1280
+ "success": true,
1281
+ "status": "invalid",
1282
+ "error_type": "validation_error",
1283
+ "message": "license_key, site_url and item_id is required"
1284
+ }
1285
+ ```
1286
+
1287
+ #### Error Types
1288
+
1289
+ | `error_type` | Description |
1290
+ | --- | --- |
1291
+ | `validation_error` | Missing required parameters |
1292
+ | `invalid_license` | License key not found |
1293
+ | `invalid_activation` | No activation found for this site |
1294
+ | `key_mismatch` | License key does not match the provided `item_id` |
1295
+
1296
+ #### Example
1297
+
1298
+ ```
1299
+ curl -X GET "https://example.com/?fluent-cart=check_license&license_key=XXXX-XXXX-XXXX-XXXX&item_id=10&site_url=https://customer-site.com"
1300
+ ```
1301
+
1302
+ ---
1303
+
1304
+ ### Activate License
1305
+
1306
+ `POST` `https://your-site.com/?fluent-cart=activate_license`
1307
+
1308
+ Activate a license key on a specific site URL. If the site is already activated for this license, the existing activation details are returned. Local/staging sites are detected automatically and do not count toward the activation limit.
1309
+
1310
+ - **Auth:** None required
1311
+
1312
+ #### Parameters
1313
+
1314
+ | Parameter | Type | Required | Description |
1315
+ | --- | --- | --- | --- |
1316
+ | `license_key` | string | Yes | The license key to activate |
1317
+ | `item_id` | string | Yes | The product ID (must match the license's product) |
1318
+ | `site_url` | string | Yes | The site URL to activate |
1319
+ | `server_version` | string | No | The server software version (e.g., PHP version) |
1320
+ | `platform_version` | string | No | The platform version (e.g., WordPress version) |
1321
+
1322
+ #### Response (Success)
1323
+
1324
+ ```
1325
+ {
1326
+ "success": true,
1327
+ "status": "valid",
1328
+ "activation_limit": 5,
1329
+ "activation_hash": "abc123def456...",
1330
+ "activations_count": 3,
1331
+ "license_key": "XXXX-XXXX-XXXX-XXXX",
1332
+ "expiration_date": "2026-01-15 00:00:00",
1333
+ "product_id": 10,
1334
+ "variation_id": 15,
1335
+ "variation_title": "Pro License",
1336
+ "product_title": "My Plugin",
1337
+ "created_at": "2025-01-15 10:30:00",
1338
+ "updated_at": "2025-06-15 10:35:00"
1339
+ }
1340
+ ```
1341
+
1342
+ Local/Staging Detection
1343
+
1344
+ Sites matching common local/staging patterns are automatically detected and marked with `is_local = 1`. These activations do not count toward the activation limit. Detected patterns include:
1345
+
1346
+ - **Subdomains:** `staging.`, `dev.`, `test.`, `qa.`, `sandbox.`, `beta.`, `preview.`, `uat.`, `development.`
1347
+ - **Subfolders:** `/staging/`, `/dev/`, `/test/`, etc.
1348
+ - **Domains:** `localhost`, `.wpengine.com`, `.kinsta.cloud`, `.cloudwaysapps.com`, `.pantheonsite.io`, and other popular hosting staging domains
1349
+
1350
+ #### Error Responses (422)
1351
+
1352
+ Missing required fields:
1353
+
1354
+ ```
1355
+ {
1356
+ "success": false,
1357
+ "message": "license_key, site_url and item_id is required",
1358
+ "error_type": "validation_error"
1359
+ }
1360
+ ```
1361
+
1362
+ License not found:
1363
+
1364
+ ```
1365
+ {
1366
+ "success": false,
1367
+ "message": "License not found",
1368
+ "error_type": "license_not_found"
1369
+ }
1370
+ ```
1371
+
1372
+ Product mismatch:
1373
+
1374
+ ```
1375
+ {
1376
+ "success": false,
1377
+ "message": "This license key is not valid for this product. Did you provide the valid license key?",
1378
+ "error_type": "key_mismatch"
1379
+ }
1380
+ ```
1381
+
1382
+ License expired:
1383
+
1384
+ ```
1385
+ {
1386
+ "success": false,
1387
+ "message": "The license key is expired. Please renew or purchase a new license",
1388
+ "error_type": "license_expired"
1389
+ }
1390
+ ```
1391
+
1392
+ License not active:
1393
+
1394
+ ```
1395
+ {
1396
+ "success": false,
1397
+ "message": "The license is not Active. Please contact the support.",
1398
+ "error_type": "license_not_active"
1399
+ }
1400
+ ```
1401
+
1402
+ Activation limit reached:
1403
+
1404
+ ```
1405
+ {
1406
+ "success": false,
1407
+ "message": "This license key has no activation limit. Please upgrade or purchase a new license.",
1408
+ "error_type": "activation_limit_exceeded"
1409
+ }
1410
+ ```
1411
+
1412
+ #### Error Types
1413
+
1414
+ | `error_type` | Description |
1415
+ | --- | --- |
1416
+ | `validation_error` | Missing required parameters |
1417
+ | `license_not_found` | License key does not exist |
1418
+ | `key_mismatch` | License key does not match the provided `item_id` |
1419
+ | `license_expired` | License has expired |
1420
+ | `license_not_active` | License status is not active (e.g., disabled) |
1421
+ | `activation_limit_exceeded` | No remaining activations available |
1422
+ | `activation_error` | General activation error (from filter) |
1423
+
1424
+ #### Example
1425
+
1426
+ ```
1427
+ curl -X POST "https://example.com/?fluent-cart=activate_license" \
1428
+ -H "Content-Type: application/x-www-form-urlencoded" \
1429
+ -d "license_key=XXXX-XXXX-XXXX-XXXX&item_id=10&site_url=https://customer-site.com&server_version=8.1&platform_version=6.4"
1430
+ ```
1431
+
1432
+ ---
1433
+
1434
+ ### Deactivate License
1435
+
1436
+ `POST` `https://your-site.com/?fluent-cart=deactivate_license`
1437
+
1438
+ Deactivate a license from a specific site URL. Removes the site activation and decrements the activation count.
1439
+
1440
+ - **Auth:** None required
1441
+
1442
+ #### Parameters
1443
+
1444
+ | Parameter | Type | Required | Description |
1445
+ | --- | --- | --- | --- |
1446
+ | `license_key` | string | Yes | The license key to deactivate |
1447
+ | `item_id` | string | Yes | The product ID (must match the license's product) |
1448
+ | `site_url` | string | Yes | The site URL to deactivate |
1449
+
1450
+ #### Response (Success)
1451
+
1452
+ ```
1453
+ {
1454
+ "success": true,
1455
+ "status": "deactivated",
1456
+ "activation_limit": 5,
1457
+ "activations_count": 2,
1458
+ "expiration_date": "2026-01-15 00:00:00",
1459
+ "product_id": 10,
1460
+ "variation_id": 15,
1461
+ "product_title": "My Plugin",
1462
+ "variation_title": "Pro License",
1463
+ "created_at": "2025-01-15 10:30:00",
1464
+ "updated_at": "2025-06-15 10:35:00"
1465
+ }
1466
+ ```
1467
+
1468
+ #### Error Responses (422)
1469
+
1470
+ Missing required fields:
1471
+
1472
+ ```
1473
+ {
1474
+ "success": false,
1475
+ "message": "license_key, site_url and item_id is required",
1476
+ "error_type": "validation_error"
1477
+ }
1478
+ ```
1479
+
1480
+ License not found or product mismatch:
1481
+
1482
+ ```
1483
+ {
1484
+ "success": false,
1485
+ "message": "License not found or does not match with the item_id",
1486
+ "error_type": "license_not_found"
1487
+ }
1488
+ ```
1489
+
1490
+ Site not found:
1491
+
1492
+ ```
1493
+ {
1494
+ "success": false,
1495
+ "message": "Site not found",
1496
+ "error_type": "site_not_found"
1497
+ }
1498
+ ```
1499
+
1500
+ #### Example
1501
+
1502
+ ```
1503
+ curl -X POST "https://example.com/?fluent-cart=deactivate_license" \
1504
+ -H "Content-Type: application/x-www-form-urlencoded" \
1505
+ -d "license_key=XXXX-XXXX-XXXX-XXXX&item_id=10&site_url=https://customer-site.com"
1506
+ ```
1507
+
1508
+ ---
1509
+
1510
+ ### Get License Version
1511
+
1512
+ `GET/POST` `https://your-site.com/?fluent-cart=get_license_version`
1513
+
1514
+ Retrieve the latest version information for a licensed product. This endpoint is designed to integrate with WordPress plugin/theme update mechanisms. It returns version data, changelog, download links, and banner/icon URLs.
1515
+
1516
+ - **Auth:** None required
1517
+
1518
+ #### Parameters
1519
+
1520
+ | Parameter | Type | Required | Description |
1521
+ | --- | --- | --- | --- |
1522
+ | `item_id` | string | Yes | The product ID |
1523
+ | `license_key` | string | Conditional | License key for authenticated download links. Required if `activation_hash` is not provided |
1524
+ | `activation_hash` | string | Conditional | Activation hash for authenticated download links. Required if `license_key` is not provided |
1525
+ | `site_url` | string | No | The site URL making the request |
1526
+
1527
+ #### Response (Valid License)
1528
+
1529
+ ```
1530
+ {
1531
+ "success": true,
1532
+ "new_version": "1.3.0",
1533
+ "stable_version": "1.3.0",
1534
+ "name": "My Plugin",
1535
+ "slug": "my-plugin",
1536
+ "url": "https://example.com/my-plugin",
1537
+ "last_updated": "2025-06-15 10:30:00",
1538
+ "homepage": "https://example.com/my-plugin",
1539
+ "package": "https://example.com/?fluent-cart=download_license_package&fct_package=...",
1540
+ "download_link": "https://example.com/?fluent-cart=download_license_package&fct_package=...",
1541
+ "trunk": "https://example.com/?fluent-cart=download_license_package&fct_package=...",
1542
+ "license_status": "valid",
1543
+ "sections": {
1544
+ "description": "Product description here",
1545
+ "changelog": "<h4>1.3.0</h4><ul><li>New feature</li></ul>"
1546
+ },
1547
+ "banners": {
1548
+ "low": "https://example.com/banner.png",
1549
+ "high": "https://example.com/banner.png"
1550
+ },
1551
+ "icons": {
1552
+ "2x": "https://example.com/icon.png",
1553
+ "1x": "https://example.com/icon.png"
1554
+ }
1555
+ }
1556
+ ```
1557
+
1558
+ #### Response (Invalid License)
1559
+
1560
+ When the license is invalid or expired, version information is still returned but without download links:
1561
+
1562
+ ```
1563
+ {
1564
+ "success": true,
1565
+ "new_version": "1.3.0",
1566
+ "stable_version": "1.3.0",
1567
+ "name": "My Plugin",
1568
+ "slug": "my-plugin",
1569
+ "package": "",
1570
+ "download_link": "",
1571
+ "license_message": "Invalid License Key",
1572
+ "license_status": "invalid",
1573
+ "sections": { ... },
1574
+ "banners": { ... },
1575
+ "icons": { ... }
1576
+ }
1577
+ ```
1578
+
1579
+ Download Link Expiry
1580
+
1581
+ The `package` / `download_link` URL contains a time-limited token that expires after 48 hours. WordPress will use this URL to download the update package.
1582
+
1583
+ #### Error Response (422)
1584
+
1585
+ Product not found:
1586
+
1587
+ ```
1588
+ {
1589
+ "success": false,
1590
+ "message": "Product not found",
1591
+ "error_type": "product_not_found"
1592
+ }
1593
+ ```
1594
+
1595
+ Licensing not enabled:
1596
+
1597
+ ```
1598
+ {
1599
+ "success": false,
1600
+ "message": "License is not enabled for this product",
1601
+ "error_type": "license_not_enabled"
1602
+ }
1603
+ ```
1604
+
1605
+ License settings not found:
1606
+
1607
+ ```
1608
+ {
1609
+ "success": false,
1610
+ "message": "License settings not found for this product",
1611
+ "error_type": "license_settings_not_found"
1612
+ }
1613
+ ```
1614
+
1615
+ #### Example
1616
+
1617
+ ```
1618
+ curl -X GET "https://example.com/?fluent-cart=get_license_version&item_id=10&license_key=XXXX-XXXX-XXXX-XXXX&site_url=https://customer-site.com"
1619
+ ```
1620
+
1621
+ ---
1622
+
1623
+ ### Download License Package
1624
+
1625
+ `GET` `https://your-site.com/?fluent-cart=download_license_package`
1626
+
1627
+ Download the product's update package file. This endpoint is not called directly -- it is used via the signed URLs generated by the [Get License Version](#get-license-version) endpoint. The URL contains an encoded token (`fct_package`) that includes the license key, activation hash, site URL, product ID, and expiration timestamp.
1628
+
1629
+ - **Auth:** None required (authentication is embedded in the signed URL)
1630
+
1631
+ #### Parameters
1632
+
1633
+ | Parameter | Type | Required | Description |
1634
+ | --- | --- | --- | --- |
1635
+ | `fct_package` | string | Yes | Base64-encoded package data containing license credentials and expiration. This is automatically generated by the version check endpoint |
1636
+
1637
+ #### Response
1638
+
1639
+ On success, the endpoint responds with an HTTP 302 redirect to the signed download URL for the file. The browser or update mechanism follows the redirect to download the file.
1640
+
1641
+ #### Error Responses (422)
1642
+
1643
+ Invalid package data:
1644
+
1645
+ ```
1646
+ {
1647
+ "success": false,
1648
+ "message": "Invalid package data",
1649
+ "error_type": "invalid_package_data"
1650
+ }
1651
+ ```
1652
+
1653
+ Invalid license:
1654
+
1655
+ ```
1656
+ {
1657
+ "success": false,
1658
+ "message": "This license key is not valid",
1659
+ "error_type": "expired_license"
1660
+ }
1661
+ ```
1662
+
1663
+ No downloadable file:
1664
+
1665
+ ```
1666
+ {
1667
+ "success": false,
1668
+ "message": "No downloadable file found for this product",
1669
+ "error_type": "downloadable_file_not_found"
1670
+ }
1671
+ ```
1672
+
1673
+ #### Example
1674
+
1675
+ This endpoint is typically not called directly. It is accessed via the `package` URL returned by the version check endpoint:
1676
+
1677
+ ```
1678
+ https://example.com/?fluent-cart=download_license_package&fct_package=WFhYWC1YWFhYLVhYWFgtWFhYWDo6Y3VzdG9tZXItc2l0ZS5jb206MTA6MTczNzAwMDAwMA==
1679
+ ```
1680
+
1681
+ ---
1682
+
1683
+ ## License Statuses
1684
+
1685
+ | Status | Description |
1686
+ | --- | --- |
1687
+ | `active` | License is valid and in use |
1688
+ | `inactive` | License is valid but has no site activations |
1689
+ | `expired` | License expiration date has passed (includes a configurable grace period, default 15 days) |
1690
+ | `disabled` | License has been manually disabled by an admin |
1691
+
1692
+ ### Public Status Mapping
1693
+
1694
+ The public license API returns simplified statuses:
1695
+
1696
+ | Internal Status | Public Status |
1697
+ | --- | --- |
1698
+ | `active` (not expired) | `valid` |
1699
+ | `inactive` (not expired) | `valid` |
1700
+ | `expired` | `expired` |
1701
+ | `disabled` | `invalid` |
1702
+
1703
+ ---
1704
+
1705
+ ## Hooks and Filters
1706
+
1707
+ | Hook | Type | Description |
1708
+ | --- | --- | --- |
1709
+ | `fluent_cart/license/check_license_response` | filter | Modify the check license response before returning |
1710
+ | `fluent_cart/license/activate_license_response` | filter | Modify the activate license response before returning |
1711
+ | `fluent_cart/license/deactivate_license_response` | filter | Modify the deactivate license response before returning |
1712
+ | `fluent_cart/license/get_version_response` | filter | Modify the version check response before returning |
1713
+ | `fluent_cart/license/checking_error` | filter | Modify error responses during license checking |
1714
+ | `fluent_cart/license/check_item_id` | filter | Control whether `item_id` validation is enforced |
1715
+ | `fluent_cart/license/site_activated` | action | Fired after a site is successfully activated |
1716
+ | `fluent_cart/license/site_deactivated` | action | Fired after a site is successfully deactivated |
1717
+ | `fluent_cart/license/sanitized_url` | filter | Modify the sanitized site URL |
1718
+ | `fluent_cart/license/staging_subdomain_patterns` | filter | Customize subdomain patterns for local site detection |
1719
+ | `fluent_cart/license/staging_subfolder_patterns` | filter | Customize subfolder patterns for local site detection |
1720
+ | `fluent_cart/license/staging_domains` | filter | Customize domain patterns for local site detection |
1721
+ | `fluent_cart/license/is_staging_site_result` | filter | Override the final local site detection result |
1722
+ | `fluent_cart/license/grace_period_in_days` | filter | Change the license expiration grace period (default: 15 days) |
1723
+ | `fluent_cart/license/validity_by_variation` | filter | Modify validity settings for a variation during save |
1724
+ | `fluent_cart/license/default_validity_by_variation` | filter | Modify the default validity for a new variation |
1725
+ | `fluent_cart/license/expiration_date_by_variation` | filter | Modify the calculated expiration timestamp |
1726
+ | `fluent_cart/customer/license_details_section_parts` | filter | Add custom HTML sections to the customer portal license detail view |
1727
+ | `fluent_cart/licenses_list_filter_query` | filter | Modify the license list query before execution |
1728
+ | `fluent_cart_sl/license_deleted` | action | Fired after a license is deleted |
1729
+ | `fluent_cart_sl/license_status_updated` | action | Fired after a license status changes |
1730
+ | `fluent_cart_sl/license_key_regenerated` | action | Fired after a license key is regenerated |
1731
+ | `fluent_cart_sl/license_validity_extended` | action | Fired after a license expiration date is changed |
1732
+ | `fluent_cart_sl/license_limit_increased` | action | Fired after a license activation limit is changed |
1733
+ | `fluent_cart_sl/site_license_deactivated` | action | Fired after a customer deactivates a site from the portal |