fluentcart-developer 2.3.4 → 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 (670) 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.d.ts.map +1 -1
  5. package/dist/cards/fluentcart/tools.js +62 -17
  6. package/dist/cards/fluentcart/tools.js.map +1 -1
  7. package/dist/paths.d.ts +1 -1
  8. package/dist/paths.d.ts.map +1 -1
  9. package/dist/paths.js +1 -1
  10. package/dist/paths.js.map +1 -1
  11. package/dist/reference-reader.d.ts +32 -1
  12. package/dist/reference-reader.d.ts.map +1 -1
  13. package/dist/reference-reader.js +111 -22
  14. package/dist/reference-reader.js.map +1 -1
  15. package/dist/server.d.ts.map +1 -1
  16. package/dist/server.js +8 -1
  17. package/dist/server.js.map +1 -1
  18. package/dist/skills/fluentcart-developer/SKILL.md +108 -580
  19. package/dist/skills/fluentcart-developer/examples/README.md +30 -30
  20. package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/fluent-cart/checkout.php +32 -32
  21. package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/functions.php +40 -40
  22. package/dist/skills/fluentcart-developer/examples/sample-custom-addon/fluentcart-custom-addon.php +113 -113
  23. package/dist/skills/fluentcart-developer/examples/sample-custom-payment-gateway/fluentcart-custom-gateway-example.php +148 -148
  24. package/dist/skills/fluentcart-developer/examples/sample-fee-surcharge-plugin/fluentcart-fee-surcharge.php +38 -38
  25. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/README.md +22 -22
  26. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/sample-plugin-with-licensing-sdk.php +79 -79
  27. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/FluentLicensing.php +303 -303
  28. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/LicenseSettings.php +566 -566
  29. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/PluginUpdater.php +304 -304
  30. package/dist/skills/fluentcart-developer/examples/sample-shipping-carrier/fluentcart-custom-shipping-carrier.php +61 -61
  31. package/dist/skills/fluentcart-developer/references/api/authentication.md +452 -0
  32. package/dist/skills/fluentcart-developer/references/api/coupons.md +786 -0
  33. package/dist/skills/fluentcart-developer/references/api/customers.md +889 -0
  34. package/dist/skills/fluentcart-developer/references/api/files.md +609 -0
  35. package/dist/skills/fluentcart-developer/references/api/index.md +432 -0
  36. package/dist/skills/fluentcart-developer/references/api/licensing.md +633 -0
  37. package/dist/skills/fluentcart-developer/references/api/order-bump.md +384 -0
  38. package/dist/skills/fluentcart-developer/references/api/orders.md +814 -0
  39. package/dist/skills/fluentcart-developer/references/api/products.md +866 -0
  40. package/dist/skills/fluentcart-developer/references/api/roles-permissions.md +536 -0
  41. package/dist/skills/fluentcart-developer/references/api/subscriptions.md +827 -0
  42. package/dist/skills/fluentcart-developer/references/database/index.md +44 -0
  43. package/dist/skills/fluentcart-developer/references/database/models/activity.md +178 -0
  44. package/dist/skills/fluentcart-developer/references/database/models/applied-coupon.md +291 -0
  45. package/dist/skills/fluentcart-developer/references/database/models/attribute-group.md +239 -0
  46. package/dist/skills/fluentcart-developer/references/database/models/attribute-relation.md +181 -0
  47. package/dist/skills/fluentcart-developer/references/database/models/attribute-term.md +219 -0
  48. package/dist/skills/fluentcart-developer/references/database/models/cart.md +645 -0
  49. package/dist/skills/fluentcart-developer/references/database/models/coupon.md +427 -0
  50. package/dist/skills/fluentcart-developer/references/database/models/customer-addresses.md +348 -0
  51. package/dist/skills/fluentcart-developer/references/database/models/customer-meta.md +156 -0
  52. package/dist/skills/fluentcart-developer/references/database/models/customer.md +584 -0
  53. package/dist/skills/fluentcart-developer/references/database/models/dynamic-model.md +163 -0
  54. package/dist/skills/fluentcart-developer/references/database/models/label-relationship.md +155 -0
  55. package/dist/skills/fluentcart-developer/references/database/models/label.md +153 -0
  56. package/dist/skills/fluentcart-developer/references/database/models/license-activation.md +182 -0
  57. package/dist/skills/fluentcart-developer/references/database/models/license-meta.md +163 -0
  58. package/dist/skills/fluentcart-developer/references/database/models/license-site.md +208 -0
  59. package/dist/skills/fluentcart-developer/references/database/models/license.md +640 -0
  60. package/dist/skills/fluentcart-developer/references/database/models/meta.md +233 -0
  61. package/dist/skills/fluentcart-developer/references/database/models/order-address.md +391 -0
  62. package/dist/skills/fluentcart-developer/references/database/models/order-download-permission.md +144 -0
  63. package/dist/skills/fluentcart-developer/references/database/models/order-item.md +383 -0
  64. package/dist/skills/fluentcart-developer/references/database/models/order-meta.md +303 -0
  65. package/dist/skills/fluentcart-developer/references/database/models/order-operation.md +158 -0
  66. package/dist/skills/fluentcart-developer/references/database/models/order-promotion-stat.md +175 -0
  67. package/dist/skills/fluentcart-developer/references/database/models/order-promotion.md +250 -0
  68. package/dist/skills/fluentcart-developer/references/database/models/order-tax-rate.md +172 -0
  69. package/dist/skills/fluentcart-developer/references/database/models/order-transaction.md +440 -0
  70. package/dist/skills/fluentcart-developer/references/database/models/order.md +727 -0
  71. package/dist/skills/fluentcart-developer/references/database/models/product-detail.md +397 -0
  72. package/dist/skills/fluentcart-developer/references/database/models/product-download.md +258 -0
  73. package/dist/skills/fluentcart-developer/references/database/models/product-meta.md +153 -0
  74. package/dist/skills/fluentcart-developer/references/database/models/product-variation.md +556 -0
  75. package/dist/skills/fluentcart-developer/references/database/models/product.md +580 -0
  76. package/dist/skills/fluentcart-developer/references/database/models/relationships.md +427 -0
  77. package/dist/skills/fluentcart-developer/references/database/models/scheduled-action.md +175 -0
  78. package/dist/skills/fluentcart-developer/references/database/models/shipping-class.md +148 -0
  79. package/dist/skills/fluentcart-developer/references/database/models/shipping-method.md +280 -0
  80. package/dist/skills/fluentcart-developer/references/database/models/shipping-zone.md +205 -0
  81. package/dist/skills/fluentcart-developer/references/database/models/subscription-meta.md +173 -0
  82. package/dist/skills/fluentcart-developer/references/database/models/subscription.md +528 -0
  83. package/dist/skills/fluentcart-developer/references/database/models/tax-class.md +195 -0
  84. package/dist/skills/fluentcart-developer/references/database/models/tax-rate.md +225 -0
  85. package/dist/skills/fluentcart-developer/references/database/models/user-meta.md +166 -0
  86. package/dist/skills/fluentcart-developer/references/database/models/user.md +220 -0
  87. package/dist/skills/fluentcart-developer/references/database/models.md +404 -0
  88. package/dist/skills/fluentcart-developer/references/database/query-builder.md +860 -0
  89. package/dist/skills/fluentcart-developer/references/database/readme.md +276 -0
  90. package/dist/skills/fluentcart-developer/references/database/schema.md +1002 -0
  91. package/dist/skills/fluentcart-developer/references/engineering/adding-custom-pages-to-the-customer-dashboard.md +395 -0
  92. package/dist/skills/fluentcart-developer/references/engineering/index.md +4 -0
  93. package/dist/skills/fluentcart-developer/references/engineering.md +4 -0
  94. package/dist/skills/fluentcart-developer/references/getting-started.md +249 -0
  95. package/dist/skills/fluentcart-developer/references/guides/frontend.md +519 -0
  96. package/dist/skills/fluentcart-developer/references/guides/index.md +107 -0
  97. package/dist/skills/fluentcart-developer/references/guides/integrations.md +600 -0
  98. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/index.md +237 -0
  99. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/labels-and-tracking.md +481 -0
  100. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/live-rates.md +269 -0
  101. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/reference.md +223 -0
  102. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/settings.md +370 -0
  103. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier.md +237 -0
  104. package/dist/skills/fluentcart-developer/references/{subscription-customization.md → guides/subscriptions.md} +217 -197
  105. package/dist/skills/fluentcart-developer/references/hooks/actions/admin-and-templates.md +1079 -0
  106. package/dist/skills/fluentcart-developer/references/hooks/actions/cart-and-checkout.md +1795 -0
  107. package/dist/skills/fluentcart-developer/references/hooks/actions/customers-and-users.md +327 -0
  108. package/dist/skills/fluentcart-developer/references/hooks/actions/licenses.md +829 -0
  109. package/dist/skills/fluentcart-developer/references/hooks/actions/modules.md +81 -0
  110. package/dist/skills/fluentcart-developer/references/hooks/actions/orders.md +757 -0
  111. package/dist/skills/fluentcart-developer/references/hooks/actions/payments-and-integrations.md +1163 -0
  112. package/dist/skills/fluentcart-developer/references/hooks/actions/pro-modules.md +219 -0
  113. package/dist/skills/fluentcart-developer/references/hooks/actions/products-and-coupons.md +1019 -0
  114. package/dist/skills/fluentcart-developer/references/hooks/actions/subscriptions.md +1290 -0
  115. package/dist/skills/fluentcart-developer/references/hooks/actions.md +16 -0
  116. package/dist/skills/fluentcart-developer/references/hooks/deprecated.md +60 -0
  117. package/dist/skills/fluentcart-developer/references/hooks/filters/cart-and-checkout.md +2032 -0
  118. package/dist/skills/fluentcart-developer/references/hooks/filters/customers-and-subscriptions.md +1746 -0
  119. package/dist/skills/fluentcart-developer/references/hooks/filters/integrations-and-advanced.md +2439 -0
  120. package/dist/skills/fluentcart-developer/references/hooks/filters/modules.md +464 -0
  121. package/dist/skills/fluentcart-developer/references/hooks/filters/orders-and-payments.md +2658 -0
  122. package/dist/skills/fluentcart-developer/references/hooks/filters/pro-modules.md +502 -0
  123. package/dist/skills/fluentcart-developer/references/hooks/filters/products-and-pricing.md +1785 -0
  124. package/dist/skills/fluentcart-developer/references/hooks/filters/settings-and-configuration.md +2966 -0
  125. package/dist/skills/fluentcart-developer/references/hooks/filters.md +14 -0
  126. package/dist/skills/fluentcart-developer/references/hooks/index.md +35 -0
  127. package/dist/skills/fluentcart-developer/references/index.md +625 -0
  128. package/dist/skills/fluentcart-developer/references/{fee-system-guide.md → modules/fee-system.md} +427 -449
  129. package/dist/skills/fluentcart-developer/references/{ghost-product-selling.md → modules/ghost-product-selling.md} +440 -458
  130. package/dist/skills/fluentcart-developer/references/modules/index.md +484 -0
  131. package/dist/skills/fluentcart-developer/references/modules/licensing.md +342 -0
  132. package/dist/skills/fluentcart-developer/references/modules/order-bump.md +433 -0
  133. package/dist/skills/fluentcart-developer/references/modules/payment-methods.md +129 -0
  134. package/dist/skills/fluentcart-developer/references/modules/refunds.md +170 -0
  135. package/dist/skills/fluentcart-developer/references/modules/shipping.md +846 -0
  136. package/dist/skills/fluentcart-developer/references/modules/storage.md +986 -0
  137. package/dist/skills/fluentcart-developer/references/modules/subscription-vendor-ids.md +186 -0
  138. package/dist/skills/fluentcart-developer/references/modules/subscriptions.md +678 -0
  139. package/dist/skills/fluentcart-developer/references/payment-methods-integration/index.md +164 -0
  140. package/dist/skills/fluentcart-developer/references/payment-methods-integration/paddle-example.md +1648 -0
  141. package/dist/skills/fluentcart-developer/references/payment-methods-integration/payment/setting/fields.md +353 -0
  142. package/dist/skills/fluentcart-developer/references/payment-methods-integration/quick-implementation.md +1079 -0
  143. package/dist/skills/fluentcart-developer/references/payment-methods-integration.md +164 -0
  144. package/dist/skills/fluentcart-developer/references/restapi/checkout.md +573 -0
  145. package/dist/skills/fluentcart-developer/references/restapi/coupons.md +958 -0
  146. package/dist/skills/fluentcart-developer/references/restapi/customer-profile.md +1423 -0
  147. package/dist/skills/fluentcart-developer/references/{rest-api-customers.md → restapi/customers.md} +1103 -1121
  148. package/dist/skills/fluentcart-developer/references/restapi/dashboard.md +1083 -0
  149. package/dist/skills/fluentcart-developer/references/restapi/data-export.md +132 -0
  150. package/dist/skills/fluentcart-developer/references/restapi/email-notifications.md +846 -0
  151. package/dist/skills/fluentcart-developer/references/restapi/files.md +313 -0
  152. package/dist/skills/fluentcart-developer/references/restapi/index.md +127 -0
  153. package/dist/skills/fluentcart-developer/references/restapi/integrations.md +1000 -0
  154. package/dist/skills/fluentcart-developer/references/restapi/inventory.md +192 -0
  155. package/dist/skills/fluentcart-developer/references/restapi/labels-and-attributes.md +797 -0
  156. package/dist/skills/fluentcart-developer/references/restapi/licensing.md +1733 -0
  157. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-available-shipping-methods.md +30 -0
  158. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-checkout-summary.md +28 -0
  159. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-country-info.md +29 -0
  160. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-order-info.md +28 -0
  161. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-shipping-methods-list-view.md +30 -0
  162. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/login.md +66 -0
  163. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/place-order.md +179 -0
  164. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/apply-coupon.md +83 -0
  165. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/cancel-coupon.md +87 -0
  166. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/check-product-eligibility.md +59 -0
  167. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/create-coupon.md +230 -0
  168. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/delete-coupon.md +29 -0
  169. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon-settings.md +20 -0
  170. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon.md +27 -0
  171. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupon-codes.md +20 -0
  172. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupons.md +37 -0
  173. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/re-apply-coupons.md +75 -0
  174. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/store-coupon-settings.md +40 -0
  175. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/update-coupon.md +133 -0
  176. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-address-checkout.md +138 -0
  177. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-profile-address.md +119 -0
  178. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/dashboard-overview.md +22 -0
  179. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/delete-profile-address.md +46 -0
  180. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-order-details.md +30 -0
  181. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-portal-sections.md +29 -0
  182. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-profile-details.md +22 -0
  183. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-transaction-billing-address.md +30 -0
  184. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-upgrade-paths.md +31 -0
  185. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-downloads.md +29 -0
  186. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-orders.md +28 -0
  187. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/make-profile-address-primary.md +55 -0
  188. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/pause-subscription.md +29 -0
  189. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/resume-subscription.md +29 -0
  190. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/save-transaction-billing-address.md +92 -0
  191. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/select-address-for-checkout.md +32 -0
  192. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-address.md +115 -0
  193. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-details.md +69 -0
  194. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/attach-user.md +50 -0
  195. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/bulk-actions.md +65 -0
  196. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-address.md +135 -0
  197. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-customer.md +108 -0
  198. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/delete-address.md +62 -0
  199. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/detach-user.md +28 -0
  200. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/find-customer-order.md +27 -0
  201. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-attachable-users.md +20 -0
  202. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-addresses.md +28 -0
  203. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-orders.md +37 -0
  204. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-stats.md +27 -0
  205. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer.md +32 -0
  206. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/list-customers.md +37 -0
  207. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/recalculate-ltv.md +28 -0
  208. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/set-primary-address.md +72 -0
  209. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-additional-info.md +55 -0
  210. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-address.md +144 -0
  211. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-customer.md +123 -0
  212. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/attach-note-to-order.md +49 -0
  213. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-all-pages.md +21 -0
  214. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-single-page.md +55 -0
  215. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/delete-activity.md +28 -0
  216. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-country-info.md +29 -0
  217. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-dashboard-stats.md +22 -0
  218. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-filter-options.md +31 -0
  219. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-data.md +20 -0
  220. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-settings.md +20 -0
  221. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-print-templates.md +20 -0
  222. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-search-options.md +27 -0
  223. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-widgets.md +28 -0
  224. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/initialize-app.md +20 -0
  225. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-activities.md +33 -0
  226. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-attachments.md +21 -0
  227. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-countries.md +20 -0
  228. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/mark-activity-read.md +53 -0
  229. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/run-data-backfills.md +21 -0
  230. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-settings.md +54 -0
  231. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-tax-settings.md +73 -0
  232. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-print-templates.md +64 -0
  233. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/upload-attachment.md +42 -0
  234. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-customers-batch.md +129 -0
  235. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-licenses-batch.md +133 -0
  236. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-orders-batch.md +129 -0
  237. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-subscriptions-batch.md +129 -0
  238. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-customers-export-schema.md +21 -0
  239. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-licenses-export-schema.md +26 -0
  240. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-orders-export-schema.md +21 -0
  241. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-subscriptions-export-schema.md +21 -0
  242. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/enable-notification.md +57 -0
  243. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-digest-settings.md +22 -0
  244. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-notification.md +30 -0
  245. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-reminders.md +22 -0
  246. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-settings.md +22 -0
  247. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-shortcodes.md +22 -0
  248. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/list-notifications.md +20 -0
  249. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-default-template.md +66 -0
  250. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-notification.md +50 -0
  251. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-digest-settings.md +101 -0
  252. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-reminders.md +162 -0
  253. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-settings.md +99 -0
  254. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-digest-test.md +47 -0
  255. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-manual-reminder.md +51 -0
  256. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/update-notification.md +93 -0
  257. package/dist/skills/fluentcart-developer/references/restapi/operations/files/delete-file.md +31 -0
  258. package/dist/skills/fluentcart-developer/references/restapi/operations/files/get-bucket-list.md +28 -0
  259. package/dist/skills/fluentcart-developer/references/restapi/operations/files/list-files.md +30 -0
  260. package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-editor-file.md +32 -0
  261. package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-file.md +34 -0
  262. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/chained-data-request.md +46 -0
  263. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/change-feed-status.md +51 -0
  264. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/delete-feed.md +27 -0
  265. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-dynamic-options.md +29 -0
  266. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-lists.md +27 -0
  267. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-settings.md +27 -0
  268. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-feeds.md +20 -0
  269. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-settings.md +26 -0
  270. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/install-addon-plugin.md +49 -0
  271. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/list-addons.md +20 -0
  272. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/save-feed-settings.md +52 -0
  273. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/set-global-settings.md +50 -0
  274. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/bulk-update-stock.md +94 -0
  275. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/export-inventory.md +81 -0
  276. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-adjustment-history.md +26 -0
  277. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-inventory-stats.md +21 -0
  278. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/list-inventory.md +33 -0
  279. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/update-stock.md +75 -0
  280. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-attribute-group.md +31 -0
  281. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-label.md +31 -0
  282. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-terms.md +90 -0
  283. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-group.md +28 -0
  284. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-term.md +29 -0
  285. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-group.md +28 -0
  286. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-library.md +20 -0
  287. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-groups.md +32 -0
  288. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-terms.md +33 -0
  289. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-labels.md +20 -0
  290. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-groups.md +51 -0
  291. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-terms.md +56 -0
  292. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-group.md +37 -0
  293. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-term.md +39 -0
  294. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-label-selections.md +32 -0
  295. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-plugin-license.md +41 -0
  296. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-site-admin.md +60 -0
  297. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-plugin-license.md +18 -0
  298. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-admin.md +67 -0
  299. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-customer.md +47 -0
  300. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/delete-license.md +24 -0
  301. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/extend-license-validity.md +47 -0
  302. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-license-details.md +25 -0
  303. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-licenses-admin.md +26 -0
  304. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-activations.md +25 -0
  305. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-details.md +25 -0
  306. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-site.md +30 -0
  307. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-plugin-license-status.md +18 -0
  308. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-product-license-settings.md +24 -0
  309. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-customer-licenses.md +25 -0
  310. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-license-sites.md +33 -0
  311. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-licenses.md +38 -0
  312. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-activate-license.md +54 -0
  313. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-check-license.md +26 -0
  314. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-deactivate-license.md +46 -0
  315. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-download-license-package.md +23 -0
  316. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-get-license-version.md +26 -0
  317. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/regenerate-license-key.md +24 -0
  318. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/save-product-license-settings.md +193 -0
  319. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-activation-limit.md +53 -0
  320. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-status.md +52 -0
  321. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/create-order-bump.md +47 -0
  322. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/delete-order-bump.md +25 -0
  323. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/get-order-bump.md +25 -0
  324. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/list-order-bumps.md +29 -0
  325. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/update-order-bump.md +141 -0
  326. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/accept-dispute.md +47 -0
  327. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/bulk-actions.md +72 -0
  328. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-shipping.md +67 -0
  329. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-tax.md +98 -0
  330. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/change-customer.md +50 -0
  331. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/charge-now.md +29 -0
  332. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-and-change-customer.md +92 -0
  333. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-custom-order-item.md +68 -0
  334. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-order.md +351 -0
  335. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-renewal-now.md +29 -0
  336. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/delete-order.md +28 -0
  337. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/generate-missing-licenses.md +29 -0
  338. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order-transactions.md +27 -0
  339. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order.md +27 -0
  340. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-renewal.md +28 -0
  341. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-shipping-methods.md +28 -0
  342. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-single-transaction.md +28 -0
  343. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-order-currencies.md +22 -0
  344. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-orders.md +42 -0
  345. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-renewals.md +28 -0
  346. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/mark-as-paid.md +61 -0
  347. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/price-order.md +135 -0
  348. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/refund-order.md +72 -0
  349. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/resend-renewal-invoice.md +29 -0
  350. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/skip-renewal.md +48 -0
  351. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-order-statuses.md +28 -0
  352. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-pending-transaction.md +29 -0
  353. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address-id.md +60 -0
  354. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address.md +98 -0
  355. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order.md +172 -0
  356. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-statuses.md +77 -0
  357. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-subscription-details.md +84 -0
  358. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-transaction-status.md +51 -0
  359. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/void-renewal.md +30 -0
  360. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/create-pdf-template.md +42 -0
  361. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/delete-pdf-template.md +26 -0
  362. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/download-pdf-preview.md +44 -0
  363. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-factory-default-templates.md +19 -0
  364. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-status.md +21 -0
  365. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-template.md +26 -0
  366. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-saved-templates.md +21 -0
  367. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-seller-details.md +19 -0
  368. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/list-pdf-templates.md +19 -0
  369. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-pdf-template.md +53 -0
  370. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-seller-details.md +97 -0
  371. package/dist/skills/fluentcart-developer/references/restapi/operations/products/add-product-terms.md +64 -0
  372. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-edit-fetch.md +30 -0
  373. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-insert-products.md +62 -0
  374. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-products.md +59 -0
  375. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-variants.md +83 -0
  376. package/dist/skills/fluentcart-developer/references/restapi/operations/products/change-integration-status.md +64 -0
  377. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-dummy-products.md +45 -0
  378. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-product.md +81 -0
  379. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-variation.md +181 -0
  380. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-downloadable-file.md +27 -0
  381. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product-integration.md +30 -0
  382. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product.md +27 -0
  383. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-taxonomy-term.md +55 -0
  384. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-upgrade-path.md +27 -0
  385. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-variation.md +27 -0
  386. package/dist/skills/fluentcart-developer/references/restapi/operations/products/do-bulk-action.md +56 -0
  387. package/dist/skills/fluentcart-developer/references/restapi/operations/products/duplicate-product.md +56 -0
  388. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-products-by-ids.md +26 -0
  389. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-taxonomy-terms.md +20 -0
  390. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-terms-by-parent.md +60 -0
  391. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-variations-by-ids.md +26 -0
  392. package/dist/skills/fluentcart-developer/references/restapi/operations/products/find-subscription-variants.md +26 -0
  393. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-bundle-info.md +27 -0
  394. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-downloadable-url.md +27 -0
  395. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-max-excerpt-word-count.md +20 -0
  396. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-pricing-widgets.md +27 -0
  397. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-feeds.md +29 -0
  398. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-settings.md +31 -0
  399. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-pricing.md +28 -0
  400. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product.md +28 -0
  401. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-related-products.md +31 -0
  402. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-upgrade-settings.md +27 -0
  403. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-variation-upgrade-paths.md +28 -0
  404. package/dist/skills/fluentcart-developer/references/restapi/operations/products/group-bulk-update-variants.md +103 -0
  405. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-all-variants.md +26 -0
  406. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-product-variations.md +26 -0
  407. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-products.md +34 -0
  408. package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-shipping-class.md +27 -0
  409. package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-tax-class.md +27 -0
  410. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-bundle-info.md +56 -0
  411. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-product-integration.md +62 -0
  412. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-upgrade-path.md +78 -0
  413. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-product-variant-options.md +29 -0
  414. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-products-by-name.md +28 -0
  415. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-variants-by-name.md +28 -0
  416. package/dist/skills/fluentcart-developer/references/restapi/operations/products/set-variation-media.md +74 -0
  417. package/dist/skills/fluentcart-developer/references/restapi/operations/products/suggest-sku.md +28 -0
  418. package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-downloadable-files.md +134 -0
  419. package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-taxonomy-terms.md +61 -0
  420. package/dist/skills/fluentcart-developer/references/restapi/operations/products/toggle-product-tax-exemption.md +56 -0
  421. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-downloadable-file.md +98 -0
  422. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-inventory.md +56 -0
  423. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-long-desc-editor-mode.md +49 -0
  424. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-manage-stock.md +53 -0
  425. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-detail.md +58 -0
  426. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-pricing.md +225 -0
  427. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-shipping-class.md +49 -0
  428. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-tax-class.md +49 -0
  429. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-upgrade-path.md +78 -0
  430. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-option.md +79 -0
  431. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-tax-exemption.md +56 -0
  432. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation-pricing-table.md +49 -0
  433. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation.md +105 -0
  434. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/get-product-views.md +34 -0
  435. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/list-products.md +42 -0
  436. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/search-products.md +30 -0
  437. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/channel-rules.md +24 -0
  438. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/country-heat-map.md +22 -0
  439. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupon-overview.md +37 -0
  440. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupons.md +36 -0
  441. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-insights.md +31 -0
  442. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-overview.md +36 -0
  443. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-repeat.md +35 -0
  444. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segment-customers.md +36 -0
  445. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segments.md +30 -0
  446. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-value.md +34 -0
  447. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/dashboard-stats.md +30 -0
  448. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/failed-orders.md +34 -0
  449. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-new-vs-returning-customer.md +34 -0
  450. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-by-day-and-hour.md +34 -0
  451. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-meta.md +29 -0
  452. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-top-sold-products.md +34 -0
  453. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/future-renewals.md +31 -0
  454. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/generate-retention-snapshots.md +24 -0
  455. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-overview.md +30 -0
  456. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-activities.md +26 -0
  457. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-orders.md +20 -0
  458. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-revenue.md +37 -0
  459. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-at-risk.md +35 -0
  460. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-variations.md +33 -0
  461. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments.md +33 -0
  462. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/item-count-distribution.md +34 -0
  463. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-chart.md +30 -0
  464. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-pie-chart.md +22 -0
  465. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-summary.md +22 -0
  466. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/locations.md +43 -0
  467. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-chart.md +37 -0
  468. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-completion-time.md +34 -0
  469. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-mix.md +34 -0
  470. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-value-distribution.md +34 -0
  471. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-disputes.md +38 -0
  472. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-methods.md +36 -0
  473. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods.md +37 -0
  474. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison-launch.md +33 -0
  475. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison.md +40 -0
  476. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-detail.md +37 -0
  477. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-sales.md +37 -0
  478. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/refunds-overview.md +37 -0
  479. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/retention-snapshots-step.md +45 -0
  480. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sales-growth-chart.md +35 -0
  481. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/save-channel-rules.md +73 -0
  482. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/source-channels.md +37 -0
  483. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sources.md +49 -0
  484. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-cohorts.md +33 -0
  485. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-health.md +30 -0
  486. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-rebuys.md +37 -0
  487. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-retention.md +34 -0
  488. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-variations.md +22 -0
  489. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscriptions-overview.md +37 -0
  490. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/weeks-between-refund.md +34 -0
  491. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/assign-role.md +48 -0
  492. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/delete-role-assignment.md +47 -0
  493. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/get-role.md +25 -0
  494. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-managers.md +18 -0
  495. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-roles.md +18 -0
  496. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/search-users.md +25 -0
  497. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/update-role.md +43 -0
  498. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/create-saved-view.md +106 -0
  499. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/delete-saved-view.md +26 -0
  500. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/list-saved-views.md +25 -0
  501. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/update-saved-view.md +83 -0
  502. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-payment-addon.md +44 -0
  503. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-plugin-addon.md +44 -0
  504. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/change-storage-driver-status.md +56 -0
  505. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/check-paypal-webhook.md +26 -0
  506. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/create-storage-bucket.md +63 -0
  507. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/disconnect-payment-method.md +55 -0
  508. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/exchange-paypal-seller-auth-token.md +62 -0
  509. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-active-storage-drivers.md +20 -0
  510. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-checkout-fields.md +22 -0
  511. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-email-shortcodes.md +20 -0
  512. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-config-snippets.md +26 -0
  513. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-status.md +20 -0
  514. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-module-settings.md +20 -0
  515. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-connection-info.md +26 -0
  516. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-settings.md +26 -0
  517. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-permissions.md +22 -0
  518. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-plugin-addons.md +20 -0
  519. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-storage-driver-settings.md +27 -0
  520. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-store-settings.md +26 -0
  521. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-mcp-adapter.md +21 -0
  522. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-payment-addon.md +60 -0
  523. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-plugin-addon.md +64 -0
  524. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-payment-methods.md +20 -0
  525. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-storage-drivers.md +20 -0
  526. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-storage-buckets.md +67 -0
  527. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reorder-payment-methods.md +55 -0
  528. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reset-storage-driver-settings.md +45 -0
  529. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-checkout-fields.md +133 -0
  530. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-confirmation-settings.md +68 -0
  531. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-module-settings.md +68 -0
  532. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-design.md +67 -0
  533. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-settings.md +58 -0
  534. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-permissions.md +68 -0
  535. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-storage-driver-settings.md +62 -0
  536. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-store-settings.md +239 -0
  537. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/setup-paypal-webhook.md +48 -0
  538. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/toggle-mcp.md +40 -0
  539. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-storage-driver-connection.md +62 -0
  540. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-turnstile-keys.md +55 -0
  541. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-class.md +73 -0
  542. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-method.md +110 -0
  543. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-zone.md +56 -0
  544. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-class.md +29 -0
  545. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-method.md +29 -0
  546. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-zone.md +29 -0
  547. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class-profile.md +30 -0
  548. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class.md +29 -0
  549. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-packages.md +22 -0
  550. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-zone.md +27 -0
  551. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-countries.md +22 -0
  552. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-states.md +28 -0
  553. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-classes.md +31 -0
  554. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-zones.md +31 -0
  555. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/save-shipping-packages.md +112 -0
  556. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-class.md +79 -0
  557. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-method.md +113 -0
  558. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-zone.md +62 -0
  559. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-zone-order.md +52 -0
  560. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-auto-renew.md +30 -0
  561. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-subscription.md +52 -0
  562. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/confirm-subscription-switch.md +70 -0
  563. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/fetch-subscription-remote.md +28 -0
  564. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/generate-early-payment-link.md +29 -0
  565. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-customer-subscription.md +27 -0
  566. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-or-create-plan.md +69 -0
  567. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-setup-intent-attempts.md +30 -0
  568. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-subscription.md +28 -0
  569. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/initiate-early-payment.md +31 -0
  570. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-customer-subscriptions.md +27 -0
  571. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-subscriptions.md +39 -0
  572. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/pause-subscription.md +28 -0
  573. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/reactivate-subscription.md +28 -0
  574. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/resume-subscription.md +28 -0
  575. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/switch-payment-method.md +70 -0
  576. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-payment-method.md +69 -0
  577. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-vendor-ids.md +56 -0
  578. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/verify-vendor-ids.md +56 -0
  579. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-class.md +51 -0
  580. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-rate.md +117 -0
  581. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-product-override.md +27 -0
  582. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-shipping-tax-override.md +27 -0
  583. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-class.md +28 -0
  584. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-rate.md +27 -0
  585. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-id.md +27 -0
  586. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-rates.md +28 -0
  587. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-eu-vat-product-overrides.md +20 -0
  588. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-oss-country-rates.md +20 -0
  589. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-preconfigured-tax-rates.md +20 -0
  590. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-product-overrides.md +27 -0
  591. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-tax-settings.md +20 -0
  592. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-all-tax-rates.md +20 -0
  593. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-classes.md +20 -0
  594. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-records.md +37 -0
  595. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/mark-taxes-as-filed.md +58 -0
  596. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/reset-eu-vat-rates.md +21 -0
  597. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-configured-countries.md +57 -0
  598. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-country-tax-id.md +50 -0
  599. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-eu-vat-cross-border-settings.md +127 -0
  600. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-oss-country-rates.md +100 -0
  601. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-product-override.md +110 -0
  602. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-shipping-tax-override.md +52 -0
  603. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-tax-settings.md +166 -0
  604. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-country-status.md +54 -0
  605. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-tax-rate.md +116 -0
  606. package/dist/skills/fluentcart-developer/references/restapi/order-bumps.md +433 -0
  607. package/dist/skills/fluentcart-developer/references/{rest-api-orders.md → restapi/orders.md} +1212 -1462
  608. package/dist/skills/fluentcart-developer/references/restapi/pdf-templates.md +212 -0
  609. package/dist/skills/fluentcart-developer/references/{rest-api-products.md → restapi/products.md} +2485 -2697
  610. package/dist/skills/fluentcart-developer/references/restapi/public-shop.md +191 -0
  611. package/dist/skills/fluentcart-developer/references/restapi/reports.md +3773 -0
  612. package/dist/skills/fluentcart-developer/references/restapi/roles.md +403 -0
  613. package/dist/skills/fluentcart-developer/references/restapi/saved-views.md +136 -0
  614. package/dist/skills/fluentcart-developer/references/restapi/settings.md +1423 -0
  615. package/dist/skills/fluentcart-developer/references/{rest-api-shipping.md → restapi/shipping.md} +905 -800
  616. package/dist/skills/fluentcart-developer/references/restapi/subscriptions.md +1169 -0
  617. package/dist/skills/fluentcart-developer/references/restapi/tax.md +1551 -0
  618. package/dist/skills/fluentcart-developer/references/{rest-api-overview.md → restapi.md} +127 -131
  619. package/dist/skills/fluentcart-developer/scripts/cli.js +1 -1
  620. package/dist/version.d.ts +1 -1
  621. package/dist/version.js +1 -1
  622. package/package.json +66 -65
  623. package/dist/skills/fluentcart-developer/.claude-plugin/plugin.json +0 -12
  624. package/dist/skills/fluentcart-developer/.mcp.json +0 -11
  625. package/dist/skills/fluentcart-developer/references/action-hooks-admin-templates.md +0 -787
  626. package/dist/skills/fluentcart-developer/references/action-hooks-cart-checkout.md +0 -1355
  627. package/dist/skills/fluentcart-developer/references/action-hooks-customers-users.md +0 -266
  628. package/dist/skills/fluentcart-developer/references/action-hooks-licenses.md +0 -855
  629. package/dist/skills/fluentcart-developer/references/action-hooks-orders.md +0 -631
  630. package/dist/skills/fluentcart-developer/references/action-hooks-payments-integrations.md +0 -963
  631. package/dist/skills/fluentcart-developer/references/action-hooks-products-coupons.md +0 -585
  632. package/dist/skills/fluentcart-developer/references/action-hooks-subscriptions.md +0 -661
  633. package/dist/skills/fluentcart-developer/references/customer-dashboard-endpoints.md +0 -169
  634. package/dist/skills/fluentcart-developer/references/database-models-query-builder.md +0 -194
  635. package/dist/skills/fluentcart-developer/references/database-models-reference.md +0 -604
  636. package/dist/skills/fluentcart-developer/references/database-schema-reference.md +0 -947
  637. package/dist/skills/fluentcart-developer/references/engineering-notes.md +0 -154
  638. package/dist/skills/fluentcart-developer/references/filter-hooks-cart-checkout.md +0 -1202
  639. package/dist/skills/fluentcart-developer/references/filter-hooks-customers-subscriptions.md +0 -902
  640. package/dist/skills/fluentcart-developer/references/filter-hooks-integrations-advanced.md +0 -1598
  641. package/dist/skills/fluentcart-developer/references/filter-hooks-orders-payments.md +0 -1319
  642. package/dist/skills/fluentcart-developer/references/filter-hooks-products-pricing.md +0 -628
  643. package/dist/skills/fluentcart-developer/references/filter-hooks-settings-configuration.md +0 -1177
  644. package/dist/skills/fluentcart-developer/references/fluentcart-developer-guide.md +0 -154
  645. package/dist/skills/fluentcart-developer/references/hooks-complete-index.md +0 -834
  646. package/dist/skills/fluentcart-developer/references/models-complete-index.md +0 -912
  647. package/dist/skills/fluentcart-developer/references/modules-and-extensions-reference.md +0 -224
  648. package/dist/skills/fluentcart-developer/references/order-bump-module.md +0 -163
  649. package/dist/skills/fluentcart-developer/references/paddle-gateway-case-study.md +0 -1931
  650. package/dist/skills/fluentcart-developer/references/payment-gateway-integration.md +0 -761
  651. package/dist/skills/fluentcart-developer/references/rest-api-checkout.md +0 -288
  652. package/dist/skills/fluentcart-developer/references/rest-api-coupons.md +0 -801
  653. package/dist/skills/fluentcart-developer/references/rest-api-customer-profile.md +0 -190
  654. package/dist/skills/fluentcart-developer/references/rest-api-dashboard-utilities.md +0 -219
  655. package/dist/skills/fluentcart-developer/references/rest-api-email-notifications.md +0 -619
  656. package/dist/skills/fluentcart-developer/references/rest-api-files.md +0 -290
  657. package/dist/skills/fluentcart-developer/references/rest-api-integrations.md +0 -324
  658. package/dist/skills/fluentcart-developer/references/rest-api-labels-attributes.md +0 -321
  659. package/dist/skills/fluentcart-developer/references/rest-api-licensing.md +0 -174
  660. package/dist/skills/fluentcart-developer/references/rest-api-order-bumps.md +0 -200
  661. package/dist/skills/fluentcart-developer/references/rest-api-public-shop.md +0 -172
  662. package/dist/skills/fluentcart-developer/references/rest-api-reference.md +0 -552
  663. package/dist/skills/fluentcart-developer/references/rest-api-reports.md +0 -377
  664. package/dist/skills/fluentcart-developer/references/rest-api-roles-permissions.md +0 -147
  665. package/dist/skills/fluentcart-developer/references/rest-api-settings.md +0 -528
  666. package/dist/skills/fluentcart-developer/references/rest-api-subscriptions.md +0 -938
  667. package/dist/skills/fluentcart-developer/references/rest-api-tax.md +0 -356
  668. package/dist/skills/fluentcart-developer/references/shipping-module-guide.md +0 -126
  669. package/dist/skills/fluentcart-developer/references/software-licensing-sdk.md +0 -228
  670. package/dist/skills/fluentcart-developer/references/storage-drivers-module.md +0 -140
@@ -0,0 +1,3773 @@
1
+ # Reports API
2
+
3
+ Read sales, order, product, customer, coupon, source and subscription reports.
4
+
5
+ **Base URL:** `https://your-site.com/wp-json/fluent-cart/v2/reports`
6
+
7
+ **Policy:** `ReportPolicy`
8
+
9
+ **Required Permission:** `reports/view`
10
+
11
+ Amounts: cents or decimals
12
+
13
+ The unit of money fields differs per endpoint. Some reports return **cents** (e.g. `$10.00` = `1000`); others return **decimals** in major units (e.g. `10.00`). Each endpoint below states its unit.
14
+
15
+ Pro report endpoints
16
+
17
+ Endpoints marked **Pro Feature** are registered by FluentCart Pro (module API 2 or later). Without Pro they return `404`. Some core endpoints also return extra fields when Pro is active; those fields are named in the endpoint's description and come from the [report filters](/hooks/filters/settings-and-configuration.md#reports).
18
+
19
+ ---
20
+
21
+ ## Common Parameters
22
+
23
+ Most report endpoints read a `params` object from the query string (for example `?params[startDate]=2025-01-01`) and pass it through `ReportHelper::processParams()`. The parameters below are referred to as **Standard params** in each endpoint's table.
24
+
25
+ ### Standard Report Parameters
26
+
27
+ | Parameter | Type | Required | Description |
28
+ | --- | --- | --- | --- |
29
+ | `params[startDate]` | string | No | First day of the report period (`YYYY-MM-DD`). Read as a calendar day in the WordPress site timezone. |
30
+ | `params[endDate]` | string | No | Last day of the report period (`YYYY-MM-DD`), included. Site timezone. |
31
+ | `params[rangeKey]` | string | No | A date preset, resolved from today on the server: `today`, `last_7`, `last_30`, `this_month`, `last_month`, `last_12_months`, `year_to_date` or `all_time`. A known preset replaces `startDate` and `endDate` (`all_time` keeps the sent `startDate`). |
32
+ | `params[groupKey]` | string | No | Chart interval: `default`, `daily`, `monthly` or `yearly`. With `default` (or none), the interval follows the range: daily up to 91 days, monthly up to 365 days, yearly above. Send only these values. |
33
+ | `params[currency]` | string | No | Three-letter currency code. Defaults to the store's base currency. Endpoints that support it also accept `__all__`: every currency converted to the base currency. Elsewhere `__all__` reads as the base currency. A report never sums different currencies without conversion. |
34
+ | `params[filterMode]` | string | No | Payment mode: `live` or `test`. When not sent, live and test orders both count. |
35
+ | `params[variation_ids][]` | array | No | Product variation IDs. Limits the report to orders that contain these variations. |
36
+ | `params[compareType]` | string | No | Comparison period: `previous_period`, `previous_month`, `previous_quarter`, `previous_year` or `custom`. Needs `compareDate`. |
37
+ | `params[compareDate]` | string | No | Required with `compareType`. For `custom`, it is the first day of the compared period. For the other types, send any date (the period is computed from the report range). |
38
+
39
+ Report days, months and hours are store days in the WordPress site timezone. The server converts the range bounds to UTC before it queries the GMT columns.
40
+
41
+ ### Order Types
42
+
43
+ Endpoints that list `params[orderTypes][]` limit the report to these sale types: `payment` (one-time), `subscription` (new subscription), `renewal`, `installment` (installment sign-up) and `installment_payment`. An installment plan is a subscription with a fixed number of bills.
44
+
45
+ ### Report Statuses
46
+
47
+ Reports count orders with payment status `paid`, `partially-paid`, `refunded` or `partially-refunded`. A `params[paymentStatus]` value sent by the client is ignored.
48
+
49
+ ---
50
+
51
+ ## Metric Definitions
52
+
53
+ All reports share these definitions.
54
+
55
+ | Metric | Definition |
56
+ | --- | --- |
57
+ | **Net sales** | What the customer paid, less refunds and less the tax, shipping and fees the store kept. Every field this page calls net sales uses one formula (`ReportHelper::netSalesSql()`), so Revenue, Orders, Payment methods, Products, Locations, Coupons, Sources, Customers, Subscriptions and the dashboard tiles agree. |
58
+ | **Net revenue** | A different, older figure: paid, less refunds, less the tax not refunded. Shipping and fees stay in. Fields named `net_revenue` (Revenue report, Reports overview) use it. |
59
+ | **Gross sales** | Net sales plus discounts and refunded sales (the Revenue report's breakdown). |
60
+ | **Orders** | Every order in a report status, including $0 orders. |
61
+ | **New and returning customers** | A customer is new on their first paid purchase (`total_paid > 0`, not a renewal, in any currency). Later purchases make them returning. A $0 order never makes a customer new. Customer counts, repeat rate and lifetime value in the Products, Coupons, Sources, Customers overview and Pro customer reports count paid orders only. Exception: `customer-insights` reads every order in a report status. |
62
+ | **Locations** | In one location row, a customer counts once. A customer who is both new and returning there counts as new. |
63
+ | **Subscription renewals amount** | In the subscriptions overview, the renewals amount is the net sales of renewal orders. |
64
+ | **Dashboard tiles** | `GET /dashboard/stats` shows the Revenue report's figures for the last 30 store days, in all currencies converted to the base currency. See [Dashboard API](/restapi/dashboard.md#get-dashboard-stats). |
65
+
66
+ ---
67
+
68
+ ## Removed Endpoints
69
+
70
+ FluentCart removed these report endpoints because no screen called them. They now return `404`. Use the replacement listed.
71
+
72
+ | Removed endpoint | Use instead |
73
+ | --- | --- |
74
+ | `GET /reports/report-overview` | [`overview`](#get-reports-overview) |
75
+ | `GET /reports/quick-order-stats` | [`dashboard-stats`](#get-dashboard-stats) (the same order stat tiles) |
76
+ | `GET /reports/sales-report` | [`revenue`](#get-revenue-data) |
77
+ | `GET /reports/revenue-by-group` | [`revenue`](#get-revenue-data); by payment method: [`payment-methods`](#get-payment-methods); by country: [`locations`](#get-locations) |
78
+ | `GET /reports/fetch-order-by-group` | [`order-chart`](#get-order-chart); by payment method: [`payment-methods`](#get-payment-methods); by country: [`locations`](#get-locations) |
79
+ | `GET /reports/top-products-sold` | [`product-sales`](#get-product-sales) or [`fetch-top-sold-products`](#get-top-sold-products) |
80
+ | `GET /reports/fetch-top-sold-variants` | [`product-sales`](#get-product-sales) (each product row lists its variations) |
81
+ | `GET /reports/product-report` | [`product-sales`](#get-product-sales) |
82
+ | `GET /reports/product-performance` | [`product-sales`](#get-product-sales) |
83
+ | `GET /reports/customer-report` | [`customer-overview`](#get-customer-overview) |
84
+ | `GET /reports/search-repeat-customer` | No direct replacement. [`customer-insights`](#get-customer-insights) lists the top 100 customers by lifetime net sales and the repeat rates. |
85
+ | `GET /reports/refund-chart` | [`refunds-overview`](#get-refunds-overview) |
86
+ | `GET /reports/refund-data-by-group` | [`refunds-overview`](#get-refunds-overview) |
87
+ | `GET /reports/get-dashboard-summary` | No direct replacement (it counted products and coupons). For the dashboard tiles, use [`GET /dashboard/stats`](/restapi/dashboard.md#get-dashboard-stats). |
88
+ | `GET /reports/subscription-chart` | [`subscriptions-overview`](#get-subscriptions-overview) |
89
+ | `GET /reports/daily-signups` | [`subscriptions-overview`](#get-subscriptions-overview) (new subscriptions per period in `chart[].new`) |
90
+ | `GET /reports/retention-chart` | [`subscription-retention`](#get-subscription-retention) |
91
+ | `GET /reports/sales-growth` | [`sales-growth-chart`](#get-sales-growth-chart) (removed earlier) |
92
+
93
+ ---
94
+
95
+ ## Overview and Dashboard
96
+
97
+ ### Get Reports Overview
98
+
99
+ GET `/fluent-cart/v2/reports/overview`
100
+
101
+ Returns year-over-year gross and net revenue for the last 12 store months, the last 4 quarters and the top 5 billing countries, plus 24 months of net sales. The date range does not apply. The revenue series are in cents; `net_sales_months` is a decimal.
102
+
103
+ - **Permission:** `reports/view`
104
+ - **Operation page:** [Get Reports Overview](/restapi/operations/reports/get-overview.md)
105
+
106
+ #### Parameters
107
+
108
+ | Parameter | Type | Location | Required | Description |
109
+ | --- | --- | --- | --- | --- |
110
+ | `params[currency]` | string | query | No | 3-letter code. Defaults to the base currency. `__all__` applies only to `net_sales_months`; the other series read it as the base currency. |
111
+ | `params[net_sales_only]` | integer | query | No | `1` returns only `net_sales_months`. |
112
+ | `params[cached]` | integer | query | No | With `net_sales_only`, `1` lets the result come from a 10-minute cache. |
113
+
114
+ | Field | Meaning |
115
+ | --- | --- |
116
+ | `gross_revenue`, `net_revenue` | Per month: `current`, `prev` (same month a year earlier, or null) and `yoy_growth` (string percent, or null). Cents. |
117
+ | `*_quarterly` | Last 4 quarters: `current`, `prev_year`, `yy_growth`. Cents. |
118
+ | `gross_summary`, `net_summary` | 12-month `total`, `total_prev`, `yoy_growth`. Cents. |
119
+ | `top_country_net`, `top_country_gross` | Top 5 billing countries per month (`by_month`) and over the 12 months (`by_countries`). Cents. |
120
+ | `net_sales_months` | Last 24 store months of the Revenue report's net sales. Decimal. |
121
+
122
+ Gross = `total_paid`. `net_revenue` = paid − refunds − unrefunded tax; shipping and fees stay in, so it is not net sales.
123
+
124
+ #### Response
125
+
126
+ ```
127
+ {
128
+ "data": {
129
+ "gross_revenue": { "2025-01": { "current": 500000, "prev": 400000, "yoy_growth": "25.00" } },
130
+ "gross_revenue_quarterly": { "Q1-2025": { "current": 1500000, "prev_year": 1200000, "yy_growth": "25.00" } },
131
+ "net_revenue": { "2025-01": { "current": 450000, "prev": 360000, "yoy_growth": "25.00" } },
132
+ "net_revenue_quarterly": { "Q1-2025": { "current": 1350000, "prev_year": 1080000, "yy_growth": "25.00" } },
133
+ "gross_summary": { "total": 6000000, "total_prev": 4800000, "yoy_growth": "25.00" },
134
+ "net_summary": { "total": 5400000, "total_prev": 4320000, "yoy_growth": "25.00" },
135
+ "top_country_net": {
136
+ "by_month": { "2025-01": { "US": 300000, "GB": 100000 } },
137
+ "by_countries": { "US": 3600000, "GB": 1200000 }
138
+ },
139
+ "top_country_gross": { "by_month": { }, "by_countries": { } },
140
+ "net_sales_months": [ { "group": "2025-01", "net_sales": 4100.0 } ]
141
+ }
142
+ }
143
+ ```
144
+
145
+ #### Example
146
+
147
+ ```
148
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/overview?params[currency]=USD" \
149
+ -u "username:app_password"
150
+ ```
151
+
152
+ ---
153
+
154
+ ### Get Report Meta
155
+
156
+ GET `/fluent-cart/v2/reports/fetch-report-meta`
157
+
158
+ Returns what the report filters need: currencies with orders in the range, order counts per currency, the base currency, the earliest order date and the store mode. Dates are store-timezone strings.
159
+
160
+ - **Permission:** `reports/view`
161
+ - **Operation page:** [Get Report Meta](/restapi/operations/reports/fetch-report-meta.md)
162
+
163
+ #### Parameters
164
+
165
+ | Parameter | Type | Location | Required | Description |
166
+ | --- | --- | --- | --- | --- |
167
+ | `params[startDate]` | string | query | No | First store day for the currency lookup. |
168
+ | `params[endDate]` | string | query | No | Last store day for the currency lookup. |
169
+
170
+ `currencies` maps each code to its sign, most orders first. With more than one currency it also holds `__all__` (all currencies converted to the base currency), and `converted_excluded_orders` counts orders that cannot convert.
171
+
172
+ #### Response
173
+
174
+ ```
175
+ {
176
+ "currencies": { "USD": "$", "EUR": "€", "__all__": "$" },
177
+ "currency_order_counts": { "USD": 120, "EUR": 30 },
178
+ "default_currency": "USD",
179
+ "base_currency": "USD",
180
+ "converted_excluded_orders": 0,
181
+ "min_date": "2025-01-01 00:00:00",
182
+ "storeMode": "live",
183
+ "first_order_date": "2024-03-15 10:20:00"
184
+ }
185
+ ```
186
+
187
+ #### Example
188
+
189
+ ```
190
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/fetch-report-meta?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
191
+ -u "username:app_password"
192
+ ```
193
+
194
+ ---
195
+
196
+ ### Get Dashboard Stats
197
+
198
+ GET `/fluent-cart/v2/reports/dashboard-stats`
199
+
200
+ Returns four order tiles for a date range and for the previous period of the same length: all orders, paid orders, paid order items and paid order value. "Paid" means the report statuses (paid, partially paid, refunded, partially refunded). The paid order value is `SUM(total_paid)` in cents, not net sales.
201
+
202
+ The admin Orders page stat bar reads this endpoint. The Dashboard page tiles come from `GET /dashboard/stats` instead.
203
+
204
+ - **Permission:** `reports/view`
205
+ - **Operation page:** [Get Dashboard Stats](/restapi/operations/reports/dashboard-stats.md)
206
+
207
+ #### Parameters
208
+
209
+ | Parameter | Type | Location | Required | Description |
210
+ | --- | --- | --- | --- | --- |
211
+ | `params[startDate]` | string | query | No | First store day. With no dates the range runs from the first order to today. |
212
+ | `params[endDate]` | string | query | No | Last store day. |
213
+ | `params[currency]` | string | query | No | 3-letter code. Defaults to the base currency. `__all__` is not supported. |
214
+
215
+ #### Response
216
+
217
+ ```
218
+ {
219
+ "dashBoardStats": {
220
+ "total_orders": { "title": "All Orders", "icon": "AllOrdersIcon", "current_count": 150, "compare_count": 120 },
221
+ "paid_orders": { "title": "Paid Orders", "icon": "Money", "current_count": 140, "compare_count": 110 },
222
+ "total_paid_order_items": { "title": "Paid Order Items", "icon": "OrderItemsIcon", "current_count": 210, "compare_count": 180 },
223
+ "total_paid_amounts": { "title": "Order Value (Paid)", "icon": "OrderValueIcon", "current_count": 1250000, "compare_count": 1000000, "is_cents": true }
224
+ }
225
+ }
226
+ ```
227
+
228
+ #### Example
229
+
230
+ ```
231
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/dashboard-stats?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
232
+ -u "username:app_password"
233
+ ```
234
+
235
+ ---
236
+
237
+ ### Get Sales Growth Chart
238
+
239
+ GET `/fluent-cart/v2/reports/sales-growth-chart`
240
+
241
+ Returns orders and net sales per day, month or year in the range. `net_revenue` is the Revenue report's net sales, as a decimal. On-hold and failed orders are left out by default, and the range end is clamped to today.
242
+
243
+ - **Permission:** `reports/view`
244
+ - **Operation page:** [Get Sales Growth Chart](/restapi/operations/reports/sales-growth-chart.md)
245
+
246
+ #### Parameters
247
+
248
+ | Parameter | Type | Location | Required | Description |
249
+ | --- | --- | --- | --- | --- |
250
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `__all__` currency works. |
251
+ | `params[orderStatus][]` | array | query | No | Order statuses to leave out. Defaults to `on-hold` and `failed`. |
252
+
253
+ #### Response
254
+
255
+ ```
256
+ {
257
+ "salesGrowthChart": [
258
+ { "year": "2025", "group": "2025-01-01", "orders": 12, "net_revenue": 840.5 },
259
+ { "year": "2025", "group": "2025-01-02", "orders": 0, "net_revenue": 0 }
260
+ ]
261
+ }
262
+ ```
263
+
264
+ #### Example
265
+
266
+ ```
267
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/sales-growth-chart?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
268
+ -u "username:app_password"
269
+ ```
270
+
271
+ ---
272
+
273
+ ### Get Country Heat Map
274
+
275
+ GET `/fluent-cart/v2/reports/country-heat-map`
276
+
277
+ Returns the number of orders per billing country, smallest first. It counts every order with a billing address, of any status, in all currencies, over all time. The endpoint reads `params[currency]` but does not apply it. An unknown country code returns `country_code: null` and the name "Uncategorized".
278
+
279
+ - **Permission:** `reports/view`
280
+ - **Operation page:** [Get Country Heat Map](/restapi/operations/reports/country-heat-map.md)
281
+
282
+ #### Parameters
283
+
284
+ This endpoint takes no parameters.
285
+
286
+ #### Response
287
+
288
+ ```
289
+ {
290
+ "countryHeatMap": [
291
+ { "country_code": "GB", "name": "United Kingdom", "value": 20 },
292
+ { "country_code": "US", "name": "United States (US)", "value": 85 }
293
+ ]
294
+ }
295
+ ```
296
+
297
+ #### Example
298
+
299
+ ```
300
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/country-heat-map" \
301
+ -u "username:app_password"
302
+ ```
303
+
304
+ ---
305
+
306
+ ### Get Recent Orders
307
+
308
+ GET `/fluent-cart/v2/reports/get-recent-orders`
309
+
310
+ Returns the 10 newest orders of any status, with the customer name and item count. `total_amount` is a decimal in the order's own currency.
311
+
312
+ - **Permission:** `reports/view`
313
+ - **Operation page:** [Get Recent Orders](/restapi/operations/reports/get-recent-orders.md)
314
+
315
+ #### Parameters
316
+
317
+ This endpoint takes no parameters.
318
+
319
+ #### Response
320
+
321
+ ```
322
+ {
323
+ "recentOrders": [
324
+ {
325
+ "id": 1050,
326
+ "customer_id": 42,
327
+ "customer_name": "Jane Doe",
328
+ "total_amount": "49.0000",
329
+ "currency": "USD",
330
+ "created_at": "2025-01-31 14:20:00",
331
+ "order_items_count": 2
332
+ }
333
+ ]
334
+ }
335
+ ```
336
+
337
+ #### Example
338
+
339
+ ```
340
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/get-recent-orders" \
341
+ -u "username:app_password"
342
+ ```
343
+
344
+ ---
345
+
346
+ ### Get Recent Activities
347
+
348
+ GET `/fluent-cart/v2/reports/get-recent-activities`
349
+
350
+ Returns the 10 newest activity log entries. You can limit them to today, yesterday or this week in the store timezone.
351
+
352
+ - **Permission:** `reports/view`
353
+ - **Operation page:** [Get Recent Activities](/restapi/operations/reports/get-recent-activities.md)
354
+
355
+ #### Parameters
356
+
357
+ | Parameter | Type | Location | Required | Description |
358
+ | --- | --- | --- | --- | --- |
359
+ | `groupKey` | string | query | No | `all` (default), `today`, `yesterday` or `this_week`. Top-level, not inside `params`. |
360
+
361
+ #### Response
362
+
363
+ ```
364
+ {
365
+ "recentActivities": [
366
+ {
367
+ "title": "Order status updated",
368
+ "content": "Order status changed from processing to completed",
369
+ "created_at": "2025-01-31 14:25:00",
370
+ "created_by": "admin",
371
+ "module_name": "order",
372
+ "module_id": 1050
373
+ }
374
+ ]
375
+ }
376
+ ```
377
+
378
+ #### Example
379
+
380
+ ```
381
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/get-recent-activities?groupKey=today" \
382
+ -u "username:app_password"
383
+ ```
384
+
385
+ ---
386
+
387
+ ## Revenue and Orders
388
+
389
+ ### Get Revenue Data
390
+
391
+ GET `/fluent-cart/v2/reports/revenue`
392
+
393
+ Returns gross sales, net revenue, net sales and the sales breakdown per day, month or year, with totals and net sales by order type. Amounts are decimal currency units (cents divided by 100).
394
+
395
+ - **Permission:** `reports/view`
396
+ - **Operation page:** [Get Revenue Data](/restapi/operations/reports/get-revenue.md)
397
+
398
+ `net_revenue` is paid minus refunds minus the tax the store kept (shipping and fees stay in). `net_sales` is the Revenue report's net sales: paid minus refunds minus the tax, shipping and fees the store kept. `gross_sales` = `net_sales` + `discounts` + `refunds`. `total_collected` = `net_sales` + `shipping_net` + `fees` + `taxes_net`. With a comparison, `fluctuations` holds the percent change per summary key (`null` when the previous value is 0), and each `byOrderType` row gets `previous_net_sales` and `change`.
399
+
400
+ #### Parameters
401
+
402
+ | Parameter | Type | Location | Required | Description |
403
+ | --- | --- | --- | --- | --- |
404
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
405
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
406
+
407
+ | Field | Meaning |
408
+ | --- | --- |
409
+ | `total_sales` / `gross_sale` | Sum of `total_paid` (per bucket / in `summary`). |
410
+ | `net_revenue` | Paid − refunds − unrefunded tax. |
411
+ | `net_sales` | Paid − refunds − tax, shipping and fees kept. |
412
+ | `refunds` | Refunded sales without tax, shipping or fees. `total_refunds` / `total_refunded_amount` is the full refunded amount. |
413
+ | `shipping_net`, `fees`, `taxes_net` | Shipping, fees and tax the store kept after refunds. |
414
+ | `byOrderType[].share` | Percent of the period's net sales. |
415
+
416
+ #### Response
417
+
418
+ ```
419
+ {
420
+ "revenueReport": [
421
+ {
422
+ "year": "2025",
423
+ "group": "2025-01",
424
+ "total_sales": 1250.0,
425
+ "net_revenue": 1152.0,
426
+ "shipping_total": 50.0,
427
+ "total_tax": 38.0,
428
+ "total_refunds": 60.0,
429
+ "order_count": 42,
430
+ "refunded_orders": 2,
431
+ "discounts": 30.0,
432
+ "fees": 0,
433
+ "shipping_net": 45.0,
434
+ "taxes_net": 38.0,
435
+ "refunds": 55.0,
436
+ "net_sales": 1107.0,
437
+ "gross_sales": 1192.0,
438
+ "total_collected": 1190.0
439
+ }
440
+ ],
441
+ "summary": {
442
+ "net_revenue": 1152.0,
443
+ "gross_sale": 1250.0,
444
+ "total_refunded_amount": 60.0,
445
+ "tax_total": 38.0,
446
+ "shipping_total": 50.0,
447
+ "order_count": 42,
448
+ "refunded_orders": 2,
449
+ "discounts": 30.0,
450
+ "fees": 0,
451
+ "shipping_net": 45.0,
452
+ "taxes_net": 38.0,
453
+ "refunds": 55.0,
454
+ "net_sales": 1107.0,
455
+ "gross_sales": 1192.0,
456
+ "total_collected": 1190.0
457
+ },
458
+ "previousSummary": [],
459
+ "fluctuations": [],
460
+ "previousMetrics": [],
461
+ "appliedGroupKey": "monthly",
462
+ "compare_range": null,
463
+ "compare_ranges": {
464
+ "previous_period": {
465
+ "start": "2024-12-01 00:00:00",
466
+ "end": "2024-12-31 23:59:59"
467
+ },
468
+ "...": "..."
469
+ },
470
+ "byOrderType": [
471
+ {
472
+ "key": "payment",
473
+ "label": "One-time",
474
+ "orders": 30,
475
+ "net_sales": 800.0,
476
+ "average": 26.67,
477
+ "share": 72.27
478
+ },
479
+ {
480
+ "key": "renewal",
481
+ "label": "Renewal",
482
+ "orders": 12,
483
+ "net_sales": 307.0,
484
+ "average": 25.58,
485
+ "share": 27.73
486
+ }
487
+ ]
488
+ }
489
+ ```
490
+
491
+ #### Example
492
+
493
+ ```
494
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/revenue?params[startDate]=2025-01-01&params[endDate]=2025-06-30&params[groupKey]=monthly&params[compareType]=previous_period" \
495
+ -u "username:app_password"
496
+ ```
497
+
498
+ ---
499
+
500
+ ### Get Order Chart
501
+
502
+ GET `/fluent-cart/v2/reports/order-chart`
503
+
504
+ Returns order counts, items and money per day, month or year, with totals and rates. Amounts are decimal currency units.
505
+
506
+ - **Permission:** `reports/view`
507
+ - **Operation page:** [Get Order Chart](/restapi/operations/reports/order-chart.md)
508
+
509
+ `average_net` uses the Revenue report's net sales; `net_revenue` is paid minus refunds minus unrefunded tax. `monthly_net`, `monthly_gross`, `monthly_orders` and `monthly_items` appear in `summary` only when the range has orders. `refund_rate` is refunded orders as a percent of orders. With a comparison, `fluctuations` holds the percent change per summary key (`null` when the previous value is 0) and `previousChartData` holds the comparison buckets.
510
+
511
+ #### Parameters
512
+
513
+ | Parameter | Type | Location | Required | Description |
514
+ | --- | --- | --- | --- | --- |
515
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
516
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
517
+
518
+ | Field | Meaning |
519
+ | --- | --- |
520
+ | `gross_sale` | Sum of `total_paid`. |
521
+ | `net_sales` | Revenue report net sales. |
522
+ | `average_net` | `net_sales` / `order_count`. |
523
+ | `total_item_count` | Units on the orders (only the filtered variations when `variation_ids` is set). |
524
+ | `orders_per_day` | Orders per elapsed store day. |
525
+
526
+ #### Response
527
+
528
+ ```
529
+ {
530
+ "orderChartData": [
531
+ {
532
+ "group": "2025-01",
533
+ "year": "2025",
534
+ "gross_sale": 1250.0,
535
+ "net_revenue": 1152.0,
536
+ "order_count": 42,
537
+ "total_refund": 60.0,
538
+ "shipping_total": 50.0,
539
+ "tax_total": 38.0,
540
+ "average_net": 26.36,
541
+ "average_gross": 29.76,
542
+ "total_item_count": 50,
543
+ "average_order_items_count": 1.19,
544
+ "refunded_orders": 2,
545
+ "average_order_gross": 30,
546
+ "net_sales": 1107.0
547
+ }
548
+ ],
549
+ "summary": {
550
+ "net_revenue": 1152.0,
551
+ "net_sales": 1107.0,
552
+ "gross_sale": 1250.0,
553
+ "order_count": 42,
554
+ "total_item_count": 50,
555
+ "average_net": 26.36,
556
+ "average_order_items_count": 1.19,
557
+ "average_gross": 29.76,
558
+ "total_refund": 60.0,
559
+ "tax_total": 38.0,
560
+ "shipping_total": 50.0,
561
+ "refunded_orders": 2,
562
+ "monthly_net": 1152.0,
563
+ "monthly_gross": 1250.0,
564
+ "monthly_orders": 42,
565
+ "monthly_items": 50,
566
+ "refund_rate": 4.76,
567
+ "orders_per_day": 1.35,
568
+ "orders_per_month": 42
569
+ },
570
+ "previousSummary": [],
571
+ "fluctuations": [],
572
+ "compare_range": null,
573
+ "compare_ranges": {
574
+ "previous_period": {
575
+ "start": "2024-12-01 00:00:00",
576
+ "end": "2024-12-31 23:59:59"
577
+ },
578
+ "...": "..."
579
+ },
580
+ "previousChartData": []
581
+ }
582
+ ```
583
+
584
+ #### Example
585
+
586
+ ```
587
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/order-chart?params[startDate]=2025-01-01&params[endDate]=2025-01-31&params[groupKey]=daily" \
588
+ -u "username:app_password"
589
+ ```
590
+
591
+ ---
592
+
593
+ ### Get Order Mix
594
+
595
+ GET `/fluent-cart/v2/reports/order-mix`
596
+
597
+ Splits the period's orders four ways: sale type, order status, discounted orders, and physical orders by shipping status. Counts and percent shares only; no money fields.
598
+
599
+ - **Permission:** `reports/view`
600
+ - **Operation page:** [Get Order Mix](/restapi/operations/reports/order-mix.md)
601
+
602
+ Every split adds up to `total`. `share` is a percent of `total`, except `fulfillment.statuses[].share`, which is a percent of `fulfillment.orders` (physical orders only). Orders with no shipping status count as `unshipped`.
603
+
604
+ #### Parameters
605
+
606
+ | Parameter | Type | Location | Required | Description |
607
+ | --- | --- | --- | --- | --- |
608
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
609
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
610
+
611
+ #### Response
612
+
613
+ ```
614
+ {
615
+ "total": 120,
616
+ "types": [
617
+ {
618
+ "key": "payment",
619
+ "label": "One-time",
620
+ "orders": 80,
621
+ "share": 66.67
622
+ },
623
+ {
624
+ "key": "renewal",
625
+ "label": "Renewal",
626
+ "orders": 40,
627
+ "share": 33.33
628
+ }
629
+ ],
630
+ "statuses": [
631
+ {
632
+ "key": "completed",
633
+ "label": "Completed",
634
+ "orders": 100,
635
+ "share": 83.33
636
+ },
637
+ {
638
+ "key": "processing",
639
+ "label": "Processing",
640
+ "orders": 20,
641
+ "share": 16.67
642
+ }
643
+ ],
644
+ "discounted": {
645
+ "orders": 25,
646
+ "share": 20.83
647
+ },
648
+ "fulfillment": {
649
+ "orders": 30,
650
+ "statuses": [
651
+ {
652
+ "key": "shipped",
653
+ "label": "Shipped",
654
+ "orders": 20,
655
+ "share": 66.67
656
+ },
657
+ {
658
+ "key": "unshipped",
659
+ "label": "Unshipped",
660
+ "orders": 10,
661
+ "share": 33.33
662
+ }
663
+ ]
664
+ }
665
+ }
666
+ ```
667
+
668
+ #### Example
669
+
670
+ ```
671
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/order-mix?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
672
+ -u "username:app_password"
673
+ ```
674
+
675
+ ---
676
+
677
+ ### Get Failed Orders
678
+
679
+ GET `/fluent-cart/v2/reports/failed-orders`
680
+
681
+ Returns how many orders created in the range have the `failed` payment status, and the latest 10 of them. `total_amount` is in decimal currency units.
682
+
683
+ - **Permission:** `reports/view`
684
+ - **Operation page:** [Get Failed Orders](/restapi/operations/reports/failed-orders.md)
685
+
686
+ The payment status filter is always `failed` here. `created_at` is the order's GMT time. In `__all__` mode `total_amount` is converted to the base currency.
687
+
688
+ #### Parameters
689
+
690
+ | Parameter | Type | Location | Required | Description |
691
+ | --- | --- | --- | --- | --- |
692
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
693
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
694
+
695
+ #### Response
696
+
697
+ ```
698
+ {
699
+ "count": 12,
700
+ "orders": [
701
+ {
702
+ "order_id": 1001,
703
+ "customer_name": "Jane Doe",
704
+ "total_amount": 49.0,
705
+ "items": 1,
706
+ "payment_method": "stripe",
707
+ "created_at": "2025-01-20 10:15:00"
708
+ }
709
+ ]
710
+ }
711
+ ```
712
+
713
+ #### Example
714
+
715
+ ```
716
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/failed-orders?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
717
+ -u "username:app_password"
718
+ ```
719
+
720
+ ---
721
+
722
+ ### Get New vs Returning Customers
723
+
724
+ GET `/fluent-cart/v2/reports/fetch-new-vs-returning-customer`
725
+
726
+ Splits the period's orders by customer type: New, Returning, Renewal, Installment payment, Free order and Guest. Amounts are decimal currency units; `net_sales` is the Revenue report's net sales.
727
+
728
+ - **Permission:** `reports/view`
729
+ - **Operation page:** [Get New vs Returning Customers](/restapi/operations/reports/fetch-new-vs-returning-customer.md)
730
+
731
+ Each order gets one type, checked in this order: a renewal (`Installment payment` for an installment plan, else `Renewal`), `Guest` (no customer), `Free order` (nothing paid), `New` (the customer's first paid purchase), else `Returning`. `Installment payment` and `Free order` rows appear only when such orders exist. `customer_count` counts distinct customers inside one row, so a customer can appear in both `New` and `Returning`.
732
+
733
+ #### Parameters
734
+
735
+ | Parameter | Type | Location | Required | Description |
736
+ | --- | --- | --- | --- | --- |
737
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
738
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
739
+
740
+ #### Response
741
+
742
+ ```
743
+ {
744
+ "newVsReturning": [
745
+ {
746
+ "customer_type": "New",
747
+ "customer_count": 20,
748
+ "order_count": 20,
749
+ "gross_sales": 1000.0,
750
+ "net_sales": 900.0,
751
+ "average_gross": 50.0,
752
+ "average_net": 45.0
753
+ },
754
+ {
755
+ "customer_type": "Returning",
756
+ "customer_count": 8,
757
+ "order_count": 10,
758
+ "gross_sales": 500.0,
759
+ "net_sales": 450.0,
760
+ "average_gross": 50.0,
761
+ "average_net": 45.0
762
+ },
763
+ {
764
+ "customer_type": "Renewal",
765
+ "customer_count": 15,
766
+ "order_count": 15,
767
+ "gross_sales": 750.0,
768
+ "net_sales": 700.0,
769
+ "average_gross": 50.0,
770
+ "average_net": 46.67
771
+ },
772
+ {
773
+ "customer_type": "Guest",
774
+ "customer_count": 0,
775
+ "order_count": 0,
776
+ "gross_sales": 0,
777
+ "net_sales": 0,
778
+ "average_gross": 0,
779
+ "average_net": 0
780
+ }
781
+ ]
782
+ }
783
+ ```
784
+
785
+ #### Example
786
+
787
+ ```
788
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/fetch-new-vs-returning-customer?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
789
+ -u "username:app_password"
790
+ ```
791
+
792
+ ---
793
+
794
+ ### Get Payment Methods
795
+
796
+ GET `/fluent-cart/v2/reports/payment-methods`
797
+
798
+ Returns orders, money, refunds, failures and failing subscriptions per payment gateway, the totals, the previous period's totals and net sales by gateway over time. Amounts are decimal currency units; `net_sales` is the Revenue report's net sales.
799
+
800
+ - **Permission:** `reports/view`
801
+ - **Operation page:** [Get Payment Methods](/restapi/operations/reports/payment-methods.md)
802
+
803
+ A saved-card payment counts under the gateway that charged it. Disputes per gateway and sales by card brand are FluentCart Pro reports (`reports/payment-methods/disputes`, `reports/payment-methods/methods`); this endpoint removes the dispute fields from `rows` and `previous`, and keeps only `totals.dispute_rate`. `failing_subscriptions` and `mrr_at_risk` describe open-ended subscriptions failing or past due now, with no date filter. `success_rate` = orders / (orders + recorded failed charges). `previous` is `null` without a comparison.
804
+
805
+ #### Parameters
806
+
807
+ | Parameter | Type | Location | Required | Description |
808
+ | --- | --- | --- | --- | --- |
809
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
810
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
811
+
812
+ | Field | Meaning |
813
+ | --- | --- |
814
+ | `gross_sales` | Sum of `total_paid`. |
815
+ | `renewal_net` | Net sales of renewal orders. |
816
+ | `failed_orders` | Orders with the `failed` payment status. |
817
+ | `failed_charges`, `failed_charge_amount` | Failed charge transactions in the range (only some gateways record them). |
818
+ | `mrr_at_risk` | Monthly recurring revenue of the failing subscriptions. |
819
+ | `net_share` | Percent of all net sales. |
820
+ | `chart[].gateways` | Net sales per gateway key for the bucket. |
821
+
822
+ #### Response
823
+
824
+ ```
825
+ {
826
+ "rows": [
827
+ {
828
+ "gateway": "stripe",
829
+ "label": "Stripe",
830
+ "orders": 40,
831
+ "refunded_orders": 2,
832
+ "gross_sales": 2000.0,
833
+ "refunds": 100.0,
834
+ "net_sales": 1800.0,
835
+ "renewal_net": 600.0,
836
+ "refund_rate": 5.0,
837
+ "average_order": 50.0,
838
+ "failed_orders": 3,
839
+ "success_rate": 95.24,
840
+ "failed_charges": 2,
841
+ "failed_charge_amount": 100.0,
842
+ "failing_subscriptions": 1,
843
+ "mrr_at_risk": 20.0,
844
+ "net_share": 75.0
845
+ }
846
+ ],
847
+ "totals": {
848
+ "orders": 55,
849
+ "refunded_orders": 3,
850
+ "gross_sales": 2650.0,
851
+ "refunds": 120.0,
852
+ "net_sales": 2400.0,
853
+ "renewal_net": 800.0,
854
+ "refund_rate": 5.45,
855
+ "average_order": 48.18,
856
+ "failed_orders": 4,
857
+ "success_rate": 96.49,
858
+ "failed_charges": 2,
859
+ "failed_charge_amount": 100.0,
860
+ "failing_subscriptions": 1,
861
+ "mrr_at_risk": 20.0,
862
+ "net_share": 100,
863
+ "dispute_rate": 0
864
+ },
865
+ "previous": null,
866
+ "chart": [
867
+ {
868
+ "year": "2025",
869
+ "group": "2025-01-01",
870
+ "gateways": {
871
+ "paypal": 30.0,
872
+ "stripe": 120.0
873
+ }
874
+ }
875
+ ],
876
+ "compare_ranges": {
877
+ "previous_period": {
878
+ "start": "2024-12-01 00:00:00",
879
+ "end": "2024-12-31 23:59:59"
880
+ },
881
+ "...": "..."
882
+ }
883
+ }
884
+ ```
885
+
886
+ #### Example
887
+
888
+ ```
889
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/payment-methods?params[startDate]=2025-01-01&params[endDate]=2025-01-31&params[compareType]=previous_period" \
890
+ -u "username:app_password"
891
+ ```
892
+
893
+ ---
894
+
895
+ ### Get Locations
896
+
897
+ GET `/fluent-cart/v2/reports/locations`
898
+
899
+ Returns orders, customers and money by country. With FluentCart Pro it also drills down to states and cities and adds lifetime value, repeat rate and the biggest movers. Amounts are decimal currency units; `net_sales` is the Revenue report's net sales.
900
+
901
+ - **Permission:** `reports/view`
902
+ - **Operation page:** [Get Locations](/restapi/operations/reports/locations.md)
903
+
904
+ Without Pro, the report is always at country level (`level` is ignored) and `full` is `false`. Pro answers the `fluent_cart/report/locations` filter with the full report (`full: true`): `level`, `country` and `state` work, each row gets `average_ltv` and `repeat_rate` of the new customers it won, and `movers` lists the three biggest gains and drops in net sales against the comparison period.
905
+
906
+ An order's location is its latest address of the chosen type (shipping falls back to billing), else a renewal's parent order billing address, else the customer record's country, else `__unknown__`. In a row, a customer counts once: new wins over returning (`returning_customers` leaves out customers who are new there). Renewal orders count in `renewal_orders`, not as new or returning. With `variation_ids`, the money fields are the picked variations' share of each order.
907
+
908
+ #### Parameters
909
+
910
+ | Parameter | Type | Location | Required | Description |
911
+ | --- | --- | --- | --- | --- |
912
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
913
+ | `params[level]` | string | query | No | Pro only. `country` (default), `state` or `city`. Core always answers at country level. |
914
+ | `params[country]` | string | query | No | Pro only. Country code to drill into. Needed for `state` and `city`. |
915
+ | `params[state]` | string | query | No | Pro only. State for `city` level. `__unknown__` selects orders with no state. |
916
+ | `params[address_type]` | string | query | No | `billing` (default) or `shipping`. Shipping falls back to billing. |
917
+ | `params[with_summary]` | boolean | query | No | At `state` or `city` level, also return `summary` and `previous`. Country level always returns them. |
918
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
919
+
920
+ | Field | Meaning |
921
+ | --- | --- |
922
+ | `rows[].key` | Country code (upper case), state or city name; `__unknown__` for no location. |
923
+ | `rows[].net_change` | Percent change of net sales against the comparison period; `null` without one or when the previous net is 0. |
924
+ | `rows[].via_parent`, `via_customer` | Orders located from the parent order or the customer record. |
925
+ | `outsized` | At state level, a state with at least 50% of orders and 3x the next one (often a checkout default); else `null`. |
926
+ | `summary` | Store-wide cards. `international_*` are `null` when the store country is not set. |
927
+ | `movers` | Pro with a comparison only; else `null`. |
928
+
929
+ #### Response
930
+
931
+ ```
932
+ {
933
+ "level": "country",
934
+ "rows": [
935
+ {
936
+ "key": "US",
937
+ "unknown": false,
938
+ "orders": 40,
939
+ "customers": 30,
940
+ "new_customers": 18,
941
+ "returning_customers": 7,
942
+ "new_orders": 18,
943
+ "returning_orders": 9,
944
+ "renewal_orders": 13,
945
+ "gross_sales": 2000.0,
946
+ "refunds": 100.0,
947
+ "net_sales": 1800.0,
948
+ "average_net_order": 45.0,
949
+ "refund_rate": 5.0,
950
+ "via_parent": 2,
951
+ "via_customer": 1,
952
+ "previous_net": null,
953
+ "net_change": null,
954
+ "net_share": 75.0
955
+ }
956
+ ],
957
+ "totals": {
958
+ "orders": 55,
959
+ "customers": 42,
960
+ "new_customers": 25,
961
+ "returning_customers": 9,
962
+ "new_orders": 25,
963
+ "returning_orders": 12,
964
+ "renewal_orders": 18,
965
+ "gross_sales": 2650.0,
966
+ "refunds": 120.0,
967
+ "net_sales": 2400.0,
968
+ "average_net_order": 43.64,
969
+ "refund_rate": 5.45,
970
+ "via_parent": 3,
971
+ "via_customer": 1
972
+ },
973
+ "sources": {
974
+ "parent_order": 3,
975
+ "customer_record": 1
976
+ },
977
+ "outsized": null,
978
+ "summary": {
979
+ "store_country": "US",
980
+ "net_sales": 2400.0,
981
+ "orders": 55,
982
+ "international_net": 600.0,
983
+ "international_share": 25.0,
984
+ "international_new_customers": 7,
985
+ "countries": 6,
986
+ "top_country": "US",
987
+ "top_share": 75.0
988
+ },
989
+ "previous": null,
990
+ "movers": null,
991
+ "full": false,
992
+ "compare_ranges": {
993
+ "previous_period": {
994
+ "start": "2024-12-01 00:00:00",
995
+ "end": "2024-12-31 23:59:59"
996
+ },
997
+ "...": "..."
998
+ }
999
+ }
1000
+ ```
1001
+
1002
+ #### Example
1003
+
1004
+ ```
1005
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/locations?params[startDate]=2025-01-01&params[endDate]=2025-01-31&params[level]=state&params[country]=US" \
1006
+ -u "username:app_password"
1007
+ ```
1008
+
1009
+ ---
1010
+
1011
+ ## Order Patterns
1012
+
1013
+ These endpoints moved from core to FluentCart Pro. Without Pro they return `404`.
1014
+
1015
+ ### Get Order Value Distribution
1016
+
1017
+ GET `/fluent-cart/v2/reports/order-value-distribution`
1018
+
1019
+ Pro Feature
1020
+
1021
+ This endpoint requires FluentCart Pro.
1022
+
1023
+ Counts the orders in the range by order total, in steps of 100 in the report currency. A bucket key such as `100-200` means a total above 100.00 and up to 200.00 (`total_amount`, cents 10001-20000). Every value is an order count.
1024
+
1025
+ - **Permission:** `reports/view`
1026
+ - **Operation page:** [Get Order Value Distribution](/restapi/operations/reports/order-value-distribution.md)
1027
+
1028
+ #### Parameters
1029
+
1030
+ | Parameter | Type | Location | Required | Description |
1031
+ | --- | --- | --- | --- | --- |
1032
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1033
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1034
+
1035
+ `params[currency]=__all__` works (orders are converted to the base currency first).
1036
+
1037
+ #### Response
1038
+
1039
+ ```
1040
+ {
1041
+ "data": {
1042
+ "0-100": 42,
1043
+ "100-200": 18,
1044
+ "200-300": 7,
1045
+ "300-400": 3,
1046
+ "400-500": 1,
1047
+ "500-600": 0,
1048
+ "600-700": 0,
1049
+ "700-800": 0,
1050
+ "800-900": 0,
1051
+ "900-1000": 0,
1052
+ "1000+": 2
1053
+ }
1054
+ }
1055
+ ```
1056
+
1057
+ #### Example
1058
+
1059
+ ```
1060
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/order-value-distribution?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1061
+ -u "username:app_password"
1062
+ ```
1063
+
1064
+ ---
1065
+
1066
+ ### Get Report by Day and Hour
1067
+
1068
+ GET `/fluent-cart/v2/reports/fetch-report-by-day-and-hour`
1069
+
1070
+ Pro Feature
1071
+
1072
+ This endpoint requires FluentCart Pro.
1073
+
1074
+ Groups the orders in the range by weekday and hour of the store's local time. `gross_sale` is the sum of `total_paid` in decimal currency units (not cents), before refunds.
1075
+
1076
+ - **Permission:** `reports/view`
1077
+ - **Operation page:** [Get Report by Day and Hour](/restapi/operations/reports/fetch-report-by-day-and-hour.md)
1078
+
1079
+ #### Parameters
1080
+
1081
+ | Parameter | Type | Location | Required | Description |
1082
+ | --- | --- | --- | --- | --- |
1083
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1084
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1085
+
1086
+ `params[currency]=__all__` works.
1087
+
1088
+ #### Response
1089
+
1090
+ | Field | Meaning |
1091
+ | --- | --- |
1092
+ | `orderByDayAndHour` | 24 rows, one per hour. `hour` is a label in the site's time format (`3 PM` or `15`); each weekday key holds an order count. |
1093
+ | `grossSaleByDay` | 7 rows, Sunday first. `day` is 1 (Sunday) to 7 (Saturday); it stays `0` for a weekday with no orders. |
1094
+ | `grossSaleByHour` | 24 rows: `hour` label, `gross_sale` (decimal), `order_count`. |
1095
+
1096
+ ```
1097
+ {
1098
+ "orderByDayAndHour": [
1099
+ {
1100
+ "hour": "12 AM",
1101
+ "Sunday": 0,
1102
+ "Monday": 2,
1103
+ "Tuesday": 1,
1104
+ "Wednesday": 0,
1105
+ "Thursday": 3,
1106
+ "Friday": 1,
1107
+ "Saturday": 0
1108
+ }
1109
+ ],
1110
+ "grossSaleByDay": [
1111
+ {
1112
+ "day": 1,
1113
+ "gross_sale": 450.0,
1114
+ "order_count": 5
1115
+ },
1116
+ {
1117
+ "day": 0,
1118
+ "gross_sale": 0,
1119
+ "order_count": 0
1120
+ }
1121
+ ],
1122
+ "grossSaleByHour": [
1123
+ {
1124
+ "hour": "12 AM",
1125
+ "gross_sale": 320.0,
1126
+ "order_count": 7
1127
+ }
1128
+ ]
1129
+ }
1130
+ ```
1131
+
1132
+ #### Example
1133
+
1134
+ ```
1135
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/fetch-report-by-day-and-hour?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1136
+ -u "username:app_password"
1137
+ ```
1138
+
1139
+ ---
1140
+
1141
+ ### Get Item Count Distribution
1142
+
1143
+ GET `/fluent-cart/v2/reports/item-count-distribution`
1144
+
1145
+ Pro Feature
1146
+
1147
+ This endpoint requires FluentCart Pro.
1148
+
1149
+ Counts the orders in the range by the number of items in each order (the sum of line quantities). No money fields.
1150
+
1151
+ - **Permission:** `reports/view`
1152
+ - **Operation page:** [Get Item Count Distribution](/restapi/operations/reports/item-count-distribution.md)
1153
+
1154
+ #### Parameters
1155
+
1156
+ | Parameter | Type | Location | Required | Description |
1157
+ | --- | --- | --- | --- | --- |
1158
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1159
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1160
+
1161
+ `params[currency]=__all__` works. With `params[variation_ids][]`, only the lines of those variations are counted.
1162
+
1163
+ #### Response
1164
+
1165
+ ```
1166
+ {
1167
+ "data": [
1168
+ {
1169
+ "order_count": 120,
1170
+ "item_count": 1
1171
+ },
1172
+ {
1173
+ "order_count": 35,
1174
+ "item_count": 2
1175
+ },
1176
+ {
1177
+ "order_count": 6,
1178
+ "item_count": 3
1179
+ }
1180
+ ]
1181
+ }
1182
+ ```
1183
+
1184
+ #### Example
1185
+
1186
+ ```
1187
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/item-count-distribution?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1188
+ -u "username:app_password"
1189
+ ```
1190
+
1191
+ ---
1192
+
1193
+ ### Get Order Completion Time
1194
+
1195
+ GET `/fluent-cart/v2/reports/order-completion-time`
1196
+
1197
+ Pro Feature
1198
+
1199
+ This endpoint requires FluentCart Pro.
1200
+
1201
+ Counts the orders in the range by the whole hours between `created_at` and `completed_at`. Orders with no `completed_at` are left out. No money fields.
1202
+
1203
+ - **Permission:** `reports/view`
1204
+ - **Operation page:** [Get Order Completion Time](/restapi/operations/reports/order-completion-time.md)
1205
+
1206
+ #### Parameters
1207
+
1208
+ | Parameter | Type | Location | Required | Description |
1209
+ | --- | --- | --- | --- | --- |
1210
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1211
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1212
+
1213
+ `params[currency]=__all__` works.
1214
+
1215
+ #### Response
1216
+
1217
+ ```
1218
+ {
1219
+ "data": [
1220
+ {
1221
+ "hour": 0,
1222
+ "orders": 140
1223
+ },
1224
+ {
1225
+ "hour": 1,
1226
+ "orders": 12
1227
+ },
1228
+ {
1229
+ "hour": 24,
1230
+ "orders": 3
1231
+ }
1232
+ ]
1233
+ }
1234
+ ```
1235
+
1236
+ #### Example
1237
+
1238
+ ```
1239
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/order-completion-time?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1240
+ -u "username:app_password"
1241
+ ```
1242
+
1243
+ ---
1244
+
1245
+ ### Get Weeks Between Refund
1246
+
1247
+ GET `/fluent-cart/v2/reports/weeks-between-refund`
1248
+
1249
+ Pro Feature
1250
+
1251
+ This endpoint requires FluentCart Pro.
1252
+
1253
+ Counts orders by the weeks from the order to its first refund. The range applies to the date of the first refund, not the order date. A refund on day 0 to 7 is week 1. No money fields.
1254
+
1255
+ - **Permission:** `reports/view`
1256
+ - **Operation page:** [Get Weeks Between Refund](/restapi/operations/reports/weeks-between-refund.md)
1257
+
1258
+ #### Parameters
1259
+
1260
+ | Parameter | Type | Location | Required | Description |
1261
+ | --- | --- | --- | --- | --- |
1262
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1263
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1264
+
1265
+ `params[currency]=__all__` works. The order filters (currency, mode, sale type, variations) still apply to the refunded orders.
1266
+
1267
+ #### Response
1268
+
1269
+ ```
1270
+ {
1271
+ "data": [
1272
+ {
1273
+ "occurrence": 8,
1274
+ "weekBetween": 1
1275
+ },
1276
+ {
1277
+ "occurrence": 3,
1278
+ "weekBetween": 2
1279
+ },
1280
+ {
1281
+ "occurrence": 1,
1282
+ "weekBetween": 6
1283
+ }
1284
+ ]
1285
+ }
1286
+ ```
1287
+
1288
+ #### Example
1289
+
1290
+ ```
1291
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/weeks-between-refund?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1292
+ -u "username:app_password"
1293
+ ```
1294
+
1295
+ ---
1296
+
1297
+ ## Payment Methods
1298
+
1299
+ ### Get Payment Method Disputes
1300
+
1301
+ GET `/fluent-cart/v2/reports/payment-methods/disputes`
1302
+
1303
+ Pro Feature
1304
+
1305
+ This endpoint requires FluentCart Pro.
1306
+
1307
+ Returns disputes per payment gateway, with totals and the previous period's totals. `dispute_amount` is in decimal currency units (not cents). `dispute_rate` is a percent.
1308
+
1309
+ `disputed_orders` counts orders placed in the range whose charge was disputed (failed orders included). `disputes_lost` and `dispute_amount` count lost-dispute transactions dated in the range. `dispute_rate` = disputed orders / (orders + failed disputed orders) x 100. A saved-card payment counts under the gateway that charged it.
1310
+
1311
+ - **Permission:** `reports/view`
1312
+ - **Operation page:** [Get Payment Method Disputes](/restapi/operations/reports/payment-methods-disputes.md)
1313
+
1314
+ #### Parameters
1315
+
1316
+ | Parameter | Type | Location | Required | Description |
1317
+ | --- | --- | --- | --- | --- |
1318
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1319
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1320
+
1321
+ `params[currency]=__all__` works. `previous` is `null` unless `params[compareType]` and `params[compareDate]` are sent.
1322
+
1323
+ #### Response
1324
+
1325
+ | Field | Meaning |
1326
+ | --- | --- |
1327
+ | `orders` | Report orders (paid, partially paid, refunded, partially refunded) placed in the range. |
1328
+ | `disputed_orders` | Orders placed in the range whose charge was disputed, failed orders included. |
1329
+ | `dispute_rate` | `disputed_orders` / (`orders` + failed disputed orders) x 100. |
1330
+ | `disputes_lost` | Lost-dispute transactions dated in the range. |
1331
+ | `dispute_amount` | Sum of those lost disputes, decimal. |
1332
+
1333
+ ```
1334
+ {
1335
+ "rows": [
1336
+ {
1337
+ "gateway": "stripe",
1338
+ "label": "Stripe",
1339
+ "orders": 400,
1340
+ "disputed_orders": 4,
1341
+ "dispute_rate": 1.0,
1342
+ "disputes_lost": 1,
1343
+ "dispute_amount": 49.0
1344
+ }
1345
+ ],
1346
+ "totals": {
1347
+ "orders": 520,
1348
+ "disputed_orders": 4,
1349
+ "dispute_rate": 0.77,
1350
+ "disputes_lost": 1,
1351
+ "dispute_amount": 49.0
1352
+ },
1353
+ "previous": {
1354
+ "orders": 480,
1355
+ "disputed_orders": 2,
1356
+ "dispute_rate": 0.42,
1357
+ "disputes_lost": 0,
1358
+ "dispute_amount": 0.0
1359
+ }
1360
+ }
1361
+ ```
1362
+
1363
+ #### Example
1364
+
1365
+ ```
1366
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/payment-methods/disputes?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1367
+ -u "username:app_password"
1368
+ ```
1369
+
1370
+ ---
1371
+
1372
+ ### Get Payment Method Types
1373
+
1374
+ GET `/fluent-cart/v2/reports/payment-methods/methods`
1375
+
1376
+ Pro Feature
1377
+
1378
+ This endpoint requires FluentCart Pro.
1379
+
1380
+ Returns net sales by the card brand or payment method type that each order's charge recorded (Visa, PayPal, SEPA Direct Debit, ...). `net_sales` is in decimal currency units (not cents) and uses the Revenue report's net sales.
1381
+
1382
+ Orders with no recognised brand or method are left out of `rows`. `orders` is the number of orders that had one, and `coverage` is that number as a percent of all report orders in the range. `net_share` is a percent of the net sales in `rows`.
1383
+
1384
+ - **Permission:** `reports/view`
1385
+ - **Operation page:** [Get Payment Method Types](/restapi/operations/reports/payment-methods-methods.md)
1386
+
1387
+ #### Parameters
1388
+
1389
+ | Parameter | Type | Location | Required | Description |
1390
+ | --- | --- | --- | --- | --- |
1391
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1392
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1393
+
1394
+ `params[currency]=__all__` works.
1395
+
1396
+ #### Response
1397
+
1398
+ | Field | Meaning |
1399
+ | --- | --- |
1400
+ | `rows[].method` | Brand or method key, e.g. `visa`, `paypal`, `card` (card, brand not recorded). |
1401
+ | `rows[].net_sales` | Net sales, decimal. |
1402
+ | `rows[].net_share` | Percent of the net sales in `rows`. |
1403
+ | `orders` | Orders with a recorded brand or method. |
1404
+ | `coverage` | `orders` as a percent of all report orders in the range. |
1405
+
1406
+ ```
1407
+ {
1408
+ "rows": [
1409
+ {
1410
+ "method": "visa",
1411
+ "label": "Visa",
1412
+ "orders": 210,
1413
+ "net_share": 62.5,
1414
+ "net_sales": 12500.0
1415
+ },
1416
+ {
1417
+ "method": "paypal",
1418
+ "label": "PayPal",
1419
+ "orders": 90,
1420
+ "net_share": 37.5,
1421
+ "net_sales": 7500.0
1422
+ }
1423
+ ],
1424
+ "orders": 300,
1425
+ "coverage": 75.0
1426
+ }
1427
+ ```
1428
+
1429
+ #### Example
1430
+
1431
+ ```
1432
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/payment-methods/methods?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1433
+ -u "username:app_password"
1434
+ ```
1435
+
1436
+ ---
1437
+
1438
+ ## Refunds
1439
+
1440
+ ### Get Refunds Overview
1441
+
1442
+ GET `/fluent-cart/v2/reports/refunds-overview`
1443
+
1444
+ Returns the refunds made in the period: totals, full vs partial, a chart, splits by sale type and payment method, reasons and refund rates. Amounts are decimal currency units.
1445
+
1446
+ - **Permission:** `reports/view`
1447
+ - **Operation page:** [Get Refunds Overview](/restapi/operations/reports/refunds-overview.md)
1448
+
1449
+ Money out counts on the refund date, on orders of any date. Refund rates divide by the orders placed in the period: `refund_rate_cohort` (period orders refunded at all), `refund_rate_orders` (orders refunded in the period / orders placed), `refund_rate_amount` (refunded amount / paid amount). A rate is `null` when no orders were placed. `median_days` counts store calendar days from order to its first refund. `by_product` (the 10 most refunded products, by order date) is a FluentCart Pro report: it appears only when the `fluent_cart/report/refund_products` filter returns true. With a comparison, `fluctuations` gives rates as a point difference and other keys as a percent change (`null` when the previous value is 0).
1450
+
1451
+ #### Parameters
1452
+
1453
+ | Parameter | Type | Location | Required | Description |
1454
+ | --- | --- | --- | --- | --- |
1455
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
1456
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
1457
+
1458
+ | Field | Meaning |
1459
+ | --- | --- |
1460
+ | `summary.refunded_amount` | Sum of refund transactions in the period. |
1461
+ | `chart[].refund_rate` | Orders refunded in the bucket / orders placed in it; `null` when none were placed. |
1462
+ | `reasons.coverage` | Percent of refunds that have a reason; `top` is the 5 most common. |
1463
+ | `by_product[].sold` | Line totals sold, with tax added on top of the price (Pro). |
1464
+
1465
+ #### Response
1466
+
1467
+ ```
1468
+ {
1469
+ "summary": {
1470
+ "refunded_amount": 300.0,
1471
+ "refunds": 6,
1472
+ "refunded_orders": 5,
1473
+ "average_refund": 50.0,
1474
+ "full": {
1475
+ "count": 3,
1476
+ "amount": 220.0
1477
+ },
1478
+ "partial": {
1479
+ "count": 2,
1480
+ "amount": 80.0
1481
+ },
1482
+ "refund_rate_cohort": 4.0,
1483
+ "refund_rate_orders": 5.0,
1484
+ "refund_rate_amount": 3.5,
1485
+ "median_days": 4.0
1486
+ },
1487
+ "chart": [
1488
+ {
1489
+ "year": "2025",
1490
+ "group": "2025-01-01",
1491
+ "amount": 50.0,
1492
+ "count": 1,
1493
+ "refunded_orders": 1,
1494
+ "orders": 4,
1495
+ "refund_rate": 25.0
1496
+ }
1497
+ ],
1498
+ "by_sale_type": [
1499
+ {
1500
+ "key": "payment",
1501
+ "label": "One-time",
1502
+ "amount": 200.0,
1503
+ "refunds": 4
1504
+ }
1505
+ ],
1506
+ "by_payment_method": [
1507
+ {
1508
+ "key": "stripe",
1509
+ "label": "stripe",
1510
+ "amount": 250.0,
1511
+ "refunds": 5
1512
+ }
1513
+ ],
1514
+ "by_product": [
1515
+ {
1516
+ "variation_id": 12,
1517
+ "product": "Pro Plan",
1518
+ "variation": "Yearly",
1519
+ "sold": 1000.0,
1520
+ "refunded": 100.0,
1521
+ "refunded_orders": 2,
1522
+ "refund_rate": 10.0
1523
+ }
1524
+ ],
1525
+ "reasons": {
1526
+ "coverage": 50.0,
1527
+ "top": [
1528
+ {
1529
+ "reason": "Not needed",
1530
+ "count": 2
1531
+ }
1532
+ ]
1533
+ },
1534
+ "previousSummary": null,
1535
+ "previousChart": [],
1536
+ "fluctuations": [],
1537
+ "compare_range": null,
1538
+ "compare_ranges": {
1539
+ "previous_period": {
1540
+ "start": "2024-12-01 00:00:00",
1541
+ "end": "2024-12-31 23:59:59"
1542
+ },
1543
+ "...": "..."
1544
+ }
1545
+ }
1546
+ ```
1547
+
1548
+ #### Example
1549
+
1550
+ ```
1551
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/refunds-overview?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1552
+ -u "username:app_password"
1553
+ ```
1554
+
1555
+ ---
1556
+
1557
+ ## Products
1558
+
1559
+ ### Get Product Sales
1560
+
1561
+ GET `/fluent-cart/v2/reports/product-sales`
1562
+
1563
+ Returns one row per product with its variations, the totals and a chart. Each order's payment, refunds and net sales are shared across its lines by line amount. Amounts are integers in cents; `net` is the Revenue report's net sales.
1564
+
1565
+ - **Permission:** `reports/view`
1566
+ - **Operation page:** [Get Product Sales](/restapi/operations/reports/product-sales.md)
1567
+
1568
+ `net` splits into `new_net` (non-renewal orders), `renewal_net` and `installment_net`. `units` leaves out signup-fee and fee lines. A $0 order counts as an order; `customers` and `new_customers` count paid orders only. `refund_rate` is `refunds` / `gross` as a percent. With a comparison, `previous` holds the comparison totals and each product gets `previous_net`; else `previous` and `previous_net` are `null`. Lines with no variation (fees, custom items) count in `summary` only.
1569
+
1570
+ #### Parameters
1571
+
1572
+ | Parameter | Type | Location | Required | Description |
1573
+ | --- | --- | --- | --- | --- |
1574
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
1575
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
1576
+
1577
+ #### Response
1578
+
1579
+ ```
1580
+ {
1581
+ "summary": {
1582
+ "gross": 250000,
1583
+ "refunds": 10000,
1584
+ "net": 220000,
1585
+ "new_net": 150000,
1586
+ "renewal_net": 60000,
1587
+ "installment_net": 10000,
1588
+ "units": 120,
1589
+ "orders": 100,
1590
+ "customers": 80,
1591
+ "new_customers": 50,
1592
+ "refund_rate": 4.0,
1593
+ "average_order": 2200
1594
+ },
1595
+ "previous": null,
1596
+ "products": [
1597
+ {
1598
+ "product_id": 10,
1599
+ "product_title": "Pro Plan",
1600
+ "orders": 60,
1601
+ "customers": 50,
1602
+ "new_customers": 30,
1603
+ "variations": [
1604
+ {
1605
+ "variation_id": 12,
1606
+ "variation_title": "Yearly",
1607
+ "orders": 60,
1608
+ "gross": 150000,
1609
+ "refunds": 5000,
1610
+ "net": 135000,
1611
+ "new_net": 90000,
1612
+ "renewal_net": 45000,
1613
+ "installment_net": 0,
1614
+ "units": 60,
1615
+ "customers": 50,
1616
+ "new_customers": 30,
1617
+ "refund_rate": 3.3
1618
+ }
1619
+ ],
1620
+ "gross": 150000,
1621
+ "refunds": 5000,
1622
+ "net": 135000,
1623
+ "new_net": 90000,
1624
+ "renewal_net": 45000,
1625
+ "installment_net": 0,
1626
+ "units": 60,
1627
+ "refund_rate": 3.3,
1628
+ "previous_net": null
1629
+ }
1630
+ ],
1631
+ "chart": [
1632
+ {
1633
+ "year": "2025",
1634
+ "group": "2025-01-01",
1635
+ "units": 4,
1636
+ "new_net": 5000,
1637
+ "renewal_net": 2000,
1638
+ "installment_net": 0
1639
+ }
1640
+ ],
1641
+ "compare_ranges": {
1642
+ "previous_period": {
1643
+ "start": "2024-12-01 00:00:00",
1644
+ "end": "2024-12-31 23:59:59"
1645
+ },
1646
+ "...": "..."
1647
+ }
1648
+ }
1649
+ ```
1650
+
1651
+ #### Example
1652
+
1653
+ ```
1654
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/product-sales?params[startDate]=2025-01-01&params[endDate]=2025-01-31&params[compareType]=previous_period" \
1655
+ -u "username:app_password"
1656
+ ```
1657
+
1658
+ ---
1659
+
1660
+ ### Get Top Sold Products
1661
+
1662
+ GET `/fluent-cart/v2/reports/fetch-top-sold-products`
1663
+
1664
+ Returns the 20 products with the most units sold in the range. `total_amount` is in decimal currency units: the line totals after order-level discounts, before refunds.
1665
+
1666
+ - **Permission:** `reports/view`
1667
+ - **Operation page:** [Get Top Sold Products](/restapi/operations/reports/fetch-top-sold-products.md)
1668
+
1669
+ With `variation_ids`, only the lines of those variations count (other lines on the same order stay out). `media` is the product thumbnail URL or `null`. `product_name` is the title from the latest order line.
1670
+
1671
+ #### Parameters
1672
+
1673
+ | Parameter | Type | Location | Required | Description |
1674
+ | --- | --- | --- | --- | --- |
1675
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
1676
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
1677
+
1678
+ #### Response
1679
+
1680
+ ```
1681
+ {
1682
+ "topSoldProducts": [
1683
+ {
1684
+ "product_id": 10,
1685
+ "product_name": "Pro Plan",
1686
+ "quantity_sold": 60,
1687
+ "total_amount": 1500.0,
1688
+ "media": "https://example.com/wp-content/uploads/pro-plan.png"
1689
+ }
1690
+ ]
1691
+ }
1692
+ ```
1693
+
1694
+ #### Example
1695
+
1696
+ ```
1697
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/fetch-top-sold-products?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1698
+ -u "username:app_password"
1699
+ ```
1700
+
1701
+ ---
1702
+
1703
+ ### Get Product Detail
1704
+
1705
+ GET `/fluent-cart/v2/reports/product-detail`
1706
+
1707
+ Pro Feature
1708
+
1709
+ This endpoint requires FluentCart Pro.
1710
+
1711
+ Returns the detail of one product: its paid orders in the range, the products bought in the same orders, and its subscriptions. Subscription `mrr` values are in decimal currency units (not cents).
1712
+
1713
+ Orders count only paid orders (`total_paid` > 0) that are not renewals. `bought_together` lists at most 5 products; `share` is the percent of this product's orders that also hold the other product. `subscriptions` covers every variant of the product: live count and MRR now, and renewals paid and lost in the range. It is `null` when no variant or subscription of the product is found.
1714
+
1715
+ - **Permission:** `reports/view`
1716
+ - **Operation page:** [Get Product Detail](/restapi/operations/reports/product-detail.md)
1717
+
1718
+ #### Parameters
1719
+
1720
+ | Parameter | Type | Location | Required | Description |
1721
+ | --- | --- | --- | --- | --- |
1722
+ | `product_id` | integer | query | Yes | The product (post) ID. Top-level, not inside `params`. |
1723
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1724
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1725
+
1726
+ `params[currency]=__all__` works. `params[variation_ids][]` limits the product's variants; when empty, all of its variants count.
1727
+
1728
+ #### Response
1729
+
1730
+ ```
1731
+ {
1732
+ "orders": 120,
1733
+ "bought_together": [
1734
+ {
1735
+ "product_id": 55,
1736
+ "product_title": "Add-on Pack",
1737
+ "orders": 30,
1738
+ "share": 25.0
1739
+ }
1740
+ ],
1741
+ "subscriptions": {
1742
+ "subscriptions": 40,
1743
+ "mrr": 1200.0,
1744
+ "canceling": {
1745
+ "count": 3,
1746
+ "mrr": 90.0
1747
+ },
1748
+ "failing": {
1749
+ "count": 2,
1750
+ "mrr": 60.0
1751
+ },
1752
+ "renewals_paid": 25,
1753
+ "renewals_lost": 5,
1754
+ "renewal_rate": 83.3
1755
+ }
1756
+ }
1757
+ ```
1758
+
1759
+ #### Example
1760
+
1761
+ ```
1762
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/product-detail?product_id=42&params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1763
+ -u "username:app_password"
1764
+ ```
1765
+
1766
+ ---
1767
+
1768
+ ### Get Product Comparison
1769
+
1770
+ GET `/fluent-cart/v2/reports/product-comparison`
1771
+
1772
+ Pro Feature
1773
+
1774
+ This endpoint requires FluentCart Pro.
1775
+
1776
+ Compares up to 6 products or variations side by side: a summary, a chart per period, subscriptions and customer overlap. Summary and chart money fields are in cents; subscription `mrr` values are in decimal currency units.
1777
+
1778
+ Each line takes its share of the order's net sales (the Revenue report's net sales). `new_net` comes from non-renewal orders; `renewal_net` and `installment_net` split renewal orders. A $0 order counts as an order, but `customers` and `new_customers` count paid customers only. `overlap` pairs use item indexes: of `from`'s customers in the range, `both` have ever bought `to`, and `to_first` bought `to` first.
1779
+
1780
+ - **Permission:** `reports/view`
1781
+ - **Operation page:** [Get Product Comparison](/restapi/operations/reports/product-comparison.md)
1782
+
1783
+ #### Parameters
1784
+
1785
+ | Parameter | Type | Location | Required | Description |
1786
+ | --- | --- | --- | --- | --- |
1787
+ | `items[]` | array | query | Yes | Item keys, top-level: `p:` (whole product) or `v:` (one variation). At most 6; repeats and other values are dropped. |
1788
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1789
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1790
+
1791
+ `params[currency]=__all__` works. `previous` is `null` unless a compare period is sent.
1792
+
1793
+ #### Response
1794
+
1795
+ | Field | Meaning |
1796
+ | --- | --- |
1797
+ | `summary` | Cents: `gross`, `refunds`, `net`, `new_net`, `renewal_net`, `installment_net`, `average_order` (net / orders), `average_price` (net / units). Counts: `units`, `orders`, `customers`, `new_customers`. `refund_rate`: refunds / gross x 100. |
1798
+ | `chart[]` | One point per bucket: `group`, `net`, `units`, `orders`, `new_customers`, `new_net`, `renewal_net`, `installment_net` (cents). |
1799
+ | `subscriptions` | Live `subscriptions`, `mrr` (decimal), `canceling` and `failing` (`count`, `mrr`), `renewals_paid`, `renewals_lost`, `renewal_rate`. |
1800
+ | `overlap[]` | `from`, `to` (item indexes), `customers`, `both`, `to_first`. |
1801
+ | `compare_ranges` | Start and end of each compare type for this range, store time. |
1802
+
1803
+ ```
1804
+ {
1805
+ "items": [
1806
+ {
1807
+ "key": "p:42",
1808
+ "type": "product",
1809
+ "id": 42,
1810
+ "product_id": 42,
1811
+ "title": "Pro Plugin",
1812
+ "subtitle": "",
1813
+ "summary": {
1814
+ "gross": 500000,
1815
+ "refunds": 20000,
1816
+ "net": 450000,
1817
+ "new_net": 300000,
1818
+ "renewal_net": 150000,
1819
+ "installment_net": 0,
1820
+ "units": 100,
1821
+ "orders": 95,
1822
+ "customers": 90,
1823
+ "new_customers": 60,
1824
+ "refund_rate": 4.0,
1825
+ "average_order": 4737,
1826
+ "average_price": 4500
1827
+ },
1828
+ "previous": null,
1829
+ "chart": [
1830
+ {
1831
+ "group": "2025-01",
1832
+ "net": 450000,
1833
+ "units": 100,
1834
+ "orders": 95,
1835
+ "new_customers": 60,
1836
+ "new_net": 300000,
1837
+ "renewal_net": 150000,
1838
+ "installment_net": 0
1839
+ }
1840
+ ],
1841
+ "subscriptions": {
1842
+ "subscriptions": 40,
1843
+ "mrr": 1200.0,
1844
+ "canceling": {
1845
+ "count": 3,
1846
+ "mrr": 90.0
1847
+ },
1848
+ "failing": {
1849
+ "count": 2,
1850
+ "mrr": 60.0
1851
+ },
1852
+ "renewals_paid": 25,
1853
+ "renewals_lost": 5,
1854
+ "renewal_rate": 83.3
1855
+ }
1856
+ }
1857
+ ],
1858
+ "buckets": [
1859
+ "2025-01"
1860
+ ],
1861
+ "group_key": "monthly",
1862
+ "item_limit": 6,
1863
+ "overlap": [
1864
+ {
1865
+ "from": 0,
1866
+ "to": 1,
1867
+ "customers": 90,
1868
+ "both": 12,
1869
+ "to_first": 4
1870
+ }
1871
+ ],
1872
+ "compare_ranges": {
1873
+ "previous_period": {
1874
+ "start": "2024-12-01 00:00:00",
1875
+ "end": "2024-12-31 23:59:59"
1876
+ },
1877
+ "previous_month": {
1878
+ "start": "2024-12-01 00:00:00",
1879
+ "end": "2024-12-31 23:59:59"
1880
+ },
1881
+ "previous_quarter": {
1882
+ "start": "2024-10-01 00:00:00",
1883
+ "end": "2024-10-31 23:59:59"
1884
+ },
1885
+ "previous_year": {
1886
+ "start": "2024-01-01 00:00:00",
1887
+ "end": "2024-01-31 23:59:59"
1888
+ }
1889
+ }
1890
+ }
1891
+ ```
1892
+
1893
+ #### Example
1894
+
1895
+ ```
1896
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/product-comparison?items[]=p:42&items[]=v:108&params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
1897
+ -u "username:app_password"
1898
+ ```
1899
+
1900
+ ---
1901
+
1902
+ ### Get Product Comparison Since Launch
1903
+
1904
+ GET `/fluent-cart/v2/reports/product-comparison-launch`
1905
+
1906
+ Pro Feature
1907
+
1908
+ This endpoint requires FluentCart Pro.
1909
+
1910
+ For each compared item, returns net sales and units per store month from its launch month. `net` is in cents and uses the Revenue report's net sales. The date range is ignored.
1911
+
1912
+ The launch month is the first of three months in a row with net sales; a younger item launches with its first month with net sales. Months run to the item's last month with a sale, at most 60. `launched_at` and `months` are empty when the item has no paid sale.
1913
+
1914
+ - **Permission:** `reports/view`
1915
+ - **Operation page:** [Get Product Comparison Since Launch](/restapi/operations/reports/product-comparison-launch.md)
1916
+
1917
+ #### Parameters
1918
+
1919
+ | Parameter | Type | Location | Required | Description |
1920
+ | --- | --- | --- | --- | --- |
1921
+ | `items[]` | array | query | Yes | Item keys, top-level: `p:` or `v:`. At most 6. |
1922
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
1923
+ | `params[orderTypes][]` | array | query | No | Sale types to include: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. Default: all. |
1924
+
1925
+ The dates, `rangeKey` and `variation_ids` are ignored: each item reads from its first sale to now. `params[currency]=__all__` works.
1926
+
1927
+ #### Response
1928
+
1929
+ ```
1930
+ {
1931
+ "items": [
1932
+ {
1933
+ "key": "p:42",
1934
+ "type": "product",
1935
+ "id": 42,
1936
+ "product_id": 42,
1937
+ "title": "Pro Plugin",
1938
+ "subtitle": "",
1939
+ "launched_at": "2024-03-01 00:00:00",
1940
+ "months": [
1941
+ {
1942
+ "month": "2024-03",
1943
+ "net": 120000,
1944
+ "units": 30
1945
+ },
1946
+ {
1947
+ "month": "2024-04",
1948
+ "net": 95000,
1949
+ "units": 24
1950
+ }
1951
+ ]
1952
+ }
1953
+ ]
1954
+ }
1955
+ ```
1956
+
1957
+ #### Example
1958
+
1959
+ ```
1960
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/product-comparison-launch?items[]=p:42&items[]=v:108" \
1961
+ -u "username:app_password"
1962
+ ```
1963
+
1964
+ ---
1965
+
1966
+ ## Customers
1967
+
1968
+ ### Get Customer Overview
1969
+
1970
+ GET `/fluent-cart/v2/reports/customer-overview`
1971
+
1972
+ Returns the customers who paid in the period, split into new, returning and renewing, with their net sales, the repeat purchase rate, average lifetime value and a chart. Amounts are integers in cents; net figures are the Revenue report's net sales.
1973
+
1974
+ - **Permission:** `reports/view`
1975
+ - **Operation page:** [Get Customer Overview](/restapi/operations/reports/customer-overview.md)
1976
+
1977
+ Only orders with a customer and a paid amount above 0 count. Each customer gets one kind: new (first purchase in the range) before returning (bought again, not a renewal) before renewing (renewals only). `repeat_rate` is the share with two or more purchases (renewals are not purchases) and `average_ltv` the average lifetime net, both over each customer's history up to the range end. `previous` (comparison period) has the same keys without `repeat_rate` and `average_ltv`; it is `null` without a comparison.
1978
+
1979
+ #### Parameters
1980
+
1981
+ | Parameter | Type | Location | Required | Description |
1982
+ | --- | --- | --- | --- | --- |
1983
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
1984
+
1985
+ #### Response
1986
+
1987
+ ```
1988
+ {
1989
+ "summary": {
1990
+ "customers": 80,
1991
+ "new_customers": 50,
1992
+ "returning_customers": 10,
1993
+ "renewing_customers": 20,
1994
+ "new_net": 150000,
1995
+ "returning_net": 30000,
1996
+ "renewal_net": 40000,
1997
+ "net": 220000,
1998
+ "repeat_rate": 22.5,
1999
+ "average_ltv": 4500
2000
+ },
2001
+ "previous": null,
2002
+ "chart": [
2003
+ {
2004
+ "year": "2025",
2005
+ "group": "2025-01-01",
2006
+ "new_customers": 2,
2007
+ "returning_customers": 1,
2008
+ "renewing_customers": 1,
2009
+ "new_net": 6000,
2010
+ "returning_net": 2000,
2011
+ "renewal_net": 1500
2012
+ }
2013
+ ],
2014
+ "compare_ranges": {
2015
+ "previous_period": {
2016
+ "start": "2024-12-01 00:00:00",
2017
+ "end": "2024-12-31 23:59:59"
2018
+ },
2019
+ "...": "..."
2020
+ }
2021
+ }
2022
+ ```
2023
+
2024
+ #### Example
2025
+
2026
+ ```
2027
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/customer-overview?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
2028
+ -u "username:app_password"
2029
+ ```
2030
+
2031
+ ---
2032
+
2033
+ ### Get Customer Insights
2034
+
2035
+ GET `/fluent-cart/v2/reports/customer-insights`
2036
+
2037
+ Returns repeat rates, lifetime value and the top 100 customers by lifetime net, for customers with an order in the range. Amounts are decimal currency units; net figures are the Revenue report's net sales.
2038
+
2039
+ - **Permission:** `reports/view`
2040
+ - **Operation page:** [Get Customer Insights](/restapi/operations/reports/customer-insights.md)
2041
+
2042
+ A customer's history is every order with a report payment status (paid, partially paid, refunded, partially refunded) up to the range end, in the report currency. `repeat_any` counts customers with two or more orders of any type; `repeat_new` counts two or more purchases (one-time or new subscription). `range_net` is the net of orders from the range start. This endpoint reads only the date range and currency: `filterMode`, `variation_ids` and comparison params have no effect.
2043
+
2044
+ #### Parameters
2045
+
2046
+ | Parameter | Type | Location | Required | Description |
2047
+ | --- | --- | --- | --- | --- |
2048
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). Only the date range and currency apply. `params[currency]=__all__` works. |
2049
+
2050
+ #### Response
2051
+
2052
+ ```
2053
+ {
2054
+ "summary": {
2055
+ "customers": 80,
2056
+ "repeat_any": 30,
2057
+ "repeat_any_rate": 37.5,
2058
+ "repeat_new": 12,
2059
+ "repeat_new_rate": 15.0,
2060
+ "lifetime_net": 6000.0,
2061
+ "average_ltv": 75.0,
2062
+ "range_net": 2200.0,
2063
+ "average_range_net": 27.5
2064
+ },
2065
+ "top_customers": [
2066
+ {
2067
+ "customer_id": 7,
2068
+ "name": "Jane Doe",
2069
+ "email": "[email protected]",
2070
+ "orders": 6,
2071
+ "renewals": 4,
2072
+ "lifetime_net": 400.0,
2073
+ "range_net": 50.0,
2074
+ "first_order_at": "2023-03-01 09:00:00",
2075
+ "last_order_at": "2025-01-15 12:00:00"
2076
+ }
2077
+ ]
2078
+ }
2079
+ ```
2080
+
2081
+ #### Example
2082
+
2083
+ ```
2084
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/customer-insights?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
2085
+ -u "username:app_password"
2086
+ ```
2087
+
2088
+ ---
2089
+
2090
+ ### Get Customer Value
2091
+
2092
+ GET `/fluent-cart/v2/reports/customer-value`
2093
+
2094
+ Pro Feature
2095
+
2096
+ This endpoint requires FluentCart Pro.
2097
+
2098
+ Returns customer lifetime value by first-purchase month, value by first product, and revenue concentration. Amounts are in cents and use the Revenue report's net sales. Only paid orders (`total_paid` > 0) with a customer count.
2099
+
2100
+ `cohorts` covers the 12 months ending with the range's last month; `values[n]` is the average cumulative net per customer after month n (at most 24 months). A customer is gained in a month when their first non-renewal paid order is there, with no earlier paid purchase in any currency. `first_products` covers customers gained in the range; `repeat_rate` is the percent who made another non-renewal purchase. `concentration.period` is the percent of net sales from the top 1, 5, 10, 20 and 50 percent of customers in the range; customers with net 0 or less are left out. `concentration.lifetime` is `null` unless `span=lifetime` is sent.
2101
+
2102
+ - **Permission:** `reports/view`
2103
+ - **Operation page:** [Get Customer Value](/restapi/operations/reports/customer-value.md)
2104
+
2105
+ #### Parameters
2106
+
2107
+ | Parameter | Type | Location | Required | Description |
2108
+ | --- | --- | --- | --- | --- |
2109
+ | `span` | string | query | No | Top-level. `lifetime` returns only `{ "concentration": { "lifetime": [...] } }`, read over all time. |
2110
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
2111
+
2112
+ `params[currency]=__all__` works. `params[filterMode]`, `params[variation_ids][]` and `params[orderTypes]` are not used.
2113
+
2114
+ #### Response
2115
+
2116
+ | Field | Meaning |
2117
+ | --- | --- |
2118
+ | `cohorts[]` | `cohort` (Y-m), `customers`, `values[]` (average cumulative net per customer, cents). |
2119
+ | `first_products[]` | `product_id`, `product_title`, `customers`, `average_value` (cents), `repeat_rate` (percent). |
2120
+ | `concentration.period[]` | `top` (percent tier), `customers` in the tier, `share` (percent of net sales). |
2121
+
2122
+ ```
2123
+ {
2124
+ "cohorts": [
2125
+ {
2126
+ "cohort": "2024-02",
2127
+ "customers": 40,
2128
+ "values": [
2129
+ 5000,
2130
+ 6200,
2131
+ 7100
2132
+ ]
2133
+ }
2134
+ ],
2135
+ "first_products": [
2136
+ {
2137
+ "product_id": 42,
2138
+ "product_title": "Pro Plugin",
2139
+ "customers": 25,
2140
+ "average_value": 8900,
2141
+ "repeat_rate": 32.0
2142
+ }
2143
+ ],
2144
+ "concentration": {
2145
+ "period": [
2146
+ {
2147
+ "top": 1,
2148
+ "customers": 1,
2149
+ "share": 12.5
2150
+ },
2151
+ {
2152
+ "top": 5,
2153
+ "customers": 3,
2154
+ "share": 30.0
2155
+ },
2156
+ {
2157
+ "top": 10,
2158
+ "customers": 5,
2159
+ "share": 42.0
2160
+ },
2161
+ {
2162
+ "top": 20,
2163
+ "customers": 10,
2164
+ "share": 60.0
2165
+ },
2166
+ {
2167
+ "top": 50,
2168
+ "customers": 25,
2169
+ "share": 85.0
2170
+ }
2171
+ ],
2172
+ "lifetime": null
2173
+ }
2174
+ }
2175
+ ```
2176
+
2177
+ #### Example
2178
+
2179
+ ```
2180
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/customer-value?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
2181
+ -u "username:app_password"
2182
+ ```
2183
+
2184
+ ---
2185
+
2186
+ ### Get Customer Repeat Purchases
2187
+
2188
+ GET `/fluent-cart/v2/reports/customer-repeat`
2189
+
2190
+ Pro Feature
2191
+
2192
+ This endpoint requires FluentCart Pro.
2193
+
2194
+ Returns how many purchases and orders each customer made, and the time to a second purchase. No money fields. Only paid orders (`total_paid` > 0) with a customer count.
2195
+
2196
+ `purchases` and `orders` cover customers who paid in the range, over their history up to the range end. Purchases leave out renewals, so a customer who paid only renewals is in bucket `0`; `orders` include renewals. `second_purchase` covers customers gained in the 12 months ending with the range's last month: `repeaters` made another non-renewal purchase, and `median_days` is the median days to it.
2197
+
2198
+ - **Permission:** `reports/view`
2199
+ - **Operation page:** [Get Customer Repeat Purchases](/restapi/operations/reports/customer-repeat.md)
2200
+
2201
+ #### Parameters
2202
+
2203
+ | Parameter | Type | Location | Required | Description |
2204
+ | --- | --- | --- | --- | --- |
2205
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
2206
+
2207
+ `params[currency]=__all__` works. `params[filterMode]` and `params[variation_ids][]` pick the customers who paid in the range; their history is not filtered by them.
2208
+
2209
+ #### Response
2210
+
2211
+ ```
2212
+ {
2213
+ "purchases": [
2214
+ {
2215
+ "bucket": "0",
2216
+ "customers": 2
2217
+ },
2218
+ {
2219
+ "bucket": "1",
2220
+ "customers": 80
2221
+ },
2222
+ {
2223
+ "bucket": "2",
2224
+ "customers": 15
2225
+ },
2226
+ {
2227
+ "bucket": "3",
2228
+ "customers": 4
2229
+ },
2230
+ {
2231
+ "bucket": "4",
2232
+ "customers": 1
2233
+ },
2234
+ {
2235
+ "bucket": "5+",
2236
+ "customers": 1
2237
+ }
2238
+ ],
2239
+ "orders": [
2240
+ {
2241
+ "bucket": "1",
2242
+ "customers": 70
2243
+ },
2244
+ {
2245
+ "bucket": "2",
2246
+ "customers": 20
2247
+ },
2248
+ {
2249
+ "bucket": "3",
2250
+ "customers": 7
2251
+ },
2252
+ {
2253
+ "bucket": "4",
2254
+ "customers": 3
2255
+ },
2256
+ {
2257
+ "bucket": "5+",
2258
+ "customers": 3
2259
+ }
2260
+ ],
2261
+ "second_purchase": {
2262
+ "customers": 500,
2263
+ "repeaters": 90,
2264
+ "repeat_rate": 18.0,
2265
+ "median_days": 45,
2266
+ "buckets": [
2267
+ {
2268
+ "bucket": "0-7",
2269
+ "customers": 10
2270
+ },
2271
+ {
2272
+ "bucket": "8-30",
2273
+ "customers": 25
2274
+ },
2275
+ {
2276
+ "bucket": "31-90",
2277
+ "customers": 30
2278
+ },
2279
+ {
2280
+ "bucket": "91-180",
2281
+ "customers": 15
2282
+ },
2283
+ {
2284
+ "bucket": "181-365",
2285
+ "customers": 8
2286
+ },
2287
+ {
2288
+ "bucket": "365+",
2289
+ "customers": 2
2290
+ }
2291
+ ]
2292
+ }
2293
+ }
2294
+ ```
2295
+
2296
+ #### Example
2297
+
2298
+ ```
2299
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/customer-repeat?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
2300
+ -u "username:app_password"
2301
+ ```
2302
+
2303
+ ---
2304
+
2305
+ ### Get Customer Segments
2306
+
2307
+ GET `/fluent-cart/v2/reports/customer-segments`
2308
+
2309
+ Pro Feature
2310
+
2311
+ This endpoint requires FluentCart Pro.
2312
+
2313
+ Places every customer with a paid order in the report currency into one RFM segment, as of now. Amounts are in cents and use the Revenue report's net sales. The date range is ignored.
2314
+
2315
+ Recency (days since the last order) and money (lifetime net) score 1-5 by the store's own quintiles (`cuts`, read from at most 20,000 customers). Frequency scores by order count: 1, 2, 3, 4-5, 6+. Segments, in order: `champions`, `loyal`, `new`, `promising`, `at_risk`, `cant_lose`, `hibernating`. Pass `cuts` and `as_of` to [Get Customer Segment Customers](/restapi/operations/reports/customer-segment-customers.md) so the export reads the same segments.
2316
+
2317
+ - **Permission:** `reports/view`
2318
+ - **Operation page:** [Get Customer Segments](/restapi/operations/reports/customer-segments.md)
2319
+
2320
+ #### Parameters
2321
+
2322
+ | Parameter | Type | Location | Required | Description |
2323
+ | --- | --- | --- | --- | --- |
2324
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
2325
+
2326
+ Only `params[currency]` is used (`__all__` works). Dates, `filterMode` and `variation_ids` are ignored.
2327
+
2328
+ #### Response
2329
+
2330
+ | Field | Meaning |
2331
+ | --- | --- |
2332
+ | `net` | Lifetime net sales of all scored customers, cents. |
2333
+ | `segments[]` | `key`, `customers`, `net` (cents), `share` (percent of `net`), `average_orders`, `average_days` (since last order), `average_net` (cents). |
2334
+ | `cuts` | Quintile cut points: `days` and `net` (cents), four integers each. |
2335
+ | `as_of` | UTC time the segments were read at. |
2336
+
2337
+ ```
2338
+ {
2339
+ "customers": 1000,
2340
+ "net": 9000000,
2341
+ "segments": [
2342
+ {
2343
+ "key": "champions",
2344
+ "customers": 50,
2345
+ "net": 2500000,
2346
+ "share": 27.8,
2347
+ "average_orders": 6.2,
2348
+ "average_days": 20,
2349
+ "average_net": 50000
2350
+ }
2351
+ ],
2352
+ "cuts": {
2353
+ "days": [
2354
+ 30,
2355
+ 90,
2356
+ 180,
2357
+ 365
2358
+ ],
2359
+ "net": [
2360
+ 2000,
2361
+ 5000,
2362
+ 10000,
2363
+ 25000
2364
+ ]
2365
+ },
2366
+ "as_of": "2025-02-01 10:00:00"
2367
+ }
2368
+ ```
2369
+
2370
+ #### Example
2371
+
2372
+ ```
2373
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/customer-segments?params[currency]=USD" \
2374
+ -u "username:app_password"
2375
+ ```
2376
+
2377
+ ---
2378
+
2379
+ ### Get Customer Segment Customers
2380
+
2381
+ GET `/fluent-cart/v2/reports/customer-segment-customers`
2382
+
2383
+ Pro Feature
2384
+
2385
+ This endpoint requires FluentCart Pro.
2386
+
2387
+ Lists the customers of one RFM segment for a CSV export, highest lifetime net first. `net` is in cents and uses the Revenue report's net sales.
2388
+
2389
+ Also needs the `customers/export` permission; without it the route returns 403. An unknown `segment` returns `{"total": 0, "data": []}`.
2390
+
2391
+ - **Permission:** `reports/view` and `customers/export`
2392
+ - **Operation page:** [Get Customer Segment Customers](/restapi/operations/reports/customer-segment-customers.md)
2393
+
2394
+ #### Parameters
2395
+
2396
+ | Parameter | Type | Location | Required | Description |
2397
+ | --- | --- | --- | --- | --- |
2398
+ | `segment` | string | query | Yes | Top-level. One of `champions`, `loyal`, `new`, `promising`, `at_risk`, `cant_lose`, `hibernating`. |
2399
+ | `page` | integer | query | No | Top-level. Page number. Default `1`. |
2400
+ | `per_page` | integer | query | No | Top-level. Rows per page, 1-1000. Default `1000`. |
2401
+ | `cuts[days][]`, `cuts[net][]` | array | query | No | Top-level. The four cut points of each from Get Customer Segments. Default: read again. |
2402
+ | `as_of` | string | query | No | Top-level. UTC `Y-m-d H:i:s` from Get Customer Segments. Default: now. |
2403
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
2404
+
2405
+ Only `params[currency]` of the standard params is used (`__all__` works).
2406
+
2407
+ #### Response
2408
+
2409
+ ```
2410
+ {
2411
+ "total": 50,
2412
+ "data": [
2413
+ {
2414
+ "customer_id": 7,
2415
+ "name": "Jane Doe",
2416
+ "email": "[email protected]",
2417
+ "orders": 6,
2418
+ "net": 60000,
2419
+ "last_order": "2025-01-20 14:00:00"
2420
+ }
2421
+ ]
2422
+ }
2423
+ ```
2424
+
2425
+ #### Example
2426
+
2427
+ ```
2428
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/customer-segment-customers?segment=champions&page=1&per_page=500&params[currency]=USD" \
2429
+ -u "username:app_password"
2430
+ ```
2431
+
2432
+ ---
2433
+
2434
+ ## Coupons
2435
+
2436
+ ### Get Coupons
2437
+
2438
+ GET `/fluent-cart/v2/reports/coupons`
2439
+
2440
+ Returns one row per coupon used in the range with orders, customers, sales, discount and refunds, plus totals and the discount given without a coupon row. Amounts are decimal currency units; `net_sales` is the Revenue report's net sales.
2441
+
2442
+ - **Permission:** `reports/view`
2443
+ - **Operation page:** [Get Coupons](/restapi/operations/reports/coupons.md)
2444
+
2445
+ An order with several coupons shares its money by each coupon's discount. A renamed coupon stays one row under its current code; `used_as` lists the other codes it was used under. A deleted coupon keeps its rows under its code (`coupon_id` `null`). Rows sort by orders. `no_code` covers orders with a coupon discount in the header but no coupon row (for example imported renewals).
2446
+
2447
+ Without FluentCart Pro the rows and totals leave out `won_ltv`, `first_order_net`, `later_net`, `lifetime_net` and `refund_rate`. Pro adds them through the `fluent_cart/report/coupon_quality` filter.
2448
+
2449
+ #### Parameters
2450
+
2451
+ | Parameter | Type | Location | Required | Description |
2452
+ | --- | --- | --- | --- | --- |
2453
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
2454
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
2455
+
2456
+ | Field | Meaning |
2457
+ | --- | --- |
2458
+ | `discount_rate` | Discount as a percent of gross + discount. |
2459
+ | `first_order_net` | Pro. Net sales of first orders (one-time or new subscription) with the coupon. |
2460
+ | `later_net` | Pro. Net sales of those orders' renewals, any date. |
2461
+ | `won_ltv` | Pro. Average lifetime net to date of the new customers the coupon won. |
2462
+
2463
+ #### Response
2464
+
2465
+ ```
2466
+ {
2467
+ "rows": [
2468
+ {
2469
+ "coupon_key": "3",
2470
+ "coupon_id": 3,
2471
+ "code": "SAVE10",
2472
+ "used_as": [],
2473
+ "title": "Save 10%",
2474
+ "orders": 20,
2475
+ "customers": 18,
2476
+ "new_orders": 12,
2477
+ "returning_orders": 8,
2478
+ "guest_orders": 0,
2479
+ "gross_sales": 900.0,
2480
+ "discount": 100.0,
2481
+ "refunds": 30.0,
2482
+ "net_sales": 820.0,
2483
+ "first_order_net": 820.0,
2484
+ "later_net": 300.0,
2485
+ "lifetime_net": 1120.0,
2486
+ "discount_rate": 10.0,
2487
+ "refund_rate": 5.0,
2488
+ "won_ltv": 95.0,
2489
+ "average_order": 45.0
2490
+ }
2491
+ ],
2492
+ "totals": {
2493
+ "orders": 25,
2494
+ "customers": 22,
2495
+ "new_orders": 15,
2496
+ "returning_orders": 10,
2497
+ "guest_orders": 0,
2498
+ "gross_sales": 1100.0,
2499
+ "discount": 125.0,
2500
+ "refunds": 30.0,
2501
+ "net_sales": 1010.0,
2502
+ "first_order_net": 1010.0,
2503
+ "later_net": 300.0,
2504
+ "lifetime_net": 1310.0,
2505
+ "discount_rate": 10.2,
2506
+ "refund_rate": 4.0,
2507
+ "won_ltv": 90.0,
2508
+ "average_order": 44.0
2509
+ },
2510
+ "no_code": {
2511
+ "orders": 2,
2512
+ "discount": 10.0
2513
+ }
2514
+ }
2515
+ ```
2516
+
2517
+ #### Example
2518
+
2519
+ ```
2520
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/coupons?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
2521
+ -u "username:app_password"
2522
+ ```
2523
+
2524
+ ---
2525
+
2526
+ ### Get Coupon Overview
2527
+
2528
+ GET `/fluent-cart/v2/reports/coupon-overview`
2529
+
2530
+ Returns the discount given, how many orders and new customers used a coupon, a chart by period and the previous period's figures. Amounts are integers in cents.
2531
+
2532
+ - **Permission:** `reports/view`
2533
+ - **Operation page:** [Get Coupon Overview](/restapi/operations/reports/coupon-overview.md)
2534
+
2535
+ `orders` counts paid orders plus orders a coupon made free. `discount_rate` is the discount as a percent of what the coupon orders would have cost at full price. `new_customers` uses the shared first-purchase rule. `comparison` (new customers won with a coupon vs at full price: average first order net, average lifetime value, repeat and refund rates) is a FluentCart Pro report: it appears only when the `fluent_cart/report/coupon_quality` filter returns true. `previous` is `null` without a comparison.
2536
+
2537
+ #### Parameters
2538
+
2539
+ | Parameter | Type | Location | Required | Description |
2540
+ | --- | --- | --- | --- | --- |
2541
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
2542
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
2543
+
2544
+ #### Response
2545
+
2546
+ ```
2547
+ {
2548
+ "summary": {
2549
+ "discount": 12500,
2550
+ "orders": 100,
2551
+ "coupon_orders": 25,
2552
+ "coupon_share": 25.0,
2553
+ "new_customers": 50,
2554
+ "coupon_new_customers": 15,
2555
+ "new_share": 30.0,
2556
+ "discount_rate": 10.2
2557
+ },
2558
+ "previous": null,
2559
+ "comparison": {
2560
+ "coupon": {
2561
+ "customers": 15,
2562
+ "average_first": 4000,
2563
+ "average_ltv": 9000,
2564
+ "repeat_rate": 20.0,
2565
+ "refund_rate": 6.7
2566
+ },
2567
+ "full_price": {
2568
+ "customers": 35,
2569
+ "average_first": 4500,
2570
+ "average_ltv": 10000,
2571
+ "repeat_rate": 25.0,
2572
+ "refund_rate": 2.9
2573
+ }
2574
+ },
2575
+ "chart": [
2576
+ {
2577
+ "year": "2025",
2578
+ "group": "2025-01-01",
2579
+ "discount": 500,
2580
+ "orders": 4,
2581
+ "coupon_orders": 1
2582
+ }
2583
+ ],
2584
+ "compare_ranges": {
2585
+ "previous_period": {
2586
+ "start": "2024-12-01 00:00:00",
2587
+ "end": "2024-12-31 23:59:59"
2588
+ },
2589
+ "...": "..."
2590
+ }
2591
+ }
2592
+ ```
2593
+
2594
+ #### Example
2595
+
2596
+ ```
2597
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/coupon-overview?params[startDate]=2025-01-01&params[endDate]=2025-01-31&params[compareType]=previous_period" \
2598
+ -u "username:app_password"
2599
+ ```
2600
+
2601
+ ---
2602
+
2603
+ ## Sources
2604
+
2605
+ ### Get Source Report
2606
+
2607
+ GET `/fluent-cart/v2/reports/sources`
2608
+
2609
+ Returns orders and money grouped by UTM tags, and with FluentCart Pro also by product, variation, period or referrer. Amounts are decimal currency units; `net_sales` is the Revenue report's net sales.
2610
+
2611
+ - **Permission:** `reports/view`
2612
+ - **Operation page:** [Get Source Report](/restapi/operations/reports/sources.md)
2613
+
2614
+ Only orders with the grouped source data count (a `utm_source`, or a referrer for `referrer`), unless `include_none` adds a `(none)` row. UTM values group case-insensitively, with `_`, `-` and spaces treated alike. `totals` come from the order set, not from adding rows. `first_order_net` is the net of first orders (one-time or new subscription); `later_net` is the net of their renewals, any date.
2615
+
2616
+ The groupings `product`, `variation`, `day`, `week`, `month` and `referrer` need FluentCart Pro (the `fluent_cart/report/source_groupings` filter); without it they fall back to `campaign_source_medium`. Pro also applies `filter_type` and `advanced_filters` through the `fluent_cart/report/sources_query` filter.
2617
+
2618
+ With `page`, one page of rows comes back with `pagination`; a period grouping then also returns every period in `chart`. With a comparison, `fluctuations` is keyed by `utm_key` and holds `previous_` and `_fluctuation` (percent) for `orders`, `gross_sales`, `net_sales`, `average_order`, `average_net_order`; a row new in this period reads `100`.
2619
+
2620
+ #### Parameters
2621
+
2622
+ | Parameter | Type | Location | Required | Description |
2623
+ | --- | --- | --- | --- | --- |
2624
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
2625
+ | `params[group_by]` | string | query | No | `campaign_source_medium` (default), `campaign`, `source`, `medium`, `source_medium`, `term`, `content`. Pro: `product`, `variation`, `day`, `week`, `month`, `referrer`. |
2626
+ | `params[include_none]` | boolean | query | No | Add a `(none)` row for orders without source data. |
2627
+ | `params[page]` | integer | query | No | Page number. Without it, every row comes back. |
2628
+ | `params[per_page]` | integer | query | No | Rows per page, 10 to 150. Default `50`. |
2629
+ | `params[search]` | string | query | No | Filter rows by label (with `page`). |
2630
+ | `params[sort_by]` | string | query | No | `orders`, `gross_sales`, `net_sales`, `refunds`, `refund_rate`, `average_order`, `average_net_order`, `first_order_net`, `later_net`, `lifetime_net` (with `page`). |
2631
+ | `params[sort_order]` | string | query | No | `asc` or `desc` (default). |
2632
+ | `params[filter_type]` | string | query | No | Pro. Advanced filter mode. |
2633
+ | `params[advanced_filters]` | string | query | No | Pro. Advanced filter conditions (JSON). |
2634
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
2635
+
2636
+ #### Response
2637
+
2638
+ ```
2639
+ {
2640
+ "sourceReportData": [
2641
+ {
2642
+ "group_key": "spring sale|google|cpc",
2643
+ "utm_key": "spring sale|google|cpc",
2644
+ "utm_campaign": "spring_sale",
2645
+ "utm_source": "google",
2646
+ "utm_medium": "cpc",
2647
+ "label": "spring_sale / google / cpc",
2648
+ "orders": 20,
2649
+ "refunded_orders": 1,
2650
+ "gross_sales": 1000.0,
2651
+ "refunds": 50.0,
2652
+ "net_sales": 900.0,
2653
+ "average_order": 50.0,
2654
+ "average_net_order": 45.0,
2655
+ "refund_rate": 5.0,
2656
+ "first_order_net": 900.0,
2657
+ "later_net": 200.0,
2658
+ "lifetime_net": 1100.0
2659
+ }
2660
+ ],
2661
+ "totals": {
2662
+ "orders": 30,
2663
+ "refunded_orders": 1,
2664
+ "gross_sales": 1500.0,
2665
+ "refunds": 50.0,
2666
+ "net_sales": 1350.0,
2667
+ "average_order": 50.0,
2668
+ "average_net_order": 45.0,
2669
+ "refund_rate": 3.33,
2670
+ "first_order_net": 1350.0,
2671
+ "later_net": 300.0,
2672
+ "lifetime_net": 1650.0
2673
+ },
2674
+ "group_by": "campaign_source_medium",
2675
+ "fluctuations": [],
2676
+ "compare_range": null,
2677
+ "compare_ranges": {
2678
+ "previous_period": {
2679
+ "start": "2024-12-01 00:00:00",
2680
+ "end": "2024-12-31 23:59:59"
2681
+ },
2682
+ "...": "..."
2683
+ },
2684
+ "pagination": {
2685
+ "total": 12,
2686
+ "current_page": 1,
2687
+ "per_page": 50,
2688
+ "last_page": 1
2689
+ }
2690
+ }
2691
+ ```
2692
+
2693
+ #### Example
2694
+
2695
+ ```
2696
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/sources?params[startDate]=2025-01-01&params[endDate]=2025-01-31&params[group_by]=source&params[page]=1" \
2697
+ -u "username:app_password"
2698
+ ```
2699
+
2700
+ ---
2701
+
2702
+ ### Get Source Channels
2703
+
2704
+ GET `/fluent-cart/v2/reports/source-channels`
2705
+
2706
+ Returns the new customers won per marketing channel (email, paid, social, AI, search, referral, campaign, direct) with first-order net, lifetime value, repeat and refund rates, tracking coverage and a chart. Amounts are integers in cents; net figures are the Revenue report's net sales.
2707
+
2708
+ - **Permission:** `reports/view`
2709
+ - **Operation page:** [Get Source Channels](/restapi/operations/reports/source-channels.md)
2710
+
2711
+ A new customer is one whose first paid purchase falls in the range. The channel comes from the store's own rules first, then the UTM tags, then the referrer. Custom channel rules come from FluentCart Pro (the `fluent_cart/report/channel_rules` filter); custom channels come first, with their `label`; built-in channels have `label` `null`. Pro's `filter_type` and `advanced_filters` apply here too. `coverage.tracked` is customers not in `direct`. `chart[]` holds new customers per channel key per bucket.
2712
+
2713
+ #### Parameters
2714
+
2715
+ | Parameter | Type | Location | Required | Description |
2716
+ | --- | --- | --- | --- | --- |
2717
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `params[currency]=__all__` works. |
2718
+ | `params[filter_type]` | string | query | No | Pro. Advanced filter mode. |
2719
+ | `params[advanced_filters]` | string | query | No | Pro. Advanced filter conditions (JSON). |
2720
+ | `params[orderTypes][]` | array | query | No | Only these sale types: `payment`, `subscription`, `renewal`, `installment`, `installment_payment`. |
2721
+
2722
+ #### Response
2723
+
2724
+ ```
2725
+ {
2726
+ "coverage": {
2727
+ "customers": 50,
2728
+ "tracked": 30,
2729
+ "share": 60.0,
2730
+ "revenue_share": 58.5
2731
+ },
2732
+ "channels": [
2733
+ {
2734
+ "key": "email",
2735
+ "label": null,
2736
+ "customers": 10,
2737
+ "share": 20.0,
2738
+ "first_net": 40000,
2739
+ "average_ltv": 9000,
2740
+ "repeat_rate": 30.0,
2741
+ "refund_rate": 0.0
2742
+ },
2743
+ {
2744
+ "key": "direct",
2745
+ "label": null,
2746
+ "customers": 20,
2747
+ "share": 40.0,
2748
+ "first_net": 85000,
2749
+ "average_ltv": 7000,
2750
+ "repeat_rate": 15.0,
2751
+ "refund_rate": 5.0
2752
+ }
2753
+ ],
2754
+ "chart": [
2755
+ {
2756
+ "year": "2025",
2757
+ "group": "2025-01-01",
2758
+ "email": 1,
2759
+ "paid": 0,
2760
+ "social": 0,
2761
+ "ai": 0,
2762
+ "search": 0,
2763
+ "referral": 0,
2764
+ "campaign": 0,
2765
+ "direct": 1
2766
+ }
2767
+ ]
2768
+ }
2769
+ ```
2770
+
2771
+ #### Example
2772
+
2773
+ ```
2774
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/source-channels?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
2775
+ -u "username:app_password"
2776
+ ```
2777
+
2778
+ ---
2779
+
2780
+ ### Get Channel Rules
2781
+
2782
+ GET `/fluent-cart/v2/reports/channel-rules`
2783
+
2784
+ Pro Feature
2785
+
2786
+ This endpoint requires FluentCart Pro.
2787
+
2788
+ Returns the store's custom channel rules for the Sources report, its own domains, and whether the current user may change them. No money fields.
2789
+
2790
+ A rule matches when any of its groups matches; a group matches when all its conditions match. Rules are checked in order, before the built-in channels. A referrer on one of `own_domains` (or a subdomain) counts as direct. `can_edit` is true when the user has the `store/settings` permission.
2791
+
2792
+ - **Permission:** `reports/view`
2793
+ - **Operation page:** [Get Channel Rules](/restapi/operations/reports/channel-rules.md)
2794
+
2795
+ #### Parameters
2796
+
2797
+ None.
2798
+
2799
+ #### Response
2800
+
2801
+ ```
2802
+ {
2803
+ "rules": [
2804
+ {
2805
+ "id": "a1b2c3d4",
2806
+ "name": "Partner newsletter",
2807
+ "groups": [
2808
+ [
2809
+ {
2810
+ "field": "source",
2811
+ "operator": "is",
2812
+ "value": "partner"
2813
+ },
2814
+ {
2815
+ "field": "medium",
2816
+ "operator": "is",
2817
+ "value": "email"
2818
+ }
2819
+ ]
2820
+ ]
2821
+ }
2822
+ ],
2823
+ "own_domains": [
2824
+ "shop.example.com"
2825
+ ],
2826
+ "can_edit": true
2827
+ }
2828
+ ```
2829
+
2830
+ #### Example
2831
+
2832
+ ```
2833
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/channel-rules" \
2834
+ -u "username:app_password"
2835
+ ```
2836
+
2837
+ ---
2838
+
2839
+ ### Save Channel Rules
2840
+
2841
+ POST `/fluent-cart/v2/reports/channel-rules`
2842
+
2843
+ Pro Feature
2844
+
2845
+ This endpoint requires FluentCart Pro.
2846
+
2847
+ Replaces the store's custom channel rules and own domains, then returns the saved values. Invalid rules, conditions and domains are dropped without an error.
2848
+
2849
+ Also needs the `store/settings` permission; without it the route returns 403. Limits: 20 rules, 5 groups per rule, 5 conditions per group, 20 domains. A rule needs a name (max 60 characters) and one valid condition. `field` is `source`, `medium`, `campaign` or `domain`; `operator` is `is`, `contains` or `starts_with`; `value` is lower-cased, max 100 characters (a pasted URL keeps only its host, without `www.`). Keep a rule's `id` (a-z, 0-9, max 12) to keep its channel history; a missing or repeated id gets a new one. A rule sent as `{name, conditions: [...]}` is read as one group.
2850
+
2851
+ - **Permission:** `reports/view` and `store/settings`
2852
+ - **Operation page:** [Save Channel Rules](/restapi/operations/reports/save-channel-rules.md)
2853
+
2854
+ #### Parameters
2855
+
2856
+ | Parameter | Type | Location | Required | Description |
2857
+ | --- | --- | --- | --- | --- |
2858
+ | `rules` | array | body | No | Top-level. Rules: `{id?, name, groups: [[{field, operator, value}]]}`. Sending none clears the rules. |
2859
+ | `own_domains` | array | body | No | Top-level. The store's own domains, e.g. `shop.example.com`. Sending none clears them. |
2860
+
2861
+ #### Response
2862
+
2863
+ ```
2864
+ {
2865
+ "rules": [
2866
+ {
2867
+ "id": "a1b2c3d4",
2868
+ "name": "Partner newsletter",
2869
+ "groups": [
2870
+ [
2871
+ {
2872
+ "field": "source",
2873
+ "operator": "is",
2874
+ "value": "partner"
2875
+ },
2876
+ {
2877
+ "field": "medium",
2878
+ "operator": "is",
2879
+ "value": "email"
2880
+ }
2881
+ ]
2882
+ ]
2883
+ }
2884
+ ],
2885
+ "own_domains": [
2886
+ "shop.example.com"
2887
+ ],
2888
+ "can_edit": true
2889
+ }
2890
+ ```
2891
+
2892
+ #### Example
2893
+
2894
+ ```
2895
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/reports/channel-rules" \
2896
+ -u "username:app_password" \
2897
+ -H "Content-Type: application/json" \
2898
+ -d '{"rules": [{"id": "a1b2c3d4", "name": "Partner newsletter", "groups": [[{"field": "source", "operator": "is", "value": "partner"}, {"field": "medium", "operator": "is", "value": "email"}]]}], "own_domains": ["shop.example.com"]}'
2899
+ ```
2900
+
2901
+ ---
2902
+
2903
+ ## Subscriptions
2904
+
2905
+ ### Get Subscriptions Overview
2906
+
2907
+ GET `/fluent-cart/v2/reports/subscriptions-overview`
2908
+
2909
+ Returns subscription movement in the range: new, churned, churn rate, MRR movement, renewals paid and failed, and a movement chart. Open-ended plans only; installment plans are left out. MRR and amounts are decimals. `renewal_amount` is the net sales of paid renewal orders, as the Revenue report's Renewal row counts it.
2910
+
2911
+ `mrr_by_plan` (top 10 plus "Other plans"), `mrr_by_interval` and `trials` come only when FluentCart Pro answers the `fluent_cart/report/mrr_breakdown` filter and `params[summary_only]` is not set. `compare_range` and `compare_ranges` are always present; `compare_range` is null without a comparison.
2912
+
2913
+ - **Permission:** `reports/view`
2914
+ - **Operation page:** [Get Subscriptions Overview](/restapi/operations/reports/subscriptions-overview.md)
2915
+
2916
+ #### Parameters
2917
+
2918
+ | Parameter | Type | Location | Required | Description |
2919
+ | --- | --- | --- | --- | --- |
2920
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `__all__` currency works. |
2921
+ | `params[summary_only]` | integer | query | No | `1` leaves out the Pro MRR breakdown and trial conversion. |
2922
+
2923
+ | Field | Meaning |
2924
+ | --- | --- |
2925
+ | `period.churn_rate` | Churned from the base active at the start ÷ `active_at_start`, percent. Null when `active_at_start` is 0. |
2926
+ | `period.net_mrr` | `new_mrr − churned_mrr + expansion_mrr − contraction_mrr`. |
2927
+ | `period.failed_renewals`, `failed_amount` | Failed renewal charge transactions in the range. |
2928
+ | `previousPeriod`, `previousChart`, `fluctuations` | With a comparison: the compare period's `period` and `chart`, and the percent change per field (null when no honest percent exists). |
2929
+
2930
+ #### Response
2931
+
2932
+ ```
2933
+ {
2934
+ "period": {
2935
+ "new": 40, "churned": 10, "churned_new": 2, "active_at_start": 500, "churn_rate": 1.6, "net_change": 30,
2936
+ "new_mrr": 1200.0, "churned_mrr": 300.0, "expansion_mrr": 50.0, "contraction_mrr": 20.0, "net_mrr": 930.0,
2937
+ "renewals": 200, "renewal_amount": 5800.0, "failed_renewals": 5, "failed_amount": 150.0
2938
+ },
2939
+ "chart": [
2940
+ { "year": "2025", "group": "2025-01-01", "new": 2, "churned": 1, "new_mrr": 60.0, "churned_mrr": 30.0, "expansion_mrr": 0, "contraction_mrr": 0 }
2941
+ ],
2942
+ "mrr_by_plan": [ { "key": "12", "label": "Pro Plan", "variation": "Monthly", "subscriptions": 300, "mrr": 9000.0 } ],
2943
+ "mrr_by_interval": [ { "key": "month", "label": "month", "variation": "", "subscriptions": 400, "mrr": 12000.0 } ],
2944
+ "trials": { "started": 20, "converted": 8, "lost": 4, "in_trial": 8, "conversion_rate": 66.67 },
2945
+ "previousPeriod": null,
2946
+ "previousChart": [],
2947
+ "fluctuations": [],
2948
+ "compare_range": null,
2949
+ "compare_ranges": {
2950
+ "previous_period": { "start": "2024-12-01 00:00:00", "end": "2024-12-31 23:59:59" },
2951
+ "previous_month": { "start": "2024-12-01 00:00:00", "end": "2024-12-31 23:59:59" },
2952
+ "previous_quarter": { "start": "2024-10-01 00:00:00", "end": "2024-10-31 23:59:59" },
2953
+ "previous_year": { "start": "2024-01-01 00:00:00", "end": "2024-01-31 23:59:59" }
2954
+ }
2955
+ }
2956
+ ```
2957
+
2958
+ #### Example
2959
+
2960
+ ```
2961
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/subscriptions-overview?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
2962
+ -u "username:app_password"
2963
+ ```
2964
+
2965
+ ---
2966
+
2967
+ ### Get Subscription Health
2968
+
2969
+ GET `/fluent-cart/v2/reports/subscription-health`
2970
+
2971
+ Returns subscription health now: MRR, live subscriptions, ARPU, and the count and MRR of active, discounted first-cycle, trial, canceling (canceled but still in the paid term), failing and paused plans. Open-ended plans only. The date range does not apply. MRR values are decimals.
2972
+
2973
+ - **Permission:** `reports/view`
2974
+ - **Operation page:** [Get Subscription Health](/restapi/operations/reports/subscription-health.md)
2975
+
2976
+ #### Parameters
2977
+
2978
+ | Parameter | Type | Location | Required | Description |
2979
+ | --- | --- | --- | --- | --- |
2980
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). Only `currency` (`__all__` works) and `variation_ids` apply. |
2981
+ | `params[cached]` | integer | query | No | `1` lets the result come from a 10-minute cache. |
2982
+
2983
+ #### Response
2984
+
2985
+ ```
2986
+ {
2987
+ "health": {
2988
+ "mrr": 12000.0,
2989
+ "subscriptions": 420,
2990
+ "canceling": { "count": 10, "mrr": 300.0 },
2991
+ "arpu": 28.57,
2992
+ "active": { "count": 390, "mrr": 11400.0 },
2993
+ "discounted": { "count": 20, "mrr": 300.0, "renewal_mrr": 600.0, "uplift": 300.0 },
2994
+ "trial": { "count": 15, "renewal_mrr": 450.0 },
2995
+ "failing": { "count": 5, "mrr": 150.0 },
2996
+ "paused": { "count": 2, "mrr": 60.0 }
2997
+ }
2998
+ }
2999
+ ```
3000
+
3001
+ #### Example
3002
+
3003
+ ```
3004
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/subscription-health?params[currency]=USD" \
3005
+ -u "username:app_password"
3006
+ ```
3007
+
3008
+ ---
3009
+
3010
+ ### Get Subscription Variations
3011
+
3012
+ GET `/fluent-cart/v2/reports/subscription-variations`
3013
+
3014
+ Returns the products and variations that have a started open-ended subscription, grouped by product. The subscription report pages use it for the product picker. A deleted variation keeps its ID under "Deleted product" with `product_id: 0`.
3015
+
3016
+ - **Permission:** `reports/view`
3017
+ - **Operation page:** [Get Subscription Variations](/restapi/operations/reports/subscription-variations.md)
3018
+
3019
+ #### Parameters
3020
+
3021
+ This endpoint takes no parameters.
3022
+
3023
+ #### Response
3024
+
3025
+ ```
3026
+ {
3027
+ "products": [
3028
+ {
3029
+ "product_id": 10,
3030
+ "product_title": "Pro Plan",
3031
+ "variations": [ { "id": 12, "title": "Monthly" }, { "id": 13, "title": "Yearly" } ]
3032
+ }
3033
+ ]
3034
+ }
3035
+ ```
3036
+
3037
+ #### Example
3038
+
3039
+ ```
3040
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/subscription-variations" \
3041
+ -u "username:app_password"
3042
+ ```
3043
+
3044
+ ---
3045
+
3046
+ ### Get Future Renewals
3047
+
3048
+ GET `/fluent-cart/v2/reports/future-renewals`
3049
+
3050
+ Projects the renewals of live open-ended subscriptions (active, expiring, trialing) month by month for the next 3, 6 or 12 months. It also returns the store's renewal rates for the last 12 full months, so a client can weigh the projection. The date range does not apply. Amounts are in cents.
3051
+
3052
+ `by_variation` comes only when FluentCart Pro answers the `fluent_cart/report/future_renewals_by_variation` filter.
3053
+
3054
+ - **Permission:** `reports/view`
3055
+ - **Operation page:** [Get Future Renewals](/restapi/operations/reports/future-renewals.md)
3056
+
3057
+ #### Parameters
3058
+
3059
+ | Parameter | Type | Location | Required | Description |
3060
+ | --- | --- | --- | --- | --- |
3061
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). Only `currency` (`__all__` works) and `variation_ids` apply. |
3062
+ | `params[horizon]` | string | query | No | `3` (default), `6` or `12` months. |
3063
+ | `params[as_of]` | string | query | No | Start day (Y-m-d). Defaults to today. |
3064
+
3065
+ | Field | Meaning |
3066
+ | --- | --- |
3067
+ | `by_interval`, `trial` | Scheduled cents per billing interval, keyed by the renewal's position in the window. `trial` holds free trials not paid yet (position 0 is the converting charge). |
3068
+ | `rates`, `trial_rate` | Renewal rate per interval and trial conversion rate over `rate_window`, percent or null. |
3069
+ | `overdue` | Live subscriptions whose next billing date is already past. |
3070
+ | `retrying` | Failing and past-due subscriptions. |
3071
+ | `wont_renew` | Canceled subscriptions whose paid term ends in the window, with `by_month`. |
3072
+
3073
+ #### Response
3074
+
3075
+ ```
3076
+ {
3077
+ "totalProjected": 1250000,
3078
+ "totalRenewals": 420,
3079
+ "projections": [
3080
+ { "group": "2025-02", "renewals_count": 140, "projected_amount": 420000, "by_interval": { "month": { "1": 400000 } }, "trial": { "month": [20000] } }
3081
+ ],
3082
+ "by_interval": { "month": { "1": 400000, "2": 400000 } },
3083
+ "trial": { "month": [20000] },
3084
+ "trial_first": { "count": 4, "amount": 20000 },
3085
+ "rates": { "month": 92.5, "year": 80.0 },
3086
+ "trial_rate": 40.0,
3087
+ "rate_window": ["2024-02-01", "2025-01-31"],
3088
+ "overdue": { "count": 3, "amount": 9000 },
3089
+ "retrying": { "count": 5, "amount": 15000 },
3090
+ "wont_renew": { "count": 6, "amount": 18000, "by_month": { "2025-02": 6000 } },
3091
+ "period": ["2025-02-01 00:00:00", "2025-04-30 23:59:59"],
3092
+ "groupBy": "monthly",
3093
+ "horizon": "3",
3094
+ "by_variation": [
3095
+ { "variation_id": 12, "product_id": 10, "product_title": "Pro Plan", "variation_title": "Monthly", "renewals_count": 300, "projected_amount": 900000, "by_interval": { "month": { "1": 300000 } }, "trial": [] }
3096
+ ]
3097
+ }
3098
+ ```
3099
+
3100
+ #### Example
3101
+
3102
+ ```
3103
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/future-renewals?params[horizon]=6&params[currency]=USD" \
3104
+ -u "username:app_password"
3105
+ ```
3106
+
3107
+ ---
3108
+
3109
+ ### Get Subscription Retention
3110
+
3111
+ GET `/fluent-cart/v2/reports/subscription-retention`
3112
+
3113
+ Returns one row per store month (or year) in the range: new, churned, retained and active subscriptions, MRR, churn reasons and the renewal rate. Open-ended plans only. Retained = the starting base still active at period end. MRR and `period_gross` are decimals; `retained_mrr`, `mrr` and `start_mrr` are decimal strings. The range end is clamped to today.
3114
+
3115
+ - **Permission:** `reports/view`
3116
+ - **Operation page:** [Get Subscription Retention](/restapi/operations/reports/subscription-retention.md)
3117
+
3118
+ #### Parameters
3119
+
3120
+ | Parameter | Type | Location | Required | Description |
3121
+ | --- | --- | --- | --- | --- |
3122
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). `__all__` currency works. |
3123
+ | `params[period]` | string | query | No | `year` gives one row per year; any other value one row per month. |
3124
+ | `params[billingInterval]` | string | query | No | Only subscriptions with this billing interval, e.g. `month`. |
3125
+
3126
+ `intervals` lists the billing intervals that have subscriptions, most first. `renewal_rate` = paid ÷ (paid + lost) of the renewals due in the period; retrying ones are not counted yet.
3127
+
3128
+ #### Response
3129
+
3130
+ ```
3131
+ {
3132
+ "retention_data": [
3133
+ {
3134
+ "day": "2025-01-31", "week": "2025-05", "group": "2025-01", "year": "2025",
3135
+ "is_complete": true, "is_running": false,
3136
+ "new_subscriptions": 40, "new_subscriptions_mrr": 1200.0,
3137
+ "churned_subscriptions": 10, "churned_subscriptions_mrr": 300.0, "churned_new_subscriptions": 2,
3138
+ "left_by_reason": { "canceled": 6, "payment_failed": 2, "retrying": 1, "paused": 1, "completed": 0 },
3139
+ "renewals_paid": 190, "renewals_lost": 10, "renewals_retrying": 3, "renewal_rate": 95.0,
3140
+ "retained_subscriptions": 490, "retained_mrr": "14700.00",
3141
+ "active_subscriptions": "528", "active_paid_subscriptions": "520", "active_free_subscriptions": "8",
3142
+ "mrr": "15600.00", "start_subscriptions": 500, "start_mrr": "15000.00",
3143
+ "retention_rate": 98.0, "retention_rate_money": 98.0,
3144
+ "period_gross": 1200.0, "period_subscriptions": 40
3145
+ }
3146
+ ],
3147
+ "intervals": ["month", "year"]
3148
+ }
3149
+ ```
3150
+
3151
+ #### Example
3152
+
3153
+ ```
3154
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/subscription-retention?params[startDate]=2024-01-01&params[endDate]=2024-12-31" \
3155
+ -u "username:app_password"
3156
+ ```
3157
+
3158
+ ---
3159
+
3160
+ ### Get Subscription Cohorts
3161
+
3162
+ GET `/fluent-cart/v2/reports/subscription-cohorts`
3163
+
3164
+ Returns cohort retention by start month or start year, read from the retention snapshots table. The date range does not apply: the month view shows the last 24 months of cohorts, the year view every year. One currency only. MRR values are decimals.
3165
+
3166
+ `metric=mrr`, `billingInterval` and `rebuyAdjusted` need FluentCart Pro (filter `fluent_cart/report/cohort_options`). Without Pro the metric is `subscribers` and `full` is `false`. Build the snapshots with [Generate Retention Snapshots](#generate-retention-snapshots), then [Retention Snapshot Step](#retention-snapshot-step).
3167
+
3168
+ - **Permission:** `reports/view`
3169
+ - **Operation page:** [Get Subscription Cohorts](/restapi/operations/reports/subscription-cohorts.md)
3170
+
3171
+ #### Parameters
3172
+
3173
+ | Parameter | Type | Location | Required | Description |
3174
+ | --- | --- | --- | --- | --- |
3175
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). Only `currency` and `variation_ids` apply; `__all__` is read as the base currency. |
3176
+ | `params[groupBy]` | string | query | No | `year` (default) or `month`. |
3177
+ | `params[metric]` | string | query | No | Pro. `subscribers` (default) or `mrr`. |
3178
+ | `params[billingInterval]` | string | query | No | Pro. Only cohorts of this billing interval. |
3179
+ | `params[rebuyAdjusted]` | boolean | query | No | Pro. Count a cancel-and-rebuy as retained. |
3180
+
3181
+ In the year view a cell also has `base_mrr`, `base_count`, `partial`, `matured_cohorts` and `total_cohorts`, because a year cell covers only the monthly cohorts that reached it. In the month view the current month's cell has `partial: true`. `generated_at` is when the snapshots were built; `intervals` lists the intervals they hold.
3182
+
3183
+ #### Response
3184
+
3185
+ ```
3186
+ {
3187
+ "cohorts": [
3188
+ {
3189
+ "cohort": "2024",
3190
+ "start_mrr": 3000.0,
3191
+ "start_count": 100,
3192
+ "periods": [
3193
+ {
3194
+ "offset": 1,
3195
+ "retained_mrr": 2400.0, "retained_count": 80,
3196
+ "churned_mrr": 600.0, "churned_count": 20,
3197
+ "retention_rate_mrr": 80.0, "retention_rate_count": 80.0,
3198
+ "retention_rate_previous_mrr": 80.0, "retention_rate_previous_count": 80.0,
3199
+ "churn_rate_total_mrr": 20.0, "churn_rate_total_count": 20.0,
3200
+ "base_mrr": 3000.0, "base_count": 100, "partial": false, "matured_cohorts": 12, "total_cohorts": 12
3201
+ }
3202
+ ]
3203
+ }
3204
+ ],
3205
+ "weighted_averages": [
3206
+ { "offset": 1, "weighted_avg_mrr": 80.0, "weighted_avg_count": 80.0, "weighted_avg_prev_mrr": 80.0, "weighted_avg_prev_count": 80.0, "weighted_avg_churn_mrr": 20.0, "weighted_avg_churn_count": 20.0 }
3207
+ ],
3208
+ "group_by": "year",
3209
+ "metric": "subscribers",
3210
+ "max_periods": 8,
3211
+ "generated_at": "2025-01-31 10:00:00",
3212
+ "intervals": ["month", "year"],
3213
+ "full": true
3214
+ }
3215
+ ```
3216
+
3217
+ #### Example
3218
+
3219
+ ```
3220
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/subscription-cohorts?params[groupBy]=month&params[currency]=USD" \
3221
+ -u "username:app_password"
3222
+ ```
3223
+
3224
+ ---
3225
+
3226
+ ### Get Installments
3227
+
3228
+ GET `/fluent-cart/v2/reports/installments`
3229
+
3230
+ Returns installment-plan health over all time: plans started, money collected and still owed, plans per status bucket, payments due in the next 30 days and the product picker options. Installment plans are subscriptions with a fixed number of payments. The date range does not apply. Amounts are in cents.
3231
+
3232
+ `schedule`, `starts` and `summary.collection_rate` come only when FluentCart Pro answers the `fluent_cart/report/installment_forecast` filter.
3233
+
3234
+ - **Permission:** `reports/view`
3235
+ - **Operation page:** [Get Installments](/restapi/operations/reports/installments.md)
3236
+
3237
+ #### Parameters
3238
+
3239
+ | Parameter | Type | Location | Required | Description |
3240
+ | --- | --- | --- | --- | --- |
3241
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). Only `currency` (`__all__` works) and `variation_ids` apply. |
3242
+ | `params[started_from]` | string | query | No | Only plans whose first paid order is on or after this store day (Y-m-d). |
3243
+ | `params[started_to]` | string | query | No | Only plans whose first paid order is on or before this store day (Y-m-d). |
3244
+ | `params[as_of]` | string | query | No | Day to measure from (Y-m-d). Defaults to today. |
3245
+ | `params[at_risk_limit]` | integer | query | No | At-risk rows to include, 0 to 500. Default `0` (none); page them with [Get Installments at Risk](#get-installments-at-risk). |
3246
+
3247
+ Buckets: `completed`, `running`, `overdue`, `paused`, `upgraded`, `lapsed`, `refunded`. `summary.scheduled` is what running plans still owe; `overdue` and `lapsed_unpaid` are what overdue and lapsed plans still owe. `completion_rate` counts ended plans only (completed, lapsed, refunded).
3248
+
3249
+ #### Response
3250
+
3251
+ ```
3252
+ {
3253
+ "as_of": "2025-02-01",
3254
+ "currency": "USD",
3255
+ "started_from": null,
3256
+ "started_to": null,
3257
+ "summary": {
3258
+ "plans_started": 50, "payments": 180, "collected": 900000, "scheduled": 300000,
3259
+ "overdue": 20000, "lapsed_unpaid": 40000, "completion_rate": 85.0, "collection_rate": 92.5,
3260
+ "completed_count": 30, "running_count": 12, "overdue_count": 2, "paused_count": 0,
3261
+ "upgraded_count": 1, "lapsed_count": 4, "refunded_count": 1
3262
+ },
3263
+ "schedule": [ { "month": "2025-02", "payments": 14, "amount": 70000, "scheduled": 60000, "overdue": 10000 } ],
3264
+ "due_soon": { "count": 14, "amount": 70000, "overdue": { "count": 2, "amount": 10000 } },
3265
+ "starts": [ { "month": "2024-06", "plans_started": 5, "collected": 100000, "completed_count": 3, "running_count": 2, "overdue_count": 0, "paused_count": 0, "upgraded_count": 0, "lapsed_count": 0, "refunded_count": 0 } ],
3266
+ "at_risk": [],
3267
+ "filter_options": [ { "product_id": 20, "product_title": "Course", "variations": [ { "id": 31, "title": "3 payments" } ] } ],
3268
+ "at_risk_count": 6,
3269
+ "at_risk_amount": 60000
3270
+ }
3271
+ ```
3272
+
3273
+ #### Example
3274
+
3275
+ ```
3276
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/installments?params[currency]=USD" \
3277
+ -u "username:app_password"
3278
+ ```
3279
+
3280
+ ---
3281
+
3282
+ ### Get Installments at Risk
3283
+
3284
+ GET `/fluent-cart/v2/reports/installments/at-risk`
3285
+
3286
+ Returns one page of overdue and lapsed installment plans, largest unpaid balance first. Amounts are in cents. `reactivate_url` is empty when the user cannot reactivate the plan.
3287
+
3288
+ - **Permission:** `reports/view`
3289
+ - **Operation page:** [Get Installments at Risk](/restapi/operations/reports/installments-at-risk.md)
3290
+
3291
+ #### Parameters
3292
+
3293
+ | Parameter | Type | Location | Required | Description |
3294
+ | --- | --- | --- | --- | --- |
3295
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). Only `currency` (`__all__` works) and `variation_ids` apply. |
3296
+ | `params[started_from]` | string | query | No | Only plans whose first paid order is on or after this store day (Y-m-d). |
3297
+ | `params[started_to]` | string | query | No | Only plans whose first paid order is on or before this store day (Y-m-d). |
3298
+ | `search` | string | query | No | Customer name or email contains this text. Top-level. |
3299
+ | `bucket` | string | query | No | `overdue` or `lapsed`. Both when omitted. Top-level. |
3300
+ | `page` | integer | query | No | Page number. Default `1`. Top-level. |
3301
+ | `per_page` | integer | query | No | Rows per page, 1 to 150. Default `20`. Top-level. |
3302
+
3303
+ #### Response
3304
+
3305
+ ```
3306
+ {
3307
+ "data": [
3308
+ {
3309
+ "subscription_id": 77, "customer_id": 42, "customer_name": "Jane Doe", "email": "[email protected]",
3310
+ "variation_id": 31, "product_title": "Course", "variation_title": "3 payments",
3311
+ "status": "failing", "bucket": "overdue",
3312
+ "payments": 1, "bill_times": 3, "bill_count": 1, "installments_left": 2,
3313
+ "collected": 10000, "left_amount": 20000,
3314
+ "next_billing_date": "2025-01-15 00:00:00", "reactivate_url": ""
3315
+ }
3316
+ ],
3317
+ "total": 6,
3318
+ "page": 1,
3319
+ "per_page": 20
3320
+ }
3321
+ ```
3322
+
3323
+ #### Example
3324
+
3325
+ ```
3326
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/installments/at-risk?bucket=overdue&page=1&per_page=20" \
3327
+ -u "username:app_password"
3328
+ ```
3329
+
3330
+ ---
3331
+
3332
+ ### Get Subscription Rebuys
3333
+
3334
+ GET `/fluent-cart/v2/reports/subscription-rebuys`
3335
+
3336
+ Pro Feature
3337
+
3338
+ This endpoint requires FluentCart Pro.
3339
+
3340
+ Finds subscriptions whose paid term ended in the range without renewing (canceled or expired) and counts the customers who bought the same product again near that end. `discount_total` and `discount_average` are in decimal currency units (not cents).
3341
+
3342
+ A rebuy is a new subscription to the same product, by the same customer, in the same currency, created within `windowDays` before or after the term end. Free trials that never paid and plans changed by an upgrade do not count as ended. `timing` splits rebuys into before the end, within 7 days after, and later. `discounted` counts rebuys that paid less than the old renewal price (same interval, not via a trial); `discount_total` sums the saving. `rebuy_rate` and `discount_average` are `null` when there is nothing to divide.
3343
+
3344
+ - **Permission:** `reports/view`
3345
+ - **Operation page:** [Get Subscription Rebuys](/restapi/operations/reports/subscription-rebuys.md)
3346
+
3347
+ #### Parameters
3348
+
3349
+ | Parameter | Type | Location | Required | Description |
3350
+ | --- | --- | --- | --- | --- |
3351
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
3352
+ | `params[windowDays]` | integer | query | No | Days before or after the term end that count as a rebuy, 1-365. Default `30`. |
3353
+ | `params[billingInterval]` | string | query | No | Only subscriptions with this billing interval, e.g. `monthly`, `yearly`. |
3354
+
3355
+ One currency only: `__all__` falls back to the base currency. `params[filterMode]` is not used.
3356
+
3357
+ #### Response
3358
+
3359
+ ```
3360
+ {
3361
+ "window_days": 30,
3362
+ "ended": 40,
3363
+ "rebought": 6,
3364
+ "rebuy_rate": 15.0,
3365
+ "timing": {
3366
+ "before": 1,
3367
+ "within_7": 4,
3368
+ "later": 1
3369
+ },
3370
+ "discounted": 3,
3371
+ "discount_total": 75.0,
3372
+ "discount_average": 25.0,
3373
+ "chart": [
3374
+ {
3375
+ "year": "2025",
3376
+ "group": "2025-01",
3377
+ "ended": 40,
3378
+ "rebought": 6
3379
+ }
3380
+ ]
3381
+ }
3382
+ ```
3383
+
3384
+ #### Example
3385
+
3386
+ ```
3387
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/subscription-rebuys?params[startDate]=2025-01-01&params[endDate]=2025-01-31&params[windowDays]=30" \
3388
+ -u "username:app_password"
3389
+ ```
3390
+
3391
+ ---
3392
+
3393
+ ### Get Installments by Variation
3394
+
3395
+ GET `/fluent-cart/v2/reports/installments/variations`
3396
+
3397
+ Pro Feature
3398
+
3399
+ This endpoint requires FluentCart Pro.
3400
+
3401
+ Returns installment plans grouped by the variation they were sold on: how many started, what they collected, and what is still owed. Amounts are in cents.
3402
+
3403
+ `collected` is paid less refunded on the plans' orders. `scheduled` is still owed on running plans, `overdue_amount` on overdue plans, `lapsed_amount` on lapsed plans. `total` = `collected` + `scheduled`; rows sort by it. Each plan falls in one `_count`: completed, running, overdue, paused, upgraded, lapsed, refunded.
3404
+
3405
+ - **Permission:** `reports/view`
3406
+ - **Operation page:** [Get Installments by Variation](/restapi/operations/reports/installments-variations.md)
3407
+
3408
+ #### Parameters
3409
+
3410
+ | Parameter | Type | Location | Required | Description |
3411
+ | --- | --- | --- | --- | --- |
3412
+ | Standard params | — | query | No | See [Common Parameters](#common-parameters). |
3413
+ | `params[started_from]` | string | query | No | Only plans started on or after this day (Y-m-d). |
3414
+ | `params[started_to]` | string | query | No | Only plans started on or before this day (Y-m-d). |
3415
+
3416
+ Only `params[currency]` (`__all__` works) and `params[variation_ids][]` of the standard params are used. `startDate`, `endDate` and `rangeKey` are ignored; use `started_from` / `started_to`.
3417
+
3418
+ #### Response
3419
+
3420
+ ```
3421
+ {
3422
+ "data": [
3423
+ {
3424
+ "variation_id": 108,
3425
+ "product_id": 42,
3426
+ "product_title": "Pro Plugin",
3427
+ "variation_title": "3 payments",
3428
+ "min_price": 10000,
3429
+ "max_price": 10000,
3430
+ "min_bill_times": 3,
3431
+ "max_bill_times": 3,
3432
+ "is_installment_price": true,
3433
+ "plans_started": 20,
3434
+ "payments": 45,
3435
+ "collected": 450000,
3436
+ "scheduled": 100000,
3437
+ "overdue_amount": 20000,
3438
+ "lapsed_amount": 10000,
3439
+ "completed_count": 10,
3440
+ "running_count": 6,
3441
+ "overdue_count": 2,
3442
+ "paused_count": 0,
3443
+ "upgraded_count": 0,
3444
+ "lapsed_count": 1,
3445
+ "refunded_count": 1,
3446
+ "total": 550000
3447
+ }
3448
+ ]
3449
+ }
3450
+ ```
3451
+
3452
+ #### Example
3453
+
3454
+ ```
3455
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/installments/variations?params[started_from]=2025-01-01&params[started_to]=2025-06-30" \
3456
+ -u "username:app_password"
3457
+ ```
3458
+
3459
+ ---
3460
+
3461
+ ## Retention Snapshots
3462
+
3463
+ The cohort report reads the retention snapshots table. A rebuild runs in short requests, not in the background:
3464
+
3465
+ 1. Call [Generate Retention Snapshots](#generate-retention-snapshots). It starts a build and returns a `token`.
3466
+ 2. Call [Retention Snapshot Step](#retention-snapshot-step) with that `token`. Repeat until the response has `done: true`.
3467
+
3468
+ The current snapshots stay in place until the last step. Only one build runs at a time.
3469
+
3470
+ Changed in the next release
3471
+
3472
+ `GET /reports/retention-snapshots/status` is removed. Action Scheduler is no longer used. `POST /reports/retention-snapshots/generate` now starts a stepped build and returns a `token`, not a `job_id`. It ignores `product_id`. Call `POST /reports/retention-snapshots/step` to run the build.
3473
+
3474
+ ### Generate Retention Snapshots
3475
+
3476
+ POST `/fluent-cart/v2/reports/retention-snapshots/generate`
3477
+
3478
+ Starts a rebuild. The request takes a lock, plans the steps and returns `step: 0`, the number of `steps` and a `token`. It does not build any rows. Send the `token` to [Retention Snapshot Step](#retention-snapshot-step).
3479
+
3480
+ If another build holds the lock, the response is HTTP 200 with `success: false` and `code: "already_running"`. A lock that nobody steps expires after 5 minutes.
3481
+
3482
+ - **Permission:** `reports/view`
3483
+ - **Operation page:** [Generate Retention Snapshots](/restapi/operations/reports/generate-retention-snapshots.md)
3484
+
3485
+ #### Parameters
3486
+
3487
+ None. A `product_id` is ignored: every product is rebuilt.
3488
+
3489
+ #### Response
3490
+
3491
+ ```
3492
+ {
3493
+ "success": true,
3494
+ "step": 0,
3495
+ "steps": 4,
3496
+ "token": "aB3dE5fG7hJ9kL1mN3pQ"
3497
+ }
3498
+ ```
3499
+
3500
+ Another build is running:
3501
+
3502
+ ```
3503
+ {
3504
+ "success": false,
3505
+ "code": "already_running",
3506
+ "message": "A snapshot rebuild is already running. Try again in a few minutes.",
3507
+ "stats": []
3508
+ }
3509
+ ```
3510
+
3511
+ #### Example
3512
+
3513
+ ```
3514
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/reports/retention-snapshots/generate" \
3515
+ -u "username:app_password"
3516
+ ```
3517
+
3518
+ ---
3519
+
3520
+ ### Retention Snapshot Step
3521
+
3522
+ POST `/fluent-cart/v2/reports/retention-snapshots/step`
3523
+
3524
+ Runs the next step of the started build. Each step builds one range of customer IDs into a build table and returns `done: false`. The last step publishes the build in place of the old snapshots, releases the lock and returns `done: true` with `message` and `stats`. A store with no subscriptions has one step.
3525
+
3526
+ Errors return HTTP 200 with `success: false` and a `code`:
3527
+
3528
+ | `code` | Meaning |
3529
+ | --- | --- |
3530
+ | `no_build` | No build is running. Call generate again. |
3531
+ | `already_running` | The `token` does not match the running build. |
3532
+ | `failed` | The step threw an error. The build stops and the lock is released. The old snapshots stay. |
3533
+
3534
+ - **Permission:** `reports/view`
3535
+ - **Operation page:** [Retention Snapshot Step](/restapi/operations/reports/retention-snapshots-step.md)
3536
+
3537
+ #### Parameters
3538
+
3539
+ | Parameter | Type | Location | Required | Description |
3540
+ | --- | --- | --- | --- | --- |
3541
+ | `token` | string | body | Yes | The `token` from the generate response. |
3542
+
3543
+ #### Response
3544
+
3545
+ More steps to run:
3546
+
3547
+ ```
3548
+ {
3549
+ "success": true,
3550
+ "done": false,
3551
+ "step": 1,
3552
+ "steps": 4
3553
+ }
3554
+ ```
3555
+
3556
+ Last step:
3557
+
3558
+ ```
3559
+ {
3560
+ "success": true,
3561
+ "done": true,
3562
+ "step": 4,
3563
+ "steps": 4,
3564
+ "message": "Retention snapshots generated successfully",
3565
+ "stats": { "total_records": 5000, "unique_cohorts": 24, "unique_periods": 36, "unique_products": 6 }
3566
+ }
3567
+ ```
3568
+
3569
+ #### Example
3570
+
3571
+ Start a build, then step it until it is done. The loop needs `jq`.
3572
+
3573
+ ```
3574
+ SITE="https://example.com/wp-json/fluent-cart/v2/reports/retention-snapshots"
3575
+ AUTH="username:app_password"
3576
+
3577
+ TOKEN=$(curl -s -X POST "$SITE/generate" -u "$AUTH" | jq -r '.token // empty')
3578
+ [ -z "$TOKEN" ] && { echo "Could not start the build"; exit 1; }
3579
+
3580
+ while true; do
3581
+ RESPONSE=$(curl -s -X POST "$SITE/step" -u "$AUTH" \
3582
+ -H "Content-Type: application/json" \
3583
+ -d "{\"token\": \"$TOKEN\"}")
3584
+ echo "$RESPONSE"
3585
+ [ "$(echo "$RESPONSE" | jq -r '.success')" != "true" ] && exit 1
3586
+ [ "$(echo "$RESPONSE" | jq -r '.done')" = "true" ] && break
3587
+ done
3588
+ ```
3589
+
3590
+ ---
3591
+
3592
+ ## License Reports
3593
+
3594
+ These routes are in core, but they read the `fct_licenses` table that the FluentCart Pro licensing module creates. Without that table, the chart returns zero buckets and the pie chart and summary fail with a database error.
3595
+
3596
+ ### Get License Chart
3597
+
3598
+ GET `/fluent-cart/v2/reports/license-chart`
3599
+
3600
+ Returns the number of licenses created per day, month or year in the range. This is a core route, but it reads the `fct_licenses` table that the FluentCart Pro licensing module creates. Without that table the query fails silently and every bucket is `0`.
3601
+
3602
+ - **Permission:** `reports/view`
3603
+ - **Operation page:** [Get License Chart](/restapi/operations/reports/license-chart.md)
3604
+
3605
+ #### Parameters
3606
+
3607
+ | Parameter | Type | Location | Required | Description |
3608
+ | --- | --- | --- | --- | --- |
3609
+ | `params[startDate]` | string | query | No | First store day. |
3610
+ | `params[endDate]` | string | query | No | Last store day. |
3611
+ | `params[groupKey]` | string | query | No | `daily` (default), `monthly`, `yearly`, or `default` to pick by range length. |
3612
+
3613
+ Daily rows have `date`; monthly rows have `year` and `month`; yearly rows have `year`.
3614
+
3615
+ #### Response
3616
+
3617
+ ```
3618
+ {
3619
+ "lineChartData": [
3620
+ { "date": "2025-01-01", "license_count": 4 },
3621
+ { "date": "2025-01-02", "license_count": 0 }
3622
+ ]
3623
+ }
3624
+ ```
3625
+
3626
+ #### Example
3627
+
3628
+ ```
3629
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/license-chart?params[startDate]=2025-01-01&params[endDate]=2025-01-31" \
3630
+ -u "username:app_password"
3631
+ ```
3632
+
3633
+ ---
3634
+
3635
+ ### Get License Pie Chart
3636
+
3637
+ GET `/fluent-cart/v2/reports/license-pie-chart`
3638
+
3639
+ Returns active licenses per product, with each product's share of all active licenses. The date range does not apply. This is a core route, but it reads the `fct_licenses` table that the FluentCart Pro licensing module creates; without that table the request fails with a database error.
3640
+
3641
+ - **Permission:** `reports/view`
3642
+ - **Operation page:** [Get License Pie Chart](/restapi/operations/reports/license-pie-chart.md)
3643
+
3644
+ #### Parameters
3645
+
3646
+ This endpoint takes no parameters that change the result.
3647
+
3648
+ #### Response
3649
+
3650
+ ```
3651
+ {
3652
+ "pieChartData": [
3653
+ { "product_id": 10, "post_title": "Pro Plugin", "activation_count": 120, "percentage": "60.00" },
3654
+ { "product_id": 11, "post_title": "Add-on", "activation_count": 80, "percentage": "40.00" }
3655
+ ]
3656
+ }
3657
+ ```
3658
+
3659
+ #### Example
3660
+
3661
+ ```
3662
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/license-pie-chart" \
3663
+ -u "username:app_password"
3664
+ ```
3665
+
3666
+ ---
3667
+
3668
+ ### Get License Summary
3669
+
3670
+ GET `/fluent-cart/v2/reports/license-summary`
3671
+
3672
+ Returns license counts by current status, the total number of activated sites and the number of licensed products. The date range does not apply. This is a core route, but it reads the `fct_licenses` table that the FluentCart Pro licensing module creates; without that table the request fails with a database error.
3673
+
3674
+ - **Permission:** `reports/view`
3675
+ - **Operation page:** [Get License Summary](/restapi/operations/reports/license-summary.md)
3676
+
3677
+ #### Parameters
3678
+
3679
+ This endpoint takes no parameters that change the result.
3680
+
3681
+ #### Response
3682
+
3683
+ ```
3684
+ {
3685
+ "summaryData": {
3686
+ "totalLicense": 200,
3687
+ "totalActiveLicense": 150,
3688
+ "totalInactiveLicense": 20,
3689
+ "totalDisabledLicense": 5,
3690
+ "totalExpiredLicense": 25,
3691
+ "totalActivatedSites": 310,
3692
+ "totalLicensedProducts": 4
3693
+ }
3694
+ }
3695
+ ```
3696
+
3697
+ #### Example
3698
+
3699
+ ```
3700
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/reports/license-summary" \
3701
+ -u "username:app_password"
3702
+ ```
3703
+
3704
+ ---
3705
+
3706
+ ## Authentication
3707
+
3708
+ All report endpoints require authentication via WordPress REST API authentication methods:
3709
+
3710
+ - **Application Passwords** (recommended): Pass via Basic Auth header
3711
+ - **Cookie Authentication**: For logged-in admin users with appropriate capabilities
3712
+ - **JWT or OAuth**: If configured via third-party plugins
3713
+
3714
+ The authenticated user must have the `reports/view` capability, which is available to the following FluentCart roles:
3715
+
3716
+ | Role | Has Access |
3717
+ | --- | --- |
3718
+ | `super_admin` | Yes |
3719
+ | `manager` | Yes |
3720
+ | `worker` | No |
3721
+ | `accountant` | Yes |
3722
+
3723
+ ---
3724
+
3725
+ ## Comparison Periods
3726
+
3727
+ When `compareType` and `compareDate` are both set, endpoints that support comparison also return the compared period's figures and the change against it:
3728
+
3729
+ | compareType | Behavior |
3730
+ | --- | --- |
3731
+ | `previous_period` | Same number of days immediately before the start date |
3732
+ | `previous_month` | Same days shifted back 1 month, never overlapping the current range |
3733
+ | `previous_quarter` | Same days shifted back 3 months, never overlapping the current range |
3734
+ | `previous_year` | Same days shifted back 1 year, never overlapping the current range |
3735
+ | `custom` | Starts on `compareDate`; same number of days |
3736
+
3737
+ When the range ends in the future (for example `this_month`), the compared period is sized to the days that have passed.
3738
+
3739
+ A `fluctuations` object maps a metric key to its percent change, or `null` when the earlier value is `0` or missing (no made-up +100%). On some endpoints a rate changes in points instead. Endpoints that return `compare_ranges` list the four preset compare ranges (`start` and `end`, site timezone) for a date picker; `compare_range` is the range used, or `null`.
3740
+
3741
+ ```
3742
+ {
3743
+ "fluctuations": {
3744
+ "net_sales": 12.5,
3745
+ "order_count": -4.2,
3746
+ "refunds": null
3747
+ }
3748
+ }
3749
+ ```
3750
+
3751
+ ---
3752
+
3753
+ ## Error Handling
3754
+
3755
+ All report endpoints return standard WordPress REST API error responses:
3756
+
3757
+ ```
3758
+ {
3759
+ "code": "rest_forbidden",
3760
+ "message": "Sorry, you are not allowed to do that.",
3761
+ "data": {
3762
+ "status": 403
3763
+ }
3764
+ }
3765
+ ```
3766
+
3767
+ | Status Code | Description |
3768
+ | --- | --- |
3769
+ | `200` | Success |
3770
+ | `401` | Not authenticated |
3771
+ | `403` | Insufficient permissions (`reports/view` required) |
3772
+ | `404` | Unknown route, a removed endpoint, or a Pro endpoint without FluentCart Pro |
3773
+ | `500` | Server error |