fluentcart-developer 3.0.0 → 3.0.2

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 (612) hide show
  1. package/LICENSE.md +26 -26
  2. package/README.md +59 -59
  3. package/dist/cards/fluentcart/templates-native.js +1087 -1087
  4. package/dist/cards/fluentcart/tools.js +2309 -2309
  5. package/dist/server.d.ts.map +1 -1
  6. package/dist/server.js +37 -1
  7. package/dist/server.js.map +1 -1
  8. package/dist/skills/fluentcart-developer/SKILL.md +108 -108
  9. package/dist/skills/fluentcart-developer/examples/README.md +30 -30
  10. package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/fluent-cart/checkout.php +32 -32
  11. package/dist/skills/fluentcart-developer/examples/fluentcart-starter-child-theme/functions.php +40 -40
  12. package/dist/skills/fluentcart-developer/examples/sample-custom-addon/fluentcart-custom-addon.php +113 -113
  13. package/dist/skills/fluentcart-developer/examples/sample-custom-payment-gateway/fluentcart-custom-gateway-example.php +148 -148
  14. package/dist/skills/fluentcart-developer/examples/sample-fee-surcharge-plugin/fluentcart-fee-surcharge.php +38 -38
  15. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/README.md +22 -22
  16. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/sample-plugin-with-licensing-sdk.php +79 -79
  17. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/FluentLicensing.php +303 -303
  18. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/LicenseSettings.php +566 -566
  19. package/dist/skills/fluentcart-developer/examples/sample-plugin-with-licensing-sdk/updater/PluginUpdater.php +304 -304
  20. package/dist/skills/fluentcart-developer/examples/sample-shipping-carrier/fluentcart-custom-shipping-carrier.php +61 -61
  21. package/dist/skills/fluentcart-developer/references/api/authentication.md +452 -452
  22. package/dist/skills/fluentcart-developer/references/api/coupons.md +786 -786
  23. package/dist/skills/fluentcart-developer/references/api/customers.md +889 -889
  24. package/dist/skills/fluentcart-developer/references/api/files.md +609 -609
  25. package/dist/skills/fluentcart-developer/references/api/index.md +432 -432
  26. package/dist/skills/fluentcart-developer/references/api/licensing.md +633 -633
  27. package/dist/skills/fluentcart-developer/references/api/order-bump.md +384 -384
  28. package/dist/skills/fluentcart-developer/references/api/orders.md +814 -814
  29. package/dist/skills/fluentcart-developer/references/api/products.md +866 -866
  30. package/dist/skills/fluentcart-developer/references/api/roles-permissions.md +536 -536
  31. package/dist/skills/fluentcart-developer/references/api/subscriptions.md +827 -827
  32. package/dist/skills/fluentcart-developer/references/database/index.md +44 -44
  33. package/dist/skills/fluentcart-developer/references/database/models/activity.md +178 -178
  34. package/dist/skills/fluentcart-developer/references/database/models/applied-coupon.md +291 -291
  35. package/dist/skills/fluentcart-developer/references/database/models/attribute-group.md +239 -239
  36. package/dist/skills/fluentcart-developer/references/database/models/attribute-relation.md +181 -181
  37. package/dist/skills/fluentcart-developer/references/database/models/attribute-term.md +219 -219
  38. package/dist/skills/fluentcart-developer/references/database/models/cart.md +645 -645
  39. package/dist/skills/fluentcart-developer/references/database/models/coupon.md +427 -427
  40. package/dist/skills/fluentcart-developer/references/database/models/customer-addresses.md +348 -348
  41. package/dist/skills/fluentcart-developer/references/database/models/customer-meta.md +156 -156
  42. package/dist/skills/fluentcart-developer/references/database/models/customer.md +584 -584
  43. package/dist/skills/fluentcart-developer/references/database/models/dynamic-model.md +163 -163
  44. package/dist/skills/fluentcart-developer/references/database/models/label-relationship.md +155 -155
  45. package/dist/skills/fluentcart-developer/references/database/models/label.md +153 -153
  46. package/dist/skills/fluentcart-developer/references/database/models/license-activation.md +182 -182
  47. package/dist/skills/fluentcart-developer/references/database/models/license-meta.md +163 -163
  48. package/dist/skills/fluentcart-developer/references/database/models/license-site.md +208 -208
  49. package/dist/skills/fluentcart-developer/references/database/models/license.md +640 -640
  50. package/dist/skills/fluentcart-developer/references/database/models/meta.md +233 -233
  51. package/dist/skills/fluentcart-developer/references/database/models/order-address.md +391 -391
  52. package/dist/skills/fluentcart-developer/references/database/models/order-download-permission.md +144 -144
  53. package/dist/skills/fluentcart-developer/references/database/models/order-item.md +383 -383
  54. package/dist/skills/fluentcart-developer/references/database/models/order-meta.md +303 -303
  55. package/dist/skills/fluentcart-developer/references/database/models/order-operation.md +158 -158
  56. package/dist/skills/fluentcart-developer/references/database/models/order-promotion-stat.md +175 -175
  57. package/dist/skills/fluentcart-developer/references/database/models/order-promotion.md +250 -250
  58. package/dist/skills/fluentcart-developer/references/database/models/order-tax-rate.md +172 -172
  59. package/dist/skills/fluentcart-developer/references/database/models/order-transaction.md +440 -440
  60. package/dist/skills/fluentcart-developer/references/database/models/order.md +727 -727
  61. package/dist/skills/fluentcart-developer/references/database/models/product-detail.md +397 -397
  62. package/dist/skills/fluentcart-developer/references/database/models/product-download.md +258 -258
  63. package/dist/skills/fluentcart-developer/references/database/models/product-meta.md +153 -153
  64. package/dist/skills/fluentcart-developer/references/database/models/product-variation.md +556 -556
  65. package/dist/skills/fluentcart-developer/references/database/models/product.md +580 -580
  66. package/dist/skills/fluentcart-developer/references/database/models/relationships.md +427 -427
  67. package/dist/skills/fluentcart-developer/references/database/models/scheduled-action.md +175 -175
  68. package/dist/skills/fluentcart-developer/references/database/models/shipping-class.md +148 -148
  69. package/dist/skills/fluentcart-developer/references/database/models/shipping-method.md +280 -280
  70. package/dist/skills/fluentcart-developer/references/database/models/shipping-zone.md +205 -205
  71. package/dist/skills/fluentcart-developer/references/database/models/subscription-meta.md +173 -173
  72. package/dist/skills/fluentcart-developer/references/database/models/subscription.md +528 -528
  73. package/dist/skills/fluentcart-developer/references/database/models/tax-class.md +195 -195
  74. package/dist/skills/fluentcart-developer/references/database/models/tax-rate.md +225 -225
  75. package/dist/skills/fluentcart-developer/references/database/models/user-meta.md +166 -166
  76. package/dist/skills/fluentcart-developer/references/database/models/user.md +220 -220
  77. package/dist/skills/fluentcart-developer/references/database/models.md +404 -404
  78. package/dist/skills/fluentcart-developer/references/database/query-builder.md +860 -860
  79. package/dist/skills/fluentcart-developer/references/database/readme.md +276 -276
  80. package/dist/skills/fluentcart-developer/references/database/schema.md +1002 -1002
  81. package/dist/skills/fluentcart-developer/references/engineering/adding-custom-pages-to-the-customer-dashboard.md +395 -395
  82. package/dist/skills/fluentcart-developer/references/engineering/index.md +4 -4
  83. package/dist/skills/fluentcart-developer/references/engineering.md +4 -4
  84. package/dist/skills/fluentcart-developer/references/getting-started.md +249 -249
  85. package/dist/skills/fluentcart-developer/references/guides/frontend.md +519 -519
  86. package/dist/skills/fluentcart-developer/references/guides/index.md +107 -107
  87. package/dist/skills/fluentcart-developer/references/guides/integrations.md +600 -600
  88. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/index.md +237 -237
  89. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/labels-and-tracking.md +481 -481
  90. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/live-rates.md +269 -269
  91. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/reference.md +223 -223
  92. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier/settings.md +370 -370
  93. package/dist/skills/fluentcart-developer/references/guides/shipping-carrier.md +237 -237
  94. package/dist/skills/fluentcart-developer/references/guides/subscriptions.md +217 -217
  95. package/dist/skills/fluentcart-developer/references/hooks/actions/admin-and-templates.md +1079 -1079
  96. package/dist/skills/fluentcart-developer/references/hooks/actions/cart-and-checkout.md +1795 -1795
  97. package/dist/skills/fluentcart-developer/references/hooks/actions/customers-and-users.md +327 -327
  98. package/dist/skills/fluentcart-developer/references/hooks/actions/licenses.md +829 -829
  99. package/dist/skills/fluentcart-developer/references/hooks/actions/modules.md +81 -81
  100. package/dist/skills/fluentcart-developer/references/hooks/actions/orders.md +757 -757
  101. package/dist/skills/fluentcart-developer/references/hooks/actions/payments-and-integrations.md +1163 -1163
  102. package/dist/skills/fluentcart-developer/references/hooks/actions/pro-modules.md +219 -219
  103. package/dist/skills/fluentcart-developer/references/hooks/actions/products-and-coupons.md +1019 -1019
  104. package/dist/skills/fluentcart-developer/references/hooks/actions/subscriptions.md +1290 -1290
  105. package/dist/skills/fluentcart-developer/references/hooks/actions.md +16 -16
  106. package/dist/skills/fluentcart-developer/references/hooks/deprecated.md +60 -60
  107. package/dist/skills/fluentcart-developer/references/hooks/filters/cart-and-checkout.md +2032 -2032
  108. package/dist/skills/fluentcart-developer/references/hooks/filters/customers-and-subscriptions.md +1746 -1746
  109. package/dist/skills/fluentcart-developer/references/hooks/filters/integrations-and-advanced.md +2439 -2439
  110. package/dist/skills/fluentcart-developer/references/hooks/filters/modules.md +464 -464
  111. package/dist/skills/fluentcart-developer/references/hooks/filters/orders-and-payments.md +2658 -2658
  112. package/dist/skills/fluentcart-developer/references/hooks/filters/pro-modules.md +502 -502
  113. package/dist/skills/fluentcart-developer/references/hooks/filters/products-and-pricing.md +1785 -1785
  114. package/dist/skills/fluentcart-developer/references/hooks/filters/settings-and-configuration.md +2966 -2966
  115. package/dist/skills/fluentcart-developer/references/hooks/filters.md +14 -14
  116. package/dist/skills/fluentcart-developer/references/hooks/index.md +35 -35
  117. package/dist/skills/fluentcart-developer/references/index.md +625 -625
  118. package/dist/skills/fluentcart-developer/references/modules/fee-system.md +427 -427
  119. package/dist/skills/fluentcart-developer/references/modules/ghost-product-selling.md +440 -440
  120. package/dist/skills/fluentcart-developer/references/modules/index.md +484 -484
  121. package/dist/skills/fluentcart-developer/references/modules/licensing.md +342 -342
  122. package/dist/skills/fluentcart-developer/references/modules/order-bump.md +433 -433
  123. package/dist/skills/fluentcart-developer/references/modules/payment-methods.md +129 -129
  124. package/dist/skills/fluentcart-developer/references/modules/refunds.md +170 -170
  125. package/dist/skills/fluentcart-developer/references/modules/shipping.md +846 -846
  126. package/dist/skills/fluentcart-developer/references/modules/storage.md +986 -986
  127. package/dist/skills/fluentcart-developer/references/modules/subscription-vendor-ids.md +186 -186
  128. package/dist/skills/fluentcart-developer/references/modules/subscriptions.md +678 -678
  129. package/dist/skills/fluentcart-developer/references/payment-methods-integration/index.md +164 -164
  130. package/dist/skills/fluentcart-developer/references/payment-methods-integration/paddle-example.md +1648 -1648
  131. package/dist/skills/fluentcart-developer/references/payment-methods-integration/payment/setting/fields.md +353 -353
  132. package/dist/skills/fluentcart-developer/references/payment-methods-integration/quick-implementation.md +1079 -1079
  133. package/dist/skills/fluentcart-developer/references/payment-methods-integration.md +164 -164
  134. package/dist/skills/fluentcart-developer/references/restapi/checkout.md +573 -573
  135. package/dist/skills/fluentcart-developer/references/restapi/coupons.md +958 -958
  136. package/dist/skills/fluentcart-developer/references/restapi/customer-profile.md +1423 -1423
  137. package/dist/skills/fluentcart-developer/references/restapi/customers.md +1103 -1103
  138. package/dist/skills/fluentcart-developer/references/restapi/dashboard.md +1083 -1083
  139. package/dist/skills/fluentcart-developer/references/restapi/data-export.md +132 -132
  140. package/dist/skills/fluentcart-developer/references/restapi/email-notifications.md +846 -846
  141. package/dist/skills/fluentcart-developer/references/restapi/files.md +313 -313
  142. package/dist/skills/fluentcart-developer/references/restapi/index.md +127 -127
  143. package/dist/skills/fluentcart-developer/references/restapi/integrations.md +1000 -1000
  144. package/dist/skills/fluentcart-developer/references/restapi/inventory.md +192 -192
  145. package/dist/skills/fluentcart-developer/references/restapi/labels-and-attributes.md +797 -797
  146. package/dist/skills/fluentcart-developer/references/restapi/licensing.md +1733 -1733
  147. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-available-shipping-methods.md +30 -30
  148. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-checkout-summary.md +28 -28
  149. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-country-info.md +29 -29
  150. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-order-info.md +28 -28
  151. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/get-shipping-methods-list-view.md +30 -30
  152. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/login.md +66 -66
  153. package/dist/skills/fluentcart-developer/references/restapi/operations/checkout/place-order.md +179 -179
  154. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/apply-coupon.md +83 -83
  155. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/cancel-coupon.md +87 -87
  156. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/check-product-eligibility.md +59 -59
  157. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/create-coupon.md +230 -230
  158. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/delete-coupon.md +29 -29
  159. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon-settings.md +20 -20
  160. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/get-coupon.md +27 -27
  161. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupon-codes.md +20 -20
  162. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/list-coupons.md +37 -37
  163. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/re-apply-coupons.md +75 -75
  164. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/store-coupon-settings.md +40 -40
  165. package/dist/skills/fluentcart-developer/references/restapi/operations/coupons/update-coupon.md +133 -133
  166. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-address-checkout.md +138 -138
  167. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/create-profile-address.md +119 -119
  168. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/dashboard-overview.md +22 -22
  169. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/delete-profile-address.md +46 -46
  170. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-order-details.md +30 -30
  171. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-portal-sections.md +29 -29
  172. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-profile-details.md +22 -22
  173. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-transaction-billing-address.md +30 -30
  174. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/get-upgrade-paths.md +31 -31
  175. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-downloads.md +29 -29
  176. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/list-orders.md +28 -28
  177. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/make-profile-address-primary.md +55 -55
  178. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/pause-subscription.md +29 -29
  179. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/resume-subscription.md +29 -29
  180. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/save-transaction-billing-address.md +92 -92
  181. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/select-address-for-checkout.md +32 -32
  182. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-address.md +115 -115
  183. package/dist/skills/fluentcart-developer/references/restapi/operations/customer-profile/update-profile-details.md +69 -69
  184. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/attach-user.md +50 -50
  185. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/bulk-actions.md +65 -65
  186. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-address.md +135 -135
  187. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/create-customer.md +108 -108
  188. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/delete-address.md +62 -62
  189. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/detach-user.md +28 -28
  190. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/find-customer-order.md +27 -27
  191. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-attachable-users.md +20 -20
  192. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-addresses.md +28 -28
  193. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-orders.md +37 -37
  194. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer-stats.md +27 -27
  195. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/get-customer.md +32 -32
  196. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/list-customers.md +37 -37
  197. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/recalculate-ltv.md +28 -28
  198. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/set-primary-address.md +72 -72
  199. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-additional-info.md +55 -55
  200. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-address.md +144 -144
  201. package/dist/skills/fluentcart-developer/references/restapi/operations/customers/update-customer.md +123 -123
  202. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/attach-note-to-order.md +49 -49
  203. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-all-pages.md +21 -21
  204. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/create-single-page.md +55 -55
  205. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/delete-activity.md +28 -28
  206. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-country-info.md +29 -29
  207. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-dashboard-stats.md +22 -22
  208. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-filter-options.md +31 -31
  209. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-data.md +20 -20
  210. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-onboarding-settings.md +20 -20
  211. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-print-templates.md +20 -20
  212. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-search-options.md +27 -27
  213. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/get-widgets.md +28 -28
  214. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/initialize-app.md +20 -20
  215. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-activities.md +33 -33
  216. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-attachments.md +21 -21
  217. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/list-countries.md +20 -20
  218. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/mark-activity-read.md +53 -53
  219. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/run-data-backfills.md +21 -21
  220. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-settings.md +54 -54
  221. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-onboarding-tax-settings.md +73 -73
  222. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/save-print-templates.md +64 -64
  223. package/dist/skills/fluentcart-developer/references/restapi/operations/dashboard/upload-attachment.md +42 -42
  224. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-customers-batch.md +129 -129
  225. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-licenses-batch.md +133 -133
  226. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-orders-batch.md +129 -129
  227. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/export-subscriptions-batch.md +129 -129
  228. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-customers-export-schema.md +21 -21
  229. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-licenses-export-schema.md +26 -26
  230. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-orders-export-schema.md +21 -21
  231. package/dist/skills/fluentcart-developer/references/restapi/operations/data-export/get-subscriptions-export-schema.md +21 -21
  232. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/enable-notification.md +57 -57
  233. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-digest-settings.md +22 -22
  234. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-notification.md +30 -30
  235. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-reminders.md +22 -22
  236. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-settings.md +22 -22
  237. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/get-shortcodes.md +22 -22
  238. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/list-notifications.md +20 -20
  239. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-default-template.md +66 -66
  240. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/preview-notification.md +50 -50
  241. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-digest-settings.md +101 -101
  242. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-reminders.md +162 -162
  243. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/save-settings.md +99 -99
  244. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-digest-test.md +47 -47
  245. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/send-manual-reminder.md +51 -51
  246. package/dist/skills/fluentcart-developer/references/restapi/operations/email-notification/update-notification.md +93 -93
  247. package/dist/skills/fluentcart-developer/references/restapi/operations/files/delete-file.md +31 -31
  248. package/dist/skills/fluentcart-developer/references/restapi/operations/files/get-bucket-list.md +28 -28
  249. package/dist/skills/fluentcart-developer/references/restapi/operations/files/list-files.md +30 -30
  250. package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-editor-file.md +32 -32
  251. package/dist/skills/fluentcart-developer/references/restapi/operations/files/upload-file.md +34 -34
  252. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/chained-data-request.md +46 -46
  253. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/change-feed-status.md +51 -51
  254. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/delete-feed.md +27 -27
  255. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-dynamic-options.md +29 -29
  256. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-lists.md +27 -27
  257. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-feed-settings.md +27 -27
  258. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-feeds.md +20 -20
  259. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/get-global-settings.md +26 -26
  260. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/install-addon-plugin.md +49 -49
  261. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/list-addons.md +20 -20
  262. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/save-feed-settings.md +52 -52
  263. package/dist/skills/fluentcart-developer/references/restapi/operations/integration/set-global-settings.md +50 -50
  264. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/bulk-update-stock.md +94 -94
  265. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/export-inventory.md +81 -81
  266. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-adjustment-history.md +26 -26
  267. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/get-inventory-stats.md +21 -21
  268. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/list-inventory.md +33 -33
  269. package/dist/skills/fluentcart-developer/references/restapi/operations/inventory/update-stock.md +75 -75
  270. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-attribute-group.md +31 -31
  271. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-label.md +31 -31
  272. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/create-terms.md +90 -90
  273. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-group.md +28 -28
  274. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/delete-attribute-term.md +29 -29
  275. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-group.md +28 -28
  276. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/get-attribute-library.md +20 -20
  277. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-groups.md +32 -32
  278. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-attribute-terms.md +33 -33
  279. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/list-labels.md +20 -20
  280. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-groups.md +51 -51
  281. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/reorder-terms.md +56 -56
  282. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-group.md +37 -37
  283. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-attribute-term.md +39 -39
  284. package/dist/skills/fluentcart-developer/references/restapi/operations/labels-attributes/update-label-selections.md +32 -32
  285. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-plugin-license.md +41 -41
  286. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/activate-site-admin.md +60 -60
  287. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-plugin-license.md +18 -18
  288. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-admin.md +67 -67
  289. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/deactivate-site-customer.md +47 -47
  290. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/delete-license.md +24 -24
  291. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/extend-license-validity.md +47 -47
  292. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-license-details.md +25 -25
  293. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-customer-licenses-admin.md +26 -26
  294. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-activations.md +25 -25
  295. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-details.md +25 -25
  296. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-license-site.md +30 -30
  297. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-plugin-license-status.md +18 -18
  298. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/get-product-license-settings.md +24 -24
  299. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-customer-licenses.md +25 -25
  300. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-license-sites.md +33 -33
  301. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/list-licenses.md +38 -38
  302. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-activate-license.md +54 -54
  303. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-check-license.md +26 -26
  304. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-deactivate-license.md +46 -46
  305. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-download-license-package.md +23 -23
  306. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/public-get-license-version.md +26 -26
  307. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/regenerate-license-key.md +24 -24
  308. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/save-product-license-settings.md +193 -193
  309. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-activation-limit.md +53 -53
  310. package/dist/skills/fluentcart-developer/references/restapi/operations/licensing/update-license-status.md +52 -52
  311. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/create-order-bump.md +47 -47
  312. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/delete-order-bump.md +25 -25
  313. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/get-order-bump.md +25 -25
  314. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/list-order-bumps.md +29 -29
  315. package/dist/skills/fluentcart-developer/references/restapi/operations/order-bumps/update-order-bump.md +141 -141
  316. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/accept-dispute.md +47 -47
  317. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/bulk-actions.md +72 -72
  318. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-shipping.md +67 -67
  319. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/calculate-tax.md +98 -98
  320. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/change-customer.md +50 -50
  321. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/charge-now.md +29 -29
  322. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-and-change-customer.md +92 -92
  323. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-custom-order-item.md +68 -68
  324. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-order.md +351 -351
  325. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/create-renewal-now.md +29 -29
  326. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/delete-order.md +28 -28
  327. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/generate-missing-licenses.md +29 -29
  328. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order-transactions.md +27 -27
  329. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-order.md +27 -27
  330. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-renewal.md +28 -28
  331. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-shipping-methods.md +28 -28
  332. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/get-single-transaction.md +28 -28
  333. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-order-currencies.md +22 -22
  334. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-orders.md +42 -42
  335. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/list-renewals.md +28 -28
  336. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/mark-as-paid.md +61 -61
  337. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/price-order.md +135 -135
  338. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/refund-order.md +72 -72
  339. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/resend-renewal-invoice.md +29 -29
  340. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/skip-renewal.md +48 -48
  341. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-order-statuses.md +28 -28
  342. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/sync-pending-transaction.md +29 -29
  343. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address-id.md +60 -60
  344. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order-address.md +98 -98
  345. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-order.md +172 -172
  346. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-statuses.md +77 -77
  347. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-subscription-details.md +84 -84
  348. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/update-transaction-status.md +51 -51
  349. package/dist/skills/fluentcart-developer/references/restapi/operations/orders/void-renewal.md +30 -30
  350. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/create-pdf-template.md +42 -42
  351. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/delete-pdf-template.md +26 -26
  352. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/download-pdf-preview.md +44 -44
  353. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-factory-default-templates.md +19 -19
  354. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-status.md +21 -21
  355. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-pdf-template.md +26 -26
  356. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-saved-templates.md +21 -21
  357. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/get-seller-details.md +19 -19
  358. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/list-pdf-templates.md +19 -19
  359. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-pdf-template.md +53 -53
  360. package/dist/skills/fluentcart-developer/references/restapi/operations/pdf-templates/save-seller-details.md +97 -97
  361. package/dist/skills/fluentcart-developer/references/restapi/operations/products/add-product-terms.md +64 -64
  362. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-edit-fetch.md +30 -30
  363. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-insert-products.md +62 -62
  364. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-products.md +59 -59
  365. package/dist/skills/fluentcart-developer/references/restapi/operations/products/bulk-update-variants.md +83 -83
  366. package/dist/skills/fluentcart-developer/references/restapi/operations/products/change-integration-status.md +64 -64
  367. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-dummy-products.md +45 -45
  368. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-product.md +81 -81
  369. package/dist/skills/fluentcart-developer/references/restapi/operations/products/create-variation.md +181 -181
  370. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-downloadable-file.md +27 -27
  371. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product-integration.md +30 -30
  372. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-product.md +27 -27
  373. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-taxonomy-term.md +55 -55
  374. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-upgrade-path.md +27 -27
  375. package/dist/skills/fluentcart-developer/references/restapi/operations/products/delete-variation.md +27 -27
  376. package/dist/skills/fluentcart-developer/references/restapi/operations/products/do-bulk-action.md +56 -56
  377. package/dist/skills/fluentcart-developer/references/restapi/operations/products/duplicate-product.md +56 -56
  378. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-products-by-ids.md +26 -26
  379. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-taxonomy-terms.md +20 -20
  380. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-terms-by-parent.md +60 -60
  381. package/dist/skills/fluentcart-developer/references/restapi/operations/products/fetch-variations-by-ids.md +26 -26
  382. package/dist/skills/fluentcart-developer/references/restapi/operations/products/find-subscription-variants.md +26 -26
  383. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-bundle-info.md +27 -27
  384. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-downloadable-url.md +27 -27
  385. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-max-excerpt-word-count.md +20 -20
  386. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-pricing-widgets.md +27 -27
  387. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-feeds.md +29 -29
  388. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-integration-settings.md +31 -31
  389. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product-pricing.md +28 -28
  390. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-product.md +28 -28
  391. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-related-products.md +31 -31
  392. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-upgrade-settings.md +27 -27
  393. package/dist/skills/fluentcart-developer/references/restapi/operations/products/get-variation-upgrade-paths.md +28 -28
  394. package/dist/skills/fluentcart-developer/references/restapi/operations/products/group-bulk-update-variants.md +103 -103
  395. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-all-variants.md +26 -26
  396. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-product-variations.md +26 -26
  397. package/dist/skills/fluentcart-developer/references/restapi/operations/products/list-products.md +34 -34
  398. package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-shipping-class.md +27 -27
  399. package/dist/skills/fluentcart-developer/references/restapi/operations/products/remove-tax-class.md +27 -27
  400. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-bundle-info.md +56 -56
  401. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-product-integration.md +62 -62
  402. package/dist/skills/fluentcart-developer/references/restapi/operations/products/save-upgrade-path.md +78 -78
  403. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-product-variant-options.md +29 -29
  404. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-products-by-name.md +28 -28
  405. package/dist/skills/fluentcart-developer/references/restapi/operations/products/search-variants-by-name.md +28 -28
  406. package/dist/skills/fluentcart-developer/references/restapi/operations/products/set-variation-media.md +74 -74
  407. package/dist/skills/fluentcart-developer/references/restapi/operations/products/suggest-sku.md +28 -28
  408. package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-downloadable-files.md +134 -134
  409. package/dist/skills/fluentcart-developer/references/restapi/operations/products/sync-taxonomy-terms.md +61 -61
  410. package/dist/skills/fluentcart-developer/references/restapi/operations/products/toggle-product-tax-exemption.md +56 -56
  411. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-downloadable-file.md +98 -98
  412. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-inventory.md +56 -56
  413. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-long-desc-editor-mode.md +49 -49
  414. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-manage-stock.md +53 -53
  415. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-detail.md +58 -58
  416. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-product-pricing.md +225 -225
  417. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-shipping-class.md +49 -49
  418. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-tax-class.md +49 -49
  419. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-upgrade-path.md +78 -78
  420. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-option.md +79 -79
  421. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variant-tax-exemption.md +56 -56
  422. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation-pricing-table.md +49 -49
  423. package/dist/skills/fluentcart-developer/references/restapi/operations/products/update-variation.md +105 -105
  424. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/get-product-views.md +34 -34
  425. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/list-products.md +42 -42
  426. package/dist/skills/fluentcart-developer/references/restapi/operations/public-shop/search-products.md +30 -30
  427. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/channel-rules.md +24 -24
  428. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/country-heat-map.md +22 -22
  429. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupon-overview.md +37 -37
  430. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/coupons.md +36 -36
  431. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-insights.md +31 -31
  432. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-overview.md +36 -36
  433. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-repeat.md +35 -35
  434. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segment-customers.md +36 -36
  435. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-segments.md +30 -30
  436. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/customer-value.md +34 -34
  437. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/dashboard-stats.md +30 -30
  438. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/failed-orders.md +34 -34
  439. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-new-vs-returning-customer.md +34 -34
  440. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-by-day-and-hour.md +34 -34
  441. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-report-meta.md +29 -29
  442. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/fetch-top-sold-products.md +34 -34
  443. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/future-renewals.md +31 -31
  444. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/generate-retention-snapshots.md +24 -24
  445. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-overview.md +30 -30
  446. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-activities.md +26 -26
  447. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-recent-orders.md +20 -20
  448. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/get-revenue.md +37 -37
  449. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-at-risk.md +35 -35
  450. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments-variations.md +33 -33
  451. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/installments.md +33 -33
  452. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/item-count-distribution.md +34 -34
  453. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-chart.md +30 -30
  454. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-pie-chart.md +22 -22
  455. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/license-summary.md +22 -22
  456. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/locations.md +43 -43
  457. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-chart.md +37 -37
  458. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-completion-time.md +34 -34
  459. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-mix.md +34 -34
  460. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/order-value-distribution.md +34 -34
  461. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-disputes.md +38 -38
  462. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods-methods.md +36 -36
  463. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/payment-methods.md +37 -37
  464. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison-launch.md +33 -33
  465. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-comparison.md +40 -40
  466. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-detail.md +37 -37
  467. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/product-sales.md +37 -37
  468. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/refunds-overview.md +37 -37
  469. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/retention-snapshots-step.md +45 -45
  470. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sales-growth-chart.md +35 -35
  471. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/save-channel-rules.md +73 -73
  472. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/source-channels.md +37 -37
  473. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/sources.md +49 -49
  474. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-cohorts.md +33 -33
  475. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-health.md +30 -30
  476. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-rebuys.md +37 -37
  477. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-retention.md +34 -34
  478. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscription-variations.md +22 -22
  479. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/subscriptions-overview.md +37 -37
  480. package/dist/skills/fluentcart-developer/references/restapi/operations/reports/weeks-between-refund.md +34 -34
  481. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/assign-role.md +48 -48
  482. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/delete-role-assignment.md +47 -47
  483. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/get-role.md +25 -25
  484. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-managers.md +18 -18
  485. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/list-roles.md +18 -18
  486. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/search-users.md +25 -25
  487. package/dist/skills/fluentcart-developer/references/restapi/operations/roles-permissions/update-role.md +43 -43
  488. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/create-saved-view.md +106 -106
  489. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/delete-saved-view.md +26 -26
  490. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/list-saved-views.md +25 -25
  491. package/dist/skills/fluentcart-developer/references/restapi/operations/saved-views/update-saved-view.md +83 -83
  492. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-payment-addon.md +44 -44
  493. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/activate-plugin-addon.md +44 -44
  494. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/change-storage-driver-status.md +56 -56
  495. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/check-paypal-webhook.md +26 -26
  496. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/create-storage-bucket.md +63 -63
  497. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/disconnect-payment-method.md +55 -55
  498. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/exchange-paypal-seller-auth-token.md +62 -62
  499. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-active-storage-drivers.md +20 -20
  500. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-checkout-fields.md +22 -22
  501. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-email-shortcodes.md +20 -20
  502. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-config-snippets.md +26 -26
  503. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-mcp-status.md +20 -20
  504. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-module-settings.md +20 -20
  505. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-connection-info.md +26 -26
  506. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-payment-method-settings.md +26 -26
  507. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-permissions.md +22 -22
  508. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-plugin-addons.md +20 -20
  509. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-storage-driver-settings.md +27 -27
  510. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/get-store-settings.md +26 -26
  511. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-mcp-adapter.md +21 -21
  512. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-payment-addon.md +60 -60
  513. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/install-plugin-addon.md +64 -64
  514. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-payment-methods.md +20 -20
  515. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-all-storage-drivers.md +20 -20
  516. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/list-storage-buckets.md +67 -67
  517. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reorder-payment-methods.md +55 -55
  518. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/reset-storage-driver-settings.md +45 -45
  519. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-checkout-fields.md +133 -133
  520. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-confirmation-settings.md +68 -68
  521. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-module-settings.md +68 -68
  522. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-design.md +67 -67
  523. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-payment-method-settings.md +58 -58
  524. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-permissions.md +68 -68
  525. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-storage-driver-settings.md +62 -62
  526. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/save-store-settings.md +239 -239
  527. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/setup-paypal-webhook.md +48 -48
  528. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/toggle-mcp.md +40 -40
  529. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-storage-driver-connection.md +62 -62
  530. package/dist/skills/fluentcart-developer/references/restapi/operations/settings/verify-turnstile-keys.md +55 -55
  531. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-class.md +73 -73
  532. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-method.md +110 -110
  533. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/create-shipping-zone.md +56 -56
  534. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-class.md +29 -29
  535. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-method.md +29 -29
  536. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/delete-shipping-zone.md +29 -29
  537. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class-profile.md +30 -30
  538. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-class.md +29 -29
  539. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-packages.md +22 -22
  540. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-shipping-zone.md +27 -27
  541. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-countries.md +22 -22
  542. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/get-zone-states.md +28 -28
  543. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-classes.md +31 -31
  544. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/list-shipping-zones.md +31 -31
  545. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/save-shipping-packages.md +112 -112
  546. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-class.md +79 -79
  547. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-method.md +113 -113
  548. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-shipping-zone.md +62 -62
  549. package/dist/skills/fluentcart-developer/references/restapi/operations/shipping/update-zone-order.md +52 -52
  550. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-auto-renew.md +30 -30
  551. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/cancel-subscription.md +52 -52
  552. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/confirm-subscription-switch.md +70 -70
  553. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/fetch-subscription-remote.md +28 -28
  554. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/generate-early-payment-link.md +29 -29
  555. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-customer-subscription.md +27 -27
  556. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-or-create-plan.md +69 -69
  557. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-setup-intent-attempts.md +30 -30
  558. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/get-subscription.md +28 -28
  559. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/initiate-early-payment.md +31 -31
  560. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-customer-subscriptions.md +27 -27
  561. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/list-subscriptions.md +39 -39
  562. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/pause-subscription.md +28 -28
  563. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/reactivate-subscription.md +28 -28
  564. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/resume-subscription.md +28 -28
  565. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/switch-payment-method.md +70 -70
  566. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-payment-method.md +69 -69
  567. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/update-vendor-ids.md +56 -56
  568. package/dist/skills/fluentcart-developer/references/restapi/operations/subscriptions/verify-vendor-ids.md +56 -56
  569. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-class.md +51 -51
  570. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/create-tax-rate.md +117 -117
  571. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-product-override.md +27 -27
  572. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-shipping-tax-override.md +27 -27
  573. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-class.md +28 -28
  574. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/delete-tax-rate.md +27 -27
  575. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-id.md +27 -27
  576. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-country-tax-rates.md +28 -28
  577. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-eu-vat-product-overrides.md +20 -20
  578. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-oss-country-rates.md +20 -20
  579. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-preconfigured-tax-rates.md +20 -20
  580. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-product-overrides.md +27 -27
  581. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/get-tax-settings.md +20 -20
  582. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-all-tax-rates.md +20 -20
  583. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-classes.md +20 -20
  584. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/list-tax-records.md +37 -37
  585. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/mark-taxes-as-filed.md +58 -58
  586. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/reset-eu-vat-rates.md +21 -21
  587. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-configured-countries.md +57 -57
  588. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-country-tax-id.md +50 -50
  589. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-eu-vat-cross-border-settings.md +127 -127
  590. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-oss-country-rates.md +100 -100
  591. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-product-override.md +110 -110
  592. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-shipping-tax-override.md +52 -52
  593. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/save-tax-settings.md +166 -166
  594. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-country-status.md +54 -54
  595. package/dist/skills/fluentcart-developer/references/restapi/operations/tax/update-tax-rate.md +116 -116
  596. package/dist/skills/fluentcart-developer/references/restapi/order-bumps.md +433 -433
  597. package/dist/skills/fluentcart-developer/references/restapi/orders.md +1212 -1212
  598. package/dist/skills/fluentcart-developer/references/restapi/pdf-templates.md +212 -212
  599. package/dist/skills/fluentcart-developer/references/restapi/products.md +2485 -2485
  600. package/dist/skills/fluentcart-developer/references/restapi/public-shop.md +191 -191
  601. package/dist/skills/fluentcart-developer/references/restapi/reports.md +3773 -3773
  602. package/dist/skills/fluentcart-developer/references/restapi/roles.md +403 -403
  603. package/dist/skills/fluentcart-developer/references/restapi/saved-views.md +136 -136
  604. package/dist/skills/fluentcart-developer/references/restapi/settings.md +1423 -1423
  605. package/dist/skills/fluentcart-developer/references/restapi/shipping.md +905 -905
  606. package/dist/skills/fluentcart-developer/references/restapi/subscriptions.md +1169 -1169
  607. package/dist/skills/fluentcart-developer/references/restapi/tax.md +1551 -1551
  608. package/dist/skills/fluentcart-developer/references/restapi.md +127 -127
  609. package/dist/skills/fluentcart-developer/scripts/cli.js +1 -1
  610. package/dist/version.d.ts +1 -1
  611. package/dist/version.js +1 -1
  612. package/package.json +66 -65
@@ -1,1551 +1,1551 @@
1
- # Tax API
2
-
3
- Configure tax classes, manage country-specific tax rates, set up tax configuration, and handle EU VAT/OSS compliance.
4
-
5
- **Base URL:** `https://your-site.com/wp-json/fluent-cart/v2`
6
-
7
- > All monetary values are in **cents** (e.g., `$10.00` = `1000`).
8
-
9
- ---
10
-
11
- ## Tax Filing
12
-
13
- Manage order-level tax records for filing and reporting purposes.
14
-
15
- **Prefix:** `/fluent-cart/v2/taxes`**Policy:** `AdminPolicy`
16
-
17
- ---
18
-
19
- ### List Tax Records
20
-
21
- GET `/fluent-cart/v2/taxes`
22
-
23
- Retrieve a paginated list of order tax rate records with optional filtering, sorting, and search. Records represent taxes applied to individual orders.
24
-
25
- ### Parameters
26
-
27
- | Parameter | Type | Location | Required | Description |
28
- | --- | --- | --- | --- | --- |
29
- | `page` | integer | query | No | Page number for pagination |
30
- | `per_page` | integer | query | No | Number of records per page (default: 10, max: 200) |
31
- | `search` | string | query | No | Search term. If numeric, searches by `id` or `order_id`. Also searches related tax rate `country`, `state`, `postcode`, and `name` fields. Supports operator syntax (e.g., `id = 5`, `order_id > 100`) |
32
- | `sort_by` | string | query | No | Column to sort by (default: `id`). Must be a fillable column on the OrderTaxRate model |
33
- | `sort_type` | string | query | No | Sort direction: `asc` or `desc` (default: `desc`) |
34
- | `active_view` | string | query | No | Tab filter. One of: `filed` (records with `filed_at` set), `not_filed` (records without `filed_at`) |
35
- | `filter_type` | string | query | No | Filter mode: `simple` (default) or `advanced` |
36
- | `advanced_filters` | string (JSON) | query | No | JSON-encoded array of advanced filter groups. Supports filtering by country, region, tax name, and filed status |
37
- | `with` | array/string | query | No | Eager-load relations (e.g., `order`, `tax_rate`) |
38
- | `select` | array/string | query | No | Comma-separated list of columns to select |
39
- | `include_ids` | array/string | query | No | Comma-separated IDs that must always be included in results |
40
- | `user_tz` | string | query | No | User timezone for date filtering (e.g., `America/New_York`) |
41
-
42
- ### Advanced Filter Options
43
-
44
- | Category | Field | Column | Type | Description |
45
- | --- | --- | --- | --- | --- |
46
- | Tax Property | Country | `country` | selections (relation: `tax_rate`) | Filter by tax rate country code |
47
- | Tax Property | Region | `state` | selections (relation: `tax_rate`) | Filter by tax rate state/region |
48
- | Tax Property | Tax Name | `name` | text (relation: `tax_rate`) | Filter by tax rate name |
49
- | Tax Property | Filed | `filed_at` | selections | `filed` or `not_filed` |
50
-
51
- ### Response
52
-
53
- ```
54
- {
55
- "taxes": {
56
- "current_page": 1,
57
- "data": [
58
- {
59
- "id": 1,
60
- "order_id": 42,
61
- "tax_rate_id": 5,
62
- "shipping_tax": 150,
63
- "order_tax": 1000,
64
- "total_tax": 1150,
65
- "meta": {
66
- "rates": [],
67
- "tax_country": "US",
68
- "store_vat_number": ""
69
- },
70
- "filed_at": null,
71
- "created_at": "2025-06-01 12:00:00",
72
- "updated_at": "2025-06-01 12:00:00"
73
- }
74
- ],
75
- "per_page": 10,
76
- "total": 50,
77
- "last_page": 5
78
- }
79
- }
80
- ```
81
-
82
- ### Example
83
-
84
- ```
85
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/taxes?page=1&per_page=20&active_view=not_filed" \
86
- -u "username:app_password"
87
- ```
88
-
89
- ---
90
-
91
- ### Mark Taxes as Filed
92
-
93
- POST `/fluent-cart/v2/taxes`
94
-
95
- Mark one or more order tax records as filed by setting their `filed_at` timestamp. Only records that have not yet been filed will be updated.
96
-
97
- ### Parameters
98
-
99
- | Parameter | Type | Location | Required | Description |
100
- | --- | --- | --- | --- | --- |
101
- | `ids` | array of integers | body | Yes | Array of `OrderTaxRate` record IDs to mark as filed |
102
-
103
- ### Response
104
-
105
- ```
106
- {
107
- "message": "Taxes marked as filed successfully"
108
- }
109
- ```
110
-
111
- ### Error Response (400)
112
-
113
- ```
114
- {
115
- "message": "No IDs provided to mark!"
116
- }
117
- ```
118
-
119
- ### Example
120
-
121
- ```
122
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/taxes" \
123
- -u "username:app_password" \
124
- -H "Content-Type: application/json" \
125
- -d '{"ids": [1, 2, 3, 5]}'
126
- ```
127
-
128
- ---
129
-
130
- ## Tax Classes
131
-
132
- Manage tax classes that group tax rates by category (e.g., Standard, Reduced, Zero).
133
-
134
- **Prefix:** `/fluent-cart/v2/tax/classes`**Policy:** `StoreSettingsPolicy`
135
-
136
- A maximum of **6** tax classes is allowed. The built-in `standard` class always exists and cannot be deleted; `reduced` and `zero` are built-in classes that can be created on demand.
137
-
138
- ---
139
-
140
- ### List Tax Classes
141
-
142
- GET `/fluent-cart/v2/tax/classes`
143
-
144
- Retrieve all tax classes ordered by ID (oldest first), along with the maximum allowed number of classes and the next built-in class (`reduced` or `zero`) that has not been created yet.
145
-
146
- ### Parameters
147
-
148
- No query parameters required.
149
-
150
- ### Response
151
-
152
- ```
153
- {
154
- "classes": [
155
- {
156
- "id": 1,
157
- "title": "Standard",
158
- "slug": "standard",
159
- "meta": [],
160
- "created_at": "2025-01-01 00:00:00",
161
- "updated_at": "2025-01-01 00:00:00"
162
- },
163
- {
164
- "id": 2,
165
- "title": "Reduced",
166
- "slug": "reduced",
167
- "meta": [],
168
- "created_at": "2025-01-01 00:00:00",
169
- "updated_at": "2025-01-01 00:00:00"
170
- }
171
- ],
172
- "max_classes": 6,
173
- "next_builtin": {
174
- "slug": "zero",
175
- "title": "Zero"
176
- }
177
- }
178
- ```
179
-
180
- `next_builtin` is `null` when both built-in classes (`reduced`, `zero`) already exist.
181
-
182
- ### Example
183
-
184
- ```
185
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/classes" \
186
- -u "username:app_password"
187
- ```
188
-
189
- ---
190
-
191
- ### Create Tax Class
192
-
193
- POST `/fluent-cart/v2/tax/classes`
194
-
195
- Create a new tax class. A unique slug is auto-generated from the title. Pass `slug` `"reduced"` or `"zero"` to create one of the built-in classes (the title is then set automatically).
196
-
197
- ### Parameters
198
-
199
- | Parameter | Type | Location | Required | Description |
200
- | --- | --- | --- | --- | --- |
201
- | `title` | string | body | Yes* | Tax class title (max 30 characters). Required unless a built-in `slug` is passed |
202
- | `slug` | string | body | No | Pass a built-in slug (`reduced` or `zero`) to create that built-in class; otherwise the slug is auto-generated from the title |
203
-
204
- ### Constraints
205
-
206
- | Condition | Status | Error |
207
- | --- | --- | --- |
208
- | 6 tax classes already exist | 423 | `"Maximum of 6 tax classes allowed"` |
209
- | Built-in class already exists | 423 | `"This tax class already exists"` |
210
- | Title missing (non-built-in) | 423 | `"Tax class name is required"` |
211
- | Title longer than 30 characters | 422 | `"Tax class name must be 30 characters or fewer"` |
212
- | A class with the same slug exists | 423 | `"A tax class with this name already exists"` |
213
-
214
- ### Response
215
-
216
- ```
217
- {
218
- "class": {
219
- "id": 4,
220
- "title": "Digital Goods",
221
- "slug": "digital-goods",
222
- "meta": [],
223
- "created_at": "2025-06-01 12:00:00",
224
- "updated_at": "2025-06-01 12:00:00"
225
- },
226
- "message": "Tax class created successfully"
227
- }
228
- ```
229
-
230
- ### Example
231
-
232
- ```
233
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/classes" \
234
- -u "username:app_password" \
235
- -H "Content-Type: application/json" \
236
- -d '{"title": "Digital Goods"}'
237
- ```
238
-
239
- ---
240
-
241
- ### Delete Tax Class
242
-
243
- DELETE `/fluent-cart/v2/tax/classes/{id}`
244
-
245
- Delete a tax class by ID. The built-in `standard` class cannot be deleted. Products, variations, EU registrations, product overrides, and tax rates referencing the deleted class fall back to the Standard class.
246
-
247
- ### Parameters
248
-
249
- | Parameter | Type | Location | Required | Description |
250
- | --- | --- | --- | --- | --- |
251
- | `id` | integer | path | Yes | Tax class ID |
252
-
253
- ### Response
254
-
255
- ```
256
- {
257
- "message": "Tax class deleted successfully"
258
- }
259
- ```
260
-
261
- ### Error Responses
262
-
263
- | Status | Error |
264
- | --- | --- |
265
- | 423 | `"Cannot delete the Standard tax class"` |
266
- | 423 | `"Standard tax class could not be found"` |
267
- | 400 | `"Failed to delete tax class"` |
268
-
269
- ### Example
270
-
271
- ```
272
- curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/classes/4" \
273
- -u "username:app_password"
274
- ```
275
-
276
- ---
277
-
278
- ## Tax Rates
279
-
280
- Manage country-specific tax rates, shipping tax overrides, and country tax IDs.
281
-
282
- **Prefix:** `/fluent-cart/v2/tax`**Policy:** `StoreSettingsPolicy`
283
-
284
- ---
285
-
286
- ### List All Tax Rates
287
-
288
- GET `/fluent-cart/v2/tax/rates`
289
-
290
- Retrieve all tax rates from the database, grouped by continent/region and country.
291
-
292
- ### Parameters
293
-
294
- No query parameters required.
295
-
296
- ### Response
297
-
298
- Returns tax rates grouped by geographic region, with each group containing countries and their respective rates.
299
-
300
- ```
301
- {
302
- "tax_rates": [
303
- {
304
- "group_name": "European Union",
305
- "group_code": "EU",
306
- "countries": [
307
- {
308
- "country_code": "DE",
309
- "country_name": "Germany",
310
- "rates": [
311
- {
312
- "class_id": 1,
313
- "name": "DE Standard Tax",
314
- "rate": "19.0000",
315
- "for_shipping": null
316
- },
317
- {
318
- "class_id": 2,
319
- "name": "DE Reduced Tax",
320
- "rate": "7.0000",
321
- "for_shipping": null
322
- }
323
- ],
324
- "total_rates": 2
325
- }
326
- ],
327
- "total_countries": 1
328
- },
329
- {
330
- "group_name": "North America",
331
- "group_code": "NA",
332
- "countries": [
333
- {
334
- "country_code": "US",
335
- "country_name": "United States",
336
- "rates": [
337
- {
338
- "class_id": 1,
339
- "name": "US Standard Tax",
340
- "rate": "10.0000",
341
- "for_shipping": null
342
- }
343
- ],
344
- "total_rates": 1
345
- }
346
- ],
347
- "total_countries": 1
348
- }
349
- ]
350
- }
351
- ```
352
-
353
- ### Example
354
-
355
- ```
356
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/rates" \
357
- -u "username:app_password"
358
- ```
359
-
360
- ---
361
-
362
- ### Get Country Tax Rates
363
-
364
- GET `/fluent-cart/v2/tax/rates/country/rates/{country_code}`
365
-
366
- Retrieve all tax rates for a specific country (ordered by priority, then ID), the country-level form configuration, and whether tax is enabled for the country.
367
-
368
- ### Parameters
369
-
370
- | Parameter | Type | Location | Required | Description |
371
- | --- | --- | --- | --- | --- |
372
- | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`, `GB`) |
373
- | `class_id` | integer | query | No | Filter rates by tax class ID |
374
-
375
- ### Response
376
-
377
- ```
378
- {
379
- "tax_rates": [
380
- {
381
- "id": 5,
382
- "class_id": 1,
383
- "country": "DE",
384
- "state": "",
385
- "postcode": "",
386
- "city": "",
387
- "rate": "19.0000",
388
- "name": "DE Standard Tax",
389
- "group": "EU",
390
- "priority": 1,
391
- "is_compound": 0,
392
- "for_shipping": null,
393
- "for_order": 0,
394
- "formatted_state": ""
395
- }
396
- ],
397
- "settings": {
398
- "hidden": ["city", "zip", "state"]
399
- },
400
- "tax_enabled": true
401
- }
402
- ```
403
-
404
- | Field | Type | Description |
405
- | --- | --- | --- |
406
- | `tax_rates` | array | Tax rate rows for the country |
407
- | `settings` | object/null | Country-level form configuration from the built-in tax config. `hidden` lists address fields hidden in the rate form. Falls back to the continent configuration (e.g., `EU`); `null` when neither defines one |
408
- | `tax_enabled` | boolean | Whether tax collection is enabled for this country (default: `true`) |
409
-
410
- ### Example
411
-
412
- ```
413
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/rates/country/rates/DE" \
414
- -u "username:app_password"
415
- ```
416
-
417
- ---
418
-
419
- ### Update Country Tax Status
420
-
421
- POST `/fluent-cart/v2/tax/country-status/{country_code}`
422
-
423
- Enable or disable tax collection for a specific country. Accepts an ISO country code or the special code `EU` to toggle the whole EU group. By default every country is enabled; disabling stores a flag in the `fct_meta` table.
424
-
425
- ### Parameters
426
-
427
- | Parameter | Type | Location | Required | Description |
428
- | --- | --- | --- | --- | --- |
429
- | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`) or `EU` for the EU group |
430
- | `enabled` | integer | body | Yes | `1` to enable tax for the country, `0` to disable |
431
-
432
- ### Response
433
-
434
- ```
435
- {
436
- "enabled": true,
437
- "message": "Tax has been enabled successfully"
438
- }
439
- ```
440
-
441
- ### Error Response (422)
442
-
443
- ```
444
- {
445
- "message": "Invalid country code"
446
- }
447
- ```
448
-
449
- ### Example
450
-
451
- ```
452
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/country-status/DE" \
453
- -u "username:app_password" \
454
- -H "Content-Type: application/json" \
455
- -d '{"enabled": 0}'
456
- ```
457
-
458
- ---
459
-
460
- ### Create Tax Rate
461
-
462
- POST `/fluent-cart/v2/tax/country/rate`
463
-
464
- Create a new tax rate entry for a country.
465
-
466
- ### Parameters
467
-
468
- | Parameter | Type | Location | Required | Description |
469
- | --- | --- | --- | --- | --- |
470
- | `class_id` | integer | body | Yes | ID of the tax class this rate belongs to |
471
- | `country` | string | body | No | ISO 3166-1 alpha-2 country code (max 45 characters) |
472
- | `state` | string | body | No | State/province code (max 45 characters) |
473
- | `postcode` | string | body | No | Postcode/ZIP code (max 45 characters) |
474
- | `city` | string | body | No | City name (max 45 characters) |
475
- | `rate` | string | body | No | Tax rate percentage (e.g., `"19.0000"`, max 45 characters) |
476
- | `name` | string | body | No | Display name for the tax rate (max 45 characters) |
477
- | `group` | string | body | No | Geographic group/continent code, e.g., `EU`, `NA` (max 45 characters) |
478
- | `priority` | integer | body | No | Priority for rate application order (min: 1) |
479
- | `is_compound` | integer | body | No | Whether this rate is compound (applied on top of other taxes). `0` or `1` (default: `0`) |
480
- | `for_shipping` | integer | body | No | Shipping tax override rate. `null` means no override |
481
- | `for_order` | integer | body | No | Whether this rate applies at order level. `0` or `1` (default: `0`) |
482
-
483
- ### Validation Rules
484
-
485
- | Field | Rules |
486
- | --- | --- |
487
- | `class_id` | Required, minimum 0 |
488
- | `country` | Nullable, sanitized text, max 45 characters |
489
- | `state` | Nullable, sanitized text, max 45 characters |
490
- | `postcode` | Nullable, sanitized text, max 45 characters |
491
- | `city` | Nullable, sanitized text, max 45 characters |
492
- | `rate` | Nullable, sanitized text, max 45 characters |
493
- | `name` | Nullable, sanitized text, max 45 characters |
494
- | `group` | Nullable, sanitized text, max 45 characters |
495
- | `priority` | Nullable, numeric, minimum 1 |
496
- | `is_compound` | Nullable, numeric, minimum 0 |
497
- | `for_shipping` | Nullable, numeric, minimum 0 |
498
- | `for_order` | Nullable, numeric, minimum 0 |
499
-
500
- ### Response
501
-
502
- ```
503
- {
504
- "tax_rate": {
505
- "id": 10,
506
- "class_id": 1,
507
- "country": "FR",
508
- "state": "",
509
- "postcode": "",
510
- "city": "",
511
- "rate": "20.0000",
512
- "name": "FR Standard Tax",
513
- "group": "EU",
514
- "priority": 1,
515
- "is_compound": 0,
516
- "for_shipping": null,
517
- "for_order": 0,
518
- "formatted_state": "",
519
- "tax_class": {
520
- "id": 1,
521
- "title": "Standard"
522
- }
523
- },
524
- "message": "Tax rate has been created successfully"
525
- }
526
- ```
527
-
528
- ### Error Response
529
-
530
- ```
531
- {
532
- "message": "Tax class is required"
533
- }
534
- ```
535
-
536
- ### Example
537
-
538
- ```
539
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/country/rate" \
540
- -u "username:app_password" \
541
- -H "Content-Type: application/json" \
542
- -d '{
543
- "class_id": 1,
544
- "country": "FR",
545
- "rate": "20.0000",
546
- "name": "FR Standard Tax",
547
- "group": "EU",
548
- "priority": 1
549
- }'
550
- ```
551
-
552
- ---
553
-
554
- ### Update Tax Rate
555
-
556
- PUT `/fluent-cart/v2/tax/country/rate/{id}`
557
-
558
- Update an existing tax rate.
559
-
560
- ### Parameters
561
-
562
- | Parameter | Type | Location | Required | Description |
563
- | --- | --- | --- | --- | --- |
564
- | `id` | integer | path | Yes | Tax rate ID |
565
- | `class_id` | integer | body | Yes | ID of the tax class this rate belongs to |
566
- | `country` | string | body | No | ISO 3166-1 alpha-2 country code (max 45 characters) |
567
- | `state` | string | body | No | State/province code (max 45 characters) |
568
- | `postcode` | string | body | No | Postcode/ZIP code (max 45 characters) |
569
- | `city` | string | body | No | City name (max 45 characters) |
570
- | `rate` | string | body | No | Tax rate percentage (e.g., `"19.0000"`) |
571
- | `name` | string | body | No | Display name for the tax rate (max 45 characters) |
572
- | `group` | string | body | No | Geographic group/continent code (max 45 characters) |
573
- | `priority` | integer | body | No | Priority for rate application order (min: 1) |
574
- | `is_compound` | integer | body | No | Whether this rate is compound. `0` or `1` |
575
- | `for_shipping` | integer | body | No | Shipping tax override rate |
576
- | `for_order` | integer | body | No | Whether this rate applies at order level. `0` or `1` |
577
-
578
- ### Response
579
-
580
- ```
581
- {
582
- "tax_rate": {
583
- "id": 10,
584
- "class_id": 1,
585
- "country": "FR",
586
- "state": "",
587
- "postcode": "",
588
- "city": "",
589
- "rate": "20.0000",
590
- "name": "FR Standard Tax",
591
- "group": "EU",
592
- "priority": 1,
593
- "is_compound": 0,
594
- "for_shipping": null,
595
- "for_order": 0,
596
- "formatted_state": "",
597
- "tax_class": {
598
- "id": 1,
599
- "title": "Standard"
600
- }
601
- },
602
- "message": "Tax rate has been updated successfully"
603
- }
604
- ```
605
-
606
- ### Example
607
-
608
- ```
609
- curl -X PUT "https://example.com/wp-json/fluent-cart/v2/tax/country/rate/10" \
610
- -u "username:app_password" \
611
- -H "Content-Type: application/json" \
612
- -d '{
613
- "class_id": 1,
614
- "rate": "21.0000",
615
- "name": "FR Standard Tax (Updated)"
616
- }'
617
- ```
618
-
619
- ---
620
-
621
- ### Delete Tax Rate
622
-
623
- DELETE `/fluent-cart/v2/tax/country/rate/{id}`
624
-
625
- Delete a single tax rate by ID.
626
-
627
- ### Parameters
628
-
629
- | Parameter | Type | Location | Required | Description |
630
- | --- | --- | --- | --- | --- |
631
- | `id` | integer | path | Yes | Tax rate ID |
632
-
633
- ### Response
634
-
635
- ```
636
- {
637
- "message": "Tax rate has been deleted successfully"
638
- }
639
- ```
640
-
641
- ### Example
642
-
643
- ```
644
- curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/country/rate/10" \
645
- -u "username:app_password"
646
- ```
647
-
648
- ---
649
-
650
- ### Save Shipping Tax Override
651
-
652
- POST `/fluent-cart/v2/tax/rates/country/override`
653
-
654
- Set a shipping-specific tax override on an existing tax rate. This allows a different tax rate to be applied for shipping calculations.
655
-
656
- ### Parameters
657
-
658
- | Parameter | Type | Location | Required | Description |
659
- | --- | --- | --- | --- | --- |
660
- | `id` | integer | body | Yes | Tax rate ID to apply the shipping override to |
661
- | `override_tax_rate` | integer | body | Yes | The override tax rate value to use for shipping |
662
-
663
- ### Response
664
-
665
- ```
666
- {
667
- "message": "Tax override has been saved successfully"
668
- }
669
- ```
670
-
671
- ### Error Response
672
-
673
- ```
674
- {
675
- "message": "Tax rate not found"
676
- }
677
- ```
678
-
679
- ### Example
680
-
681
- ```
682
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/rates/country/override" \
683
- -u "username:app_password" \
684
- -H "Content-Type: application/json" \
685
- -d '{
686
- "id": 5,
687
- "override_tax_rate": 7
688
- }'
689
- ```
690
-
691
- ---
692
-
693
- ### Delete Shipping Tax Override
694
-
695
- DELETE `/fluent-cart/v2/tax/rates/country/override/{id}`
696
-
697
- Remove the shipping tax override from a tax rate, resetting `for_shipping` to `null`.
698
-
699
- ### Parameters
700
-
701
- | Parameter | Type | Location | Required | Description |
702
- | --- | --- | --- | --- | --- |
703
- | `id` | integer | path | Yes | Tax rate ID to remove the shipping override from |
704
-
705
- ### Response
706
-
707
- ```
708
- {
709
- "message": "Shipping override has been deleted successfully"
710
- }
711
- ```
712
-
713
- ### Example
714
-
715
- ```
716
- curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/rates/country/override/5" \
717
- -u "username:app_password"
718
- ```
719
-
720
- ---
721
-
722
- ### Get Product Category Tax Overrides
723
-
724
- GET `/fluent-cart/v2/tax/product-overrides/{country_code}`
725
-
726
- Retrieve all product category tax overrides for a specific country. Each override is a meta row whose `meta_value` holds the location, category, rate, and tax class data; `class_id` and `class_label` are appended for convenience.
727
-
728
- ### Parameters
729
-
730
- | Parameter | Type | Location | Required | Description |
731
- | --- | --- | --- | --- | --- |
732
- | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`) |
733
-
734
- ### Response
735
-
736
- ```
737
- {
738
- "overrides": [
739
- {
740
- "id": 12,
741
- "object_type": "tax_override",
742
- "object_id": 15,
743
- "meta_key": "product_category_override",
744
- "meta_value": {
745
- "country": "DE",
746
- "state": "",
747
- "city": "",
748
- "postcode": "",
749
- "category_id": 15,
750
- "category_name": "Books",
751
- "tax_label": "Reduced VAT",
752
- "override_state_tax": "no",
753
- "rate": 7,
754
- "class_id": 1
755
- },
756
- "class_id": 1,
757
- "class_label": "Standard",
758
- "created_at": "2025-06-01 12:00:00",
759
- "updated_at": "2025-06-01 12:00:00"
760
- }
761
- ]
762
- }
763
- ```
764
-
765
- ### Example
766
-
767
- ```
768
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/product-overrides/DE" \
769
- -u "username:app_password"
770
- ```
771
-
772
- ---
773
-
774
- ### Save Product Category Tax Override
775
-
776
- POST `/fluent-cart/v2/tax/product-overrides`
777
-
778
- Create or update a product category tax override. Pass `id` to update an existing override. Without `id`, an existing override matching the same category, location, and tax class is updated in place; otherwise a new override is created.
779
-
780
- Pass `source_type` `"shipping"` together with `source_id` (a tax rate ID) to convert an existing shipping tax override into a product override — the shipping override is removed on success.
781
-
782
- ### Parameters
783
-
784
- | Parameter | Type | Location | Required | Description |
785
- | --- | --- | --- | --- | --- |
786
- | `country` | string | body | Yes | ISO 3166-1 alpha-2 country code |
787
- | `category_id` | integer | body | Yes | Product category (`product-categories` term) ID |
788
- | `id` | integer | body | No | Existing override ID to update |
789
- | `state` | string | body | No | State/province code |
790
- | `city` | string | body | No | City name (max 45 characters) |
791
- | `postcode` | string | body | No | Postcode/ZIP code |
792
- | `tax_label` | string | body | No | Display label for the override tax |
793
- | `override_state_tax` | string | body | No | `"yes"` or `"no"` — whether the override replaces state-level tax (default: `"no"`) |
794
- | `rate` | number | body | No | Override tax rate percentage (negative values are clamped to `0`) |
795
- | `class_id` | integer | body | No | Tax class ID the override applies to (`0` = none; must exist when non-zero) |
796
- | `source_type` | string | body | No | Set to `"shipping"` with `source_id` to convert a shipping override |
797
- | `source_id` | integer | body | No | Tax rate ID of the shipping override being converted |
798
-
799
- ### Response
800
-
801
- ```
802
- {
803
- "override": {
804
- "id": 12,
805
- "object_type": "tax_override",
806
- "object_id": 15,
807
- "meta_key": "product_category_override",
808
- "meta_value": {
809
- "country": "DE",
810
- "state": "",
811
- "city": "",
812
- "postcode": "",
813
- "category_id": 15,
814
- "category_name": "Books",
815
- "tax_label": "Reduced VAT",
816
- "override_state_tax": "no",
817
- "rate": 7,
818
- "class_id": 1
819
- }
820
- },
821
- "message": "Product category tax override saved"
822
- }
823
- ```
824
-
825
- ### Error Responses
826
-
827
- | Status | Error |
828
- | --- | --- |
829
- | 422 | `"Country and category are required"` |
830
- | 422 | `"Invalid country code"` |
831
- | 422 | `"Invalid tax class"` |
832
- | 422 | `"Invalid product category"` |
833
- | 422 | `"An override already exists for the selected category, location, and tax class"` |
834
- | 404 | `"Override not found"` (when `id` does not match an existing override) |
835
-
836
- ### Example
837
-
838
- ```
839
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/product-overrides" \
840
- -u "username:app_password" \
841
- -H "Content-Type: application/json" \
842
- -d '{
843
- "country": "DE",
844
- "category_id": 15,
845
- "tax_label": "Reduced VAT",
846
- "override_state_tax": "no",
847
- "rate": 7,
848
- "class_id": 1
849
- }'
850
- ```
851
-
852
- ---
853
-
854
- ### Delete Product Category Tax Override
855
-
856
- DELETE `/fluent-cart/v2/tax/product-overrides/{id}`
857
-
858
- Delete a product category tax override by its ID.
859
-
860
- ### Parameters
861
-
862
- | Parameter | Type | Location | Required | Description |
863
- | --- | --- | --- | --- | --- |
864
- | `id` | integer | path | Yes | Override (meta row) ID |
865
-
866
- ### Response
867
-
868
- ```
869
- {
870
- "message": "Product category tax override deleted"
871
- }
872
- ```
873
-
874
- ### Error Response (422)
875
-
876
- ```
877
- {
878
- "message": "Override not found"
879
- }
880
- ```
881
-
882
- ### Example
883
-
884
- ```
885
- curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/product-overrides/12" \
886
- -u "username:app_password"
887
- ```
888
-
889
- ---
890
-
891
- ### Get Country Tax ID
892
-
893
- GET `/fluent-cart/v2/tax/country-tax-id/{country_code}`
894
-
895
- Retrieve the store's tax identification number (VAT/GST/EIN) for a specific country. This is stored in the `fct_meta` table.
896
-
897
- ### Parameters
898
-
899
- | Parameter | Type | Location | Required | Description |
900
- | --- | --- | --- | --- | --- |
901
- | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`) |
902
-
903
- ### Response
904
-
905
- When a tax ID exists:
906
-
907
- ```
908
- {
909
- "tax_data": {
910
- "tax_id": "DE123456789"
911
- }
912
- }
913
- ```
914
-
915
- When no tax ID is set:
916
-
917
- ```
918
- {
919
- "tax_data": {
920
- "tax_id": ""
921
- }
922
- }
923
- ```
924
-
925
- ### Example
926
-
927
- ```
928
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/country-tax-id/DE" \
929
- -u "username:app_password"
930
- ```
931
-
932
- ---
933
-
934
- ### Save Country Tax ID
935
-
936
- POST `/fluent-cart/v2/tax/country-tax-id/{country_code}`
937
-
938
- Save or update the store's tax identification number for a specific country. Creates a new meta entry if one does not exist, or updates the existing one.
939
-
940
- ### Parameters
941
-
942
- | Parameter | Type | Location | Required | Description |
943
- | --- | --- | --- | --- | --- |
944
- | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`) |
945
- | `tax_id` | string | body | Yes | The tax identification number (e.g., VAT number, EIN, GST number) |
946
-
947
- ### Response
948
-
949
- ```
950
- {
951
- "message": "Tax ID has been saved successfully"
952
- }
953
- ```
954
-
955
- ### Example
956
-
957
- ```
958
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/country-tax-id/DE" \
959
- -u "username:app_password" \
960
- -H "Content-Type: application/json" \
961
- -d '{"tax_id": "DE123456789"}'
962
- ```
963
-
964
- ---
965
-
966
- ## Tax Configuration
967
-
968
- Manage global tax settings including enabling/disabling tax, inclusion/exclusion behavior, calculation basis, and rounding.
969
-
970
- **Prefix:** `/fluent-cart/v2/tax/configuration`**Policy:** `StoreSettingsPolicy`
971
-
972
- ---
973
-
974
- ### Get Preconfigured Tax Rates
975
-
976
- GET `/fluent-cart/v2/tax/configuration/rates`
977
-
978
- Retrieve the full list of preconfigured tax rates from the built-in tax rates data file (`tax.php`). These are the default rates organized by continent/region and country that can be used when initially setting up tax for a country.
979
-
980
- ### Parameters
981
-
982
- No query parameters required.
983
-
984
- ### Response
985
-
986
- Returns tax rate data grouped by geographic region, including all rate types (standard, reduced, zero) for each country.
987
-
988
- ```
989
- {
990
- "tax_rates": {
991
- "EU": {
992
- "group_name": "European Union",
993
- "group_code": "EU",
994
- "countries": [
995
- {
996
- "country_code": "DE",
997
- "country_name": "Germany",
998
- "total_rates": 3,
999
- "rates": {
1000
- "standard": {
1001
- "rate": 19,
1002
- "name": "DE Standard Tax",
1003
- "type": "standard",
1004
- "compound": false,
1005
- "shipping": false
1006
- },
1007
- "reduced": {
1008
- "rate": 7,
1009
- "name": "DE Reduced Tax",
1010
- "type": "reduced",
1011
- "compound": false,
1012
- "shipping": false
1013
- },
1014
- "zero": {
1015
- "rate": 0,
1016
- "name": "DE Zero Tax",
1017
- "type": "zero",
1018
- "compound": false,
1019
- "shipping": false
1020
- }
1021
- }
1022
- }
1023
- ],
1024
- "total_countries": 27
1025
- },
1026
- "NA": {
1027
- "group_name": "North America",
1028
- "group_code": "NA",
1029
- "countries": [],
1030
- "total_countries": 0
1031
- }
1032
- }
1033
- }
1034
- ```
1035
-
1036
- ### Example
1037
-
1038
- ```
1039
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/rates" \
1040
- -u "username:app_password"
1041
- ```
1042
-
1043
- ---
1044
-
1045
- ### Save Configured Countries
1046
-
1047
- POST `/fluent-cart/v2/tax/configuration/countries`
1048
-
1049
- Generate tax classes and import tax rates for the specified countries from the built-in rates data. This creates the standard tax class structure (Standard, Reduced, Zero) and populates rates for each selected country. Countries that already have rates in the database are skipped.
1050
-
1051
- ### Parameters
1052
-
1053
- | Parameter | Type | Location | Required | Description |
1054
- | --- | --- | --- | --- | --- |
1055
- | `countries` | array of strings | body | Yes | Array of ISO 3166-1 alpha-2 country codes to configure (e.g., `["DE", "FR", "US"]`) |
1056
-
1057
- ### Response
1058
-
1059
- ```
1060
- {
1061
- "message": "Countries saved successfully"
1062
- }
1063
- ```
1064
-
1065
- ### Example
1066
-
1067
- ```
1068
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/countries" \
1069
- -u "username:app_password" \
1070
- -H "Content-Type: application/json" \
1071
- -d '{"countries": ["DE", "FR", "IT", "ES"]}'
1072
- ```
1073
-
1074
- ---
1075
-
1076
- ### Get Tax Settings
1077
-
1078
- GET `/fluent-cart/v2/tax/configuration/settings`
1079
-
1080
- Retrieve the current global tax configuration settings along with the store country.
1081
-
1082
- ### Parameters
1083
-
1084
- No query parameters required.
1085
-
1086
- ### Response
1087
-
1088
- ```
1089
- {
1090
- "settings": {
1091
- "tax_inclusion": "included",
1092
- "tax_calculation_basis": "shipping",
1093
- "tax_rounding": "item",
1094
- "checkout_tax_breakdown_display": "itemized",
1095
- "tax_display_label": "Tax",
1096
- "enable_tax": "yes",
1097
- "price_suffix_included": "",
1098
- "price_suffix_excluded": "",
1099
- "eu_vat_settings": {
1100
- "require_vat_number": "no",
1101
- "local_reverse_charge": "yes",
1102
- "reverse_charge_price_mode": "fixed",
1103
- "vat_reverse_excluded_categories": [],
1104
- "method": "oss",
1105
- "oss_country": "DE",
1106
- "oss_vat": "DE123456789",
1107
- "country_wise_vat": [],
1108
- "country_registrations": [
1109
- {
1110
- "country": "DE",
1111
- "vat": "DE123456789",
1112
- "rate": 19,
1113
- "rates": {
1114
- "standard": {"rate": 19, "label": "VAT"},
1115
- "reduced": {"rate": 7, "label": "Reduced VAT"}
1116
- },
1117
- "tax_label": "VAT"
1118
- }
1119
- ]
1120
- }
1121
- },
1122
- "store_country": "DE"
1123
- }
1124
- ```
1125
-
1126
- ### Settings Fields Reference
1127
-
1128
- | Field | Type | Values | Description |
1129
- | --- | --- | --- | --- |
1130
- | `enable_tax` | string | `"yes"`, `"no"` | Whether tax calculation is enabled |
1131
- | `tax_inclusion` | string | `"included"`, `"excluded"` | Whether product prices include tax |
1132
- | `tax_calculation_basis` | string | `"shipping"`, `"billing"`, `"store"` | Address used for tax calculation |
1133
- | `tax_rounding` | string | `"item"`, `"total"`, `"subtotal"` | Where tax rounding is applied |
1134
- | `checkout_tax_breakdown_display` | string | `"itemized"`, `"simplified"` | How the tax breakdown is displayed at checkout |
1135
- | `tax_display_label` | string | any | Label used when displaying tax amounts (default: `"Tax"`) |
1136
- | `price_suffix_included` | string | any | Text appended after prices that include tax (e.g., "incl. VAT") |
1137
- | `price_suffix_excluded` | string | any | Text appended after prices that exclude tax (e.g., "excl. VAT") |
1138
- | `eu_vat_settings` | object | see below | EU VAT-specific configuration |
1139
-
1140
- The top-level `store_country` key holds the store country code from store settings (empty string when unset).
1141
-
1142
- ### EU VAT Settings Object
1143
-
1144
- | Field | Type | Description |
1145
- | --- | --- | --- |
1146
- | `require_vat_number` | string | `"yes"` or `"no"` -- whether EU VAT number field is shown at checkout |
1147
- | `local_reverse_charge` | string | `"yes"` or `"no"` -- whether reverse charge applies for domestic B2B |
1148
- | `reverse_charge_price_mode` | string | `"fixed"` (default) or `"dynamic"` -- how reverse-charged prices are displayed: `fixed` keeps the tax-inclusive price, `dynamic` removes the VAT amount |
1149
- | `vat_reverse_excluded_categories` | array of integers | Product category IDs excluded from VAT reverse charge |
1150
- | `method` | string | Cross-border method: `"oss"`, `"home"`, or `"specific"` |
1151
- | `oss_country` | string | Country of OSS registration (when method is `"oss"`) |
1152
- | `oss_vat` | string | OSS VAT number (when method is `"oss"`) |
1153
- | `home_country` | string | Home country (when method is `"home"`) |
1154
- | `home_vat` | string | Home VAT number (when method is `"home"`) |
1155
- | `country_wise_vat` | array | Country-specific VAT settings (when method is `"specific"`) |
1156
- | `country_registrations` | array | Per-country EU VAT registrations (`{country, vat, rate, rates, tax_label}`), stored in `fct_meta` and injected into GET responses only |
1157
-
1158
- ### Example
1159
-
1160
- ```
1161
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings" \
1162
- -u "username:app_password"
1163
- ```
1164
-
1165
- ---
1166
-
1167
- ### Save Tax Settings
1168
-
1169
- POST `/fluent-cart/v2/tax/configuration/settings`
1170
-
1171
- Save the global tax configuration settings. Invalid enum values are silently replaced with their defaults. If tax is enabled, initial tax classes are automatically created.
1172
-
1173
- ### Parameters
1174
-
1175
- | Parameter | Type | Location | Required | Description |
1176
- | --- | --- | --- | --- | --- |
1177
- | `settings` | object | body | Yes | Tax settings object (see fields below) |
1178
- | `settings.enable_tax` | string | body | No | `"yes"` or `"no"` to enable/disable tax |
1179
- | `settings.tax_inclusion` | string | body | No | `"included"` or `"excluded"` -- whether prices include tax |
1180
- | `settings.tax_calculation_basis` | string | body | No | `"shipping"`, `"billing"`, or `"store"` -- address basis for tax |
1181
- | `settings.tax_rounding` | string | body | No | `"item"`, `"total"`, or `"subtotal"` -- where rounding is applied |
1182
- | `settings.checkout_tax_breakdown_display` | string | body | No | `"itemized"` or `"simplified"` -- how the tax breakdown is displayed at checkout |
1183
- | `settings.tax_display_label` | string | body | No | Label used when displaying tax amounts |
1184
- | `settings.price_suffix_included` | string | body | No | Text appended after prices that include tax |
1185
- | `settings.price_suffix_excluded` | string | body | No | Text appended after prices that exclude tax |
1186
- | `settings.eu_vat_settings` | object | body | No | EU VAT configuration object (see EU VAT Settings Object above). `reverse_charge_price_mode` accepts `"fixed"` or `"dynamic"` (invalid values become `"fixed"`) |
1187
-
1188
- ### Response
1189
-
1190
- ```
1191
- {
1192
- "message": "Settings saved successfully"
1193
- }
1194
- ```
1195
-
1196
- ### Example
1197
-
1198
- ```
1199
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings" \
1200
- -u "username:app_password" \
1201
- -H "Content-Type: application/json" \
1202
- -d '{
1203
- "settings": {
1204
- "enable_tax": "yes",
1205
- "tax_inclusion": "excluded",
1206
- "tax_calculation_basis": "billing",
1207
- "tax_rounding": "subtotal",
1208
- "checkout_tax_breakdown_display": "itemized",
1209
- "tax_display_label": "VAT",
1210
- "price_suffix_included": "incl. VAT",
1211
- "price_suffix_excluded": "excl. VAT",
1212
- "eu_vat_settings": {
1213
- "require_vat_number": "yes",
1214
- "local_reverse_charge": "yes",
1215
- "reverse_charge_price_mode": "fixed",
1216
- "vat_reverse_excluded_categories": [12, 15]
1217
- }
1218
- }
1219
- }'
1220
- ```
1221
-
1222
- ---
1223
-
1224
- ## EU VAT
1225
-
1226
- Manage European Union VAT settings, OSS (One-Stop Shop) compliance, and cross-border tax configurations.
1227
-
1228
- **Prefix:** `/fluent-cart/v2/tax/configuration/settings/eu-vat`**Policy:** `StoreSettingsPolicy`
1229
-
1230
- ---
1231
-
1232
- ### Save EU VAT Cross-Border Settings
1233
-
1234
- POST `/fluent-cart/v2/tax/configuration/settings/eu-vat`
1235
-
1236
- Multi-action endpoint for EU VAT settings, dispatched by the `action` field:
1237
-
1238
- | Action | Purpose |
1239
- | --- | --- |
1240
- | `euCrossBorderSettings` | Save the cross-border registration configuration (OSS, home country, or specific country registrations) |
1241
- | `saveCountryRegistration` | Create or update a per-country VAT registration with per-class rates |
1242
- | `deleteCountryRegistration` | Remove a per-country VAT registration |
1243
-
1244
- ### Parameters — `euCrossBorderSettings`
1245
-
1246
- | Parameter | Type | Location | Required | Description |
1247
- | --- | --- | --- | --- | --- |
1248
- | `action` | string | body | Yes | `"euCrossBorderSettings"` |
1249
- | `eu_vat_settings` | object | body | Yes | EU VAT configuration object (merged into the stored settings) |
1250
- | `eu_vat_settings.method` | string | body | Yes | Cross-border method: `"oss"`, `"home"`, or `"specific"` |
1251
- | `eu_vat_settings.oss_country` | string | body | Conditional | Country of OSS registration (required when method is `"oss"`; must be an EU VAT country) |
1252
- | `eu_vat_settings.oss_vat` | string | body | No | OSS VAT number |
1253
- | `eu_vat_settings.home_country` | string | body | Conditional | Home country code (required when method is `"home"`; must be an EU VAT country) |
1254
- | `eu_vat_settings.home_vat` | string | body | No | Home VAT number |
1255
- | `reset_registration` | string | body | No | Set to `"yes"` to clear the current method (reset registration) |
1256
-
1257
- ### Parameters — `saveCountryRegistration`
1258
-
1259
- | Parameter | Type | Location | Required | Description |
1260
- | --- | --- | --- | --- | --- |
1261
- | `action` | string | body | Yes | `"saveCountryRegistration"` |
1262
- | `country` | string | body | Yes | ISO 3166-1 alpha-2 code of an EU VAT country |
1263
- | `vat` | string | body | No | VAT registration number (max 50 characters) |
1264
- | `rates` | object | body | Yes | Per-class rates keyed by tax class slug: `{"standard": {"rate": 19, "label": "VAT"}}`. At least one rate must be greater than `0` and every slug must reference an existing tax class |
1265
-
1266
- ### Parameters — `deleteCountryRegistration`
1267
-
1268
- | Parameter | Type | Location | Required | Description |
1269
- | --- | --- | --- | --- | --- |
1270
- | `action` | string | body | Yes | `"deleteCountryRegistration"` |
1271
- | `country` | string | body | Yes | ISO 3166-1 alpha-2 code of an EU VAT country |
1272
-
1273
- ### Validation
1274
-
1275
- | Condition | Error |
1276
- | --- | --- |
1277
- | Unknown `action` | `"Invalid method"` (HTTP 422) |
1278
- | `method` not one of `oss`, `home`, `specific` | `"Select a cross-border registration type"` |
1279
- | `method` is `oss` and `oss_country` is empty or not an EU VAT country | `"Select country of OSS registration"` / `"Select a valid EU VAT country"` |
1280
- | `method` is `home` and `home_country` is empty or not an EU VAT country | `"Select home country of registration"` / `"Select a valid EU VAT country"` |
1281
- | `country` missing or not an EU VAT country | `"Select a registration country"` / `"Select a valid EU VAT registration country"` |
1282
- | `vat` longer than 50 characters | `"VAT number is too long"` |
1283
- | No rate greater than 0 | `"At least one tax rate must be greater than 0%"` |
1284
- | Rate slug references a missing tax class | `"Tax class \"{slug}\" could not be found. Create the class first and try again."` |
1285
-
1286
- ### Response
1287
-
1288
- Depending on the action, `message` is `"EU VAT settings saved successfully"`, `"Country VAT registration saved successfully"`, or `"Country registration removed successfully"`.
1289
-
1290
- ```
1291
- {
1292
- "message": "EU VAT settings saved successfully"
1293
- }
1294
- ```
1295
-
1296
- ### Error Response (422)
1297
-
1298
- ```
1299
- {
1300
- "message": "Validation failed for EU VAT settings",
1301
- "errors": {
1302
- "method": "Select a cross-border registration type"
1303
- }
1304
- }
1305
- ```
1306
-
1307
- ### Examples
1308
-
1309
- ```
1310
- # Save cross-border configuration
1311
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat" \
1312
- -u "username:app_password" \
1313
- -H "Content-Type: application/json" \
1314
- -d '{
1315
- "action": "euCrossBorderSettings",
1316
- "eu_vat_settings": {
1317
- "method": "oss",
1318
- "oss_country": "DE",
1319
- "oss_vat": "DE123456789"
1320
- }
1321
- }'
1322
-
1323
- # Save a per-country VAT registration
1324
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat" \
1325
- -u "username:app_password" \
1326
- -H "Content-Type: application/json" \
1327
- -d '{
1328
- "action": "saveCountryRegistration",
1329
- "country": "DE",
1330
- "vat": "DE123456789",
1331
- "rates": {
1332
- "standard": {"rate": 19, "label": "VAT"},
1333
- "reduced": {"rate": 7, "label": "Reduced VAT"}
1334
- }
1335
- }'
1336
-
1337
- # Delete a per-country VAT registration
1338
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat" \
1339
- -u "username:app_password" \
1340
- -H "Content-Type: application/json" \
1341
- -d '{"action": "deleteCountryRegistration", "country": "DE"}'
1342
- ```
1343
-
1344
- ---
1345
-
1346
- ### Reset EU VAT Rates
1347
-
1348
- POST `/fluent-cart/v2/tax/configuration/settings/eu-vat/reset-rates`
1349
-
1350
- Reset all country-level EU standard VAT rates back to the built-in defaults. Custom rate values and auto-generated labels are overwritten; state-specific entries and shipping overrides on the rows are preserved.
1351
-
1352
- ### Parameters
1353
-
1354
- No request body required.
1355
-
1356
- ### Response
1357
-
1358
- ```
1359
- {
1360
- "message": "EU tax rates have been reset to defaults"
1361
- }
1362
- ```
1363
-
1364
- ### Example
1365
-
1366
- ```
1367
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/reset-rates" \
1368
- -u "username:app_password"
1369
- ```
1370
-
1371
- ---
1372
-
1373
- ### Get EU VAT Product Overrides
1374
-
1375
- GET `/fluent-cart/v2/tax/configuration/settings/eu-vat/product-overrides`
1376
-
1377
- Retrieve product category tax overrides for all EU countries, plus every EU tax rate that has a shipping tax override set. `class_id` and `class_label` are appended to each row for convenience.
1378
-
1379
- ### Parameters
1380
-
1381
- No query parameters required.
1382
-
1383
- ### Response
1384
-
1385
- ```
1386
- {
1387
- "overrides": [
1388
- {
1389
- "id": 12,
1390
- "object_type": "tax_override",
1391
- "object_id": 15,
1392
- "meta_key": "product_category_override",
1393
- "meta_value": {
1394
- "country": "DE",
1395
- "state": "",
1396
- "city": "",
1397
- "postcode": "",
1398
- "category_id": 15,
1399
- "category_name": "Books",
1400
- "tax_label": "Reduced VAT",
1401
- "override_state_tax": "no",
1402
- "rate": 7,
1403
- "class_id": 1
1404
- },
1405
- "class_id": 1,
1406
- "class_label": "Standard",
1407
- "created_at": "2025-06-01 12:00:00",
1408
- "updated_at": "2025-06-01 12:00:00"
1409
- }
1410
- ],
1411
- "shipping_overrides": [
1412
- {
1413
- "id": 8,
1414
- "class_id": 1,
1415
- "country": "DE",
1416
- "state": "",
1417
- "postcode": "",
1418
- "city": "",
1419
- "rate": "19.0000",
1420
- "name": "DE Standard Tax",
1421
- "group": "EU",
1422
- "priority": 1,
1423
- "is_compound": 0,
1424
- "for_shipping": "7.0000",
1425
- "for_order": 0,
1426
- "class_label": "Standard"
1427
- }
1428
- ]
1429
- }
1430
- ```
1431
-
1432
- ### Example
1433
-
1434
- ```
1435
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/product-overrides" \
1436
- -u "username:app_password"
1437
- ```
1438
-
1439
- ---
1440
-
1441
- ### Get OSS Country Rates
1442
-
1443
- GET `/fluent-cart/v2/tax/configuration/settings/eu-vat/oss-rates`
1444
-
1445
- Retrieve per-country EU VAT rates for every tax class. Each country entry includes the effective rate per class (custom database value or built-in default), plus top-level standard-class values for backward compatibility, and the list of tax classes.
1446
-
1447
- ### Parameters
1448
-
1449
- No query parameters required.
1450
-
1451
- ### Response
1452
-
1453
- ```
1454
- {
1455
- "rates": [
1456
- {
1457
- "country": "DE",
1458
- "label": "Germany",
1459
- "rate": 19,
1460
- "tax_label": "VAT",
1461
- "default_rate": 19,
1462
- "has_custom": true,
1463
- "class_rates": {
1464
- "standard": {"rate": 19, "default_rate": 19, "has_custom": true, "label": ""},
1465
- "reduced": {"rate": 7, "default_rate": 7, "has_custom": true, "label": ""},
1466
- "zero": {"rate": 0, "default_rate": 0, "has_custom": false, "label": ""}
1467
- }
1468
- }
1469
- ],
1470
- "classes": [
1471
- {"slug": "standard", "title": "Standard", "id": 1},
1472
- {"slug": "reduced", "title": "Reduced", "id": 2},
1473
- {"slug": "zero", "title": "Zero", "id": 3}
1474
- ]
1475
- }
1476
- ```
1477
-
1478
- | Field | Type | Description |
1479
- | --- | --- | --- |
1480
- | `rates[].country` | string | ISO 3166-1 alpha-2 country code |
1481
- | `rates[].label` | string | Country display name |
1482
- | `rates[].rate` | number | Standard-class effective rate (backward compatibility) |
1483
- | `rates[].tax_label` | string | Standard-class label, defaults to `"VAT"` |
1484
- | `rates[].default_rate` | number | Built-in default standard rate |
1485
- | `rates[].has_custom` | boolean | Whether the standard class has a custom rate row |
1486
- | `rates[].class_rates` | object | Per-class rates keyed by tax class slug: `{rate, default_rate, has_custom, label}` |
1487
- | `classes` | array | All tax classes: `{slug, title, id}` |
1488
-
1489
- ### Example
1490
-
1491
- ```
1492
- curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss-rates" \
1493
- -u "username:app_password"
1494
- ```
1495
-
1496
- ---
1497
-
1498
- ### Save OSS Country Rates
1499
-
1500
- POST `/fluent-cart/v2/tax/configuration/settings/eu-vat/oss-rates`
1501
-
1502
- Save per-country EU VAT rates. Each entry may provide `class_rates` keyed by tax class slug (`{rate, label}`); rates are upserted per country and class in the `EU` group. When `class_rates` is omitted, the single `rate` value is applied to the standard class (backward compatibility). Entries with unknown tax class slugs or without a country are skipped.
1503
-
1504
- ### Parameters
1505
-
1506
- | Parameter | Type | Location | Required | Description |
1507
- | --- | --- | --- | --- | --- |
1508
- | `rates` | array | body | Yes | Array of country rate entries |
1509
- | `rates[].country` | string | body | Yes | ISO 3166-1 alpha-2 code of an EU VAT country |
1510
- | `rates[].tax_label` | string | body | No | Shared label fallback for classes without their own label |
1511
- | `rates[].rate` | number | body | No | Standard-class rate (used only when `class_rates` is omitted) |
1512
- | `rates[].class_rates` | object | body | No | Per-class rates keyed by tax class slug: `{"standard": {"rate": 19, "label": "VAT"}}` |
1513
-
1514
- ### Response
1515
-
1516
- ```
1517
- {
1518
- "message": "OSS country rates saved successfully"
1519
- }
1520
- ```
1521
-
1522
- ### Error Response (422)
1523
-
1524
- ```
1525
- {
1526
- "message": "Validation failed for OSS country rates",
1527
- "errors": {
1528
- "rates.0.country": "Select a valid EU VAT country"
1529
- }
1530
- }
1531
- ```
1532
-
1533
- ### Example
1534
-
1535
- ```
1536
- curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss-rates" \
1537
- -u "username:app_password" \
1538
- -H "Content-Type: application/json" \
1539
- -d '{
1540
- "rates": [
1541
- {
1542
- "country": "DE",
1543
- "tax_label": "VAT",
1544
- "class_rates": {
1545
- "standard": {"rate": 19, "label": "VAT"},
1546
- "reduced": {"rate": 7, "label": "Reduced VAT"}
1547
- }
1548
- }
1549
- ]
1550
- }'
1551
- ```
1
+ # Tax API
2
+
3
+ Configure tax classes, manage country-specific tax rates, set up tax configuration, and handle EU VAT/OSS compliance.
4
+
5
+ **Base URL:** `https://your-site.com/wp-json/fluent-cart/v2`
6
+
7
+ > All monetary values are in **cents** (e.g., `$10.00` = `1000`).
8
+
9
+ ---
10
+
11
+ ## Tax Filing
12
+
13
+ Manage order-level tax records for filing and reporting purposes.
14
+
15
+ **Prefix:** `/fluent-cart/v2/taxes`**Policy:** `AdminPolicy`
16
+
17
+ ---
18
+
19
+ ### List Tax Records
20
+
21
+ GET `/fluent-cart/v2/taxes`
22
+
23
+ Retrieve a paginated list of order tax rate records with optional filtering, sorting, and search. Records represent taxes applied to individual orders.
24
+
25
+ ### Parameters
26
+
27
+ | Parameter | Type | Location | Required | Description |
28
+ | --- | --- | --- | --- | --- |
29
+ | `page` | integer | query | No | Page number for pagination |
30
+ | `per_page` | integer | query | No | Number of records per page (default: 10, max: 200) |
31
+ | `search` | string | query | No | Search term. If numeric, searches by `id` or `order_id`. Also searches related tax rate `country`, `state`, `postcode`, and `name` fields. Supports operator syntax (e.g., `id = 5`, `order_id > 100`) |
32
+ | `sort_by` | string | query | No | Column to sort by (default: `id`). Must be a fillable column on the OrderTaxRate model |
33
+ | `sort_type` | string | query | No | Sort direction: `asc` or `desc` (default: `desc`) |
34
+ | `active_view` | string | query | No | Tab filter. One of: `filed` (records with `filed_at` set), `not_filed` (records without `filed_at`) |
35
+ | `filter_type` | string | query | No | Filter mode: `simple` (default) or `advanced` |
36
+ | `advanced_filters` | string (JSON) | query | No | JSON-encoded array of advanced filter groups. Supports filtering by country, region, tax name, and filed status |
37
+ | `with` | array/string | query | No | Eager-load relations (e.g., `order`, `tax_rate`) |
38
+ | `select` | array/string | query | No | Comma-separated list of columns to select |
39
+ | `include_ids` | array/string | query | No | Comma-separated IDs that must always be included in results |
40
+ | `user_tz` | string | query | No | User timezone for date filtering (e.g., `America/New_York`) |
41
+
42
+ ### Advanced Filter Options
43
+
44
+ | Category | Field | Column | Type | Description |
45
+ | --- | --- | --- | --- | --- |
46
+ | Tax Property | Country | `country` | selections (relation: `tax_rate`) | Filter by tax rate country code |
47
+ | Tax Property | Region | `state` | selections (relation: `tax_rate`) | Filter by tax rate state/region |
48
+ | Tax Property | Tax Name | `name` | text (relation: `tax_rate`) | Filter by tax rate name |
49
+ | Tax Property | Filed | `filed_at` | selections | `filed` or `not_filed` |
50
+
51
+ ### Response
52
+
53
+ ```
54
+ {
55
+ "taxes": {
56
+ "current_page": 1,
57
+ "data": [
58
+ {
59
+ "id": 1,
60
+ "order_id": 42,
61
+ "tax_rate_id": 5,
62
+ "shipping_tax": 150,
63
+ "order_tax": 1000,
64
+ "total_tax": 1150,
65
+ "meta": {
66
+ "rates": [],
67
+ "tax_country": "US",
68
+ "store_vat_number": ""
69
+ },
70
+ "filed_at": null,
71
+ "created_at": "2025-06-01 12:00:00",
72
+ "updated_at": "2025-06-01 12:00:00"
73
+ }
74
+ ],
75
+ "per_page": 10,
76
+ "total": 50,
77
+ "last_page": 5
78
+ }
79
+ }
80
+ ```
81
+
82
+ ### Example
83
+
84
+ ```
85
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/taxes?page=1&per_page=20&active_view=not_filed" \
86
+ -u "username:app_password"
87
+ ```
88
+
89
+ ---
90
+
91
+ ### Mark Taxes as Filed
92
+
93
+ POST `/fluent-cart/v2/taxes`
94
+
95
+ Mark one or more order tax records as filed by setting their `filed_at` timestamp. Only records that have not yet been filed will be updated.
96
+
97
+ ### Parameters
98
+
99
+ | Parameter | Type | Location | Required | Description |
100
+ | --- | --- | --- | --- | --- |
101
+ | `ids` | array of integers | body | Yes | Array of `OrderTaxRate` record IDs to mark as filed |
102
+
103
+ ### Response
104
+
105
+ ```
106
+ {
107
+ "message": "Taxes marked as filed successfully"
108
+ }
109
+ ```
110
+
111
+ ### Error Response (400)
112
+
113
+ ```
114
+ {
115
+ "message": "No IDs provided to mark!"
116
+ }
117
+ ```
118
+
119
+ ### Example
120
+
121
+ ```
122
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/taxes" \
123
+ -u "username:app_password" \
124
+ -H "Content-Type: application/json" \
125
+ -d '{"ids": [1, 2, 3, 5]}'
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Tax Classes
131
+
132
+ Manage tax classes that group tax rates by category (e.g., Standard, Reduced, Zero).
133
+
134
+ **Prefix:** `/fluent-cart/v2/tax/classes`**Policy:** `StoreSettingsPolicy`
135
+
136
+ A maximum of **6** tax classes is allowed. The built-in `standard` class always exists and cannot be deleted; `reduced` and `zero` are built-in classes that can be created on demand.
137
+
138
+ ---
139
+
140
+ ### List Tax Classes
141
+
142
+ GET `/fluent-cart/v2/tax/classes`
143
+
144
+ Retrieve all tax classes ordered by ID (oldest first), along with the maximum allowed number of classes and the next built-in class (`reduced` or `zero`) that has not been created yet.
145
+
146
+ ### Parameters
147
+
148
+ No query parameters required.
149
+
150
+ ### Response
151
+
152
+ ```
153
+ {
154
+ "classes": [
155
+ {
156
+ "id": 1,
157
+ "title": "Standard",
158
+ "slug": "standard",
159
+ "meta": [],
160
+ "created_at": "2025-01-01 00:00:00",
161
+ "updated_at": "2025-01-01 00:00:00"
162
+ },
163
+ {
164
+ "id": 2,
165
+ "title": "Reduced",
166
+ "slug": "reduced",
167
+ "meta": [],
168
+ "created_at": "2025-01-01 00:00:00",
169
+ "updated_at": "2025-01-01 00:00:00"
170
+ }
171
+ ],
172
+ "max_classes": 6,
173
+ "next_builtin": {
174
+ "slug": "zero",
175
+ "title": "Zero"
176
+ }
177
+ }
178
+ ```
179
+
180
+ `next_builtin` is `null` when both built-in classes (`reduced`, `zero`) already exist.
181
+
182
+ ### Example
183
+
184
+ ```
185
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/classes" \
186
+ -u "username:app_password"
187
+ ```
188
+
189
+ ---
190
+
191
+ ### Create Tax Class
192
+
193
+ POST `/fluent-cart/v2/tax/classes`
194
+
195
+ Create a new tax class. A unique slug is auto-generated from the title. Pass `slug` `"reduced"` or `"zero"` to create one of the built-in classes (the title is then set automatically).
196
+
197
+ ### Parameters
198
+
199
+ | Parameter | Type | Location | Required | Description |
200
+ | --- | --- | --- | --- | --- |
201
+ | `title` | string | body | Yes* | Tax class title (max 30 characters). Required unless a built-in `slug` is passed |
202
+ | `slug` | string | body | No | Pass a built-in slug (`reduced` or `zero`) to create that built-in class; otherwise the slug is auto-generated from the title |
203
+
204
+ ### Constraints
205
+
206
+ | Condition | Status | Error |
207
+ | --- | --- | --- |
208
+ | 6 tax classes already exist | 423 | `"Maximum of 6 tax classes allowed"` |
209
+ | Built-in class already exists | 423 | `"This tax class already exists"` |
210
+ | Title missing (non-built-in) | 423 | `"Tax class name is required"` |
211
+ | Title longer than 30 characters | 422 | `"Tax class name must be 30 characters or fewer"` |
212
+ | A class with the same slug exists | 423 | `"A tax class with this name already exists"` |
213
+
214
+ ### Response
215
+
216
+ ```
217
+ {
218
+ "class": {
219
+ "id": 4,
220
+ "title": "Digital Goods",
221
+ "slug": "digital-goods",
222
+ "meta": [],
223
+ "created_at": "2025-06-01 12:00:00",
224
+ "updated_at": "2025-06-01 12:00:00"
225
+ },
226
+ "message": "Tax class created successfully"
227
+ }
228
+ ```
229
+
230
+ ### Example
231
+
232
+ ```
233
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/classes" \
234
+ -u "username:app_password" \
235
+ -H "Content-Type: application/json" \
236
+ -d '{"title": "Digital Goods"}'
237
+ ```
238
+
239
+ ---
240
+
241
+ ### Delete Tax Class
242
+
243
+ DELETE `/fluent-cart/v2/tax/classes/{id}`
244
+
245
+ Delete a tax class by ID. The built-in `standard` class cannot be deleted. Products, variations, EU registrations, product overrides, and tax rates referencing the deleted class fall back to the Standard class.
246
+
247
+ ### Parameters
248
+
249
+ | Parameter | Type | Location | Required | Description |
250
+ | --- | --- | --- | --- | --- |
251
+ | `id` | integer | path | Yes | Tax class ID |
252
+
253
+ ### Response
254
+
255
+ ```
256
+ {
257
+ "message": "Tax class deleted successfully"
258
+ }
259
+ ```
260
+
261
+ ### Error Responses
262
+
263
+ | Status | Error |
264
+ | --- | --- |
265
+ | 423 | `"Cannot delete the Standard tax class"` |
266
+ | 423 | `"Standard tax class could not be found"` |
267
+ | 400 | `"Failed to delete tax class"` |
268
+
269
+ ### Example
270
+
271
+ ```
272
+ curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/classes/4" \
273
+ -u "username:app_password"
274
+ ```
275
+
276
+ ---
277
+
278
+ ## Tax Rates
279
+
280
+ Manage country-specific tax rates, shipping tax overrides, and country tax IDs.
281
+
282
+ **Prefix:** `/fluent-cart/v2/tax`**Policy:** `StoreSettingsPolicy`
283
+
284
+ ---
285
+
286
+ ### List All Tax Rates
287
+
288
+ GET `/fluent-cart/v2/tax/rates`
289
+
290
+ Retrieve all tax rates from the database, grouped by continent/region and country.
291
+
292
+ ### Parameters
293
+
294
+ No query parameters required.
295
+
296
+ ### Response
297
+
298
+ Returns tax rates grouped by geographic region, with each group containing countries and their respective rates.
299
+
300
+ ```
301
+ {
302
+ "tax_rates": [
303
+ {
304
+ "group_name": "European Union",
305
+ "group_code": "EU",
306
+ "countries": [
307
+ {
308
+ "country_code": "DE",
309
+ "country_name": "Germany",
310
+ "rates": [
311
+ {
312
+ "class_id": 1,
313
+ "name": "DE Standard Tax",
314
+ "rate": "19.0000",
315
+ "for_shipping": null
316
+ },
317
+ {
318
+ "class_id": 2,
319
+ "name": "DE Reduced Tax",
320
+ "rate": "7.0000",
321
+ "for_shipping": null
322
+ }
323
+ ],
324
+ "total_rates": 2
325
+ }
326
+ ],
327
+ "total_countries": 1
328
+ },
329
+ {
330
+ "group_name": "North America",
331
+ "group_code": "NA",
332
+ "countries": [
333
+ {
334
+ "country_code": "US",
335
+ "country_name": "United States",
336
+ "rates": [
337
+ {
338
+ "class_id": 1,
339
+ "name": "US Standard Tax",
340
+ "rate": "10.0000",
341
+ "for_shipping": null
342
+ }
343
+ ],
344
+ "total_rates": 1
345
+ }
346
+ ],
347
+ "total_countries": 1
348
+ }
349
+ ]
350
+ }
351
+ ```
352
+
353
+ ### Example
354
+
355
+ ```
356
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/rates" \
357
+ -u "username:app_password"
358
+ ```
359
+
360
+ ---
361
+
362
+ ### Get Country Tax Rates
363
+
364
+ GET `/fluent-cart/v2/tax/rates/country/rates/{country_code}`
365
+
366
+ Retrieve all tax rates for a specific country (ordered by priority, then ID), the country-level form configuration, and whether tax is enabled for the country.
367
+
368
+ ### Parameters
369
+
370
+ | Parameter | Type | Location | Required | Description |
371
+ | --- | --- | --- | --- | --- |
372
+ | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`, `GB`) |
373
+ | `class_id` | integer | query | No | Filter rates by tax class ID |
374
+
375
+ ### Response
376
+
377
+ ```
378
+ {
379
+ "tax_rates": [
380
+ {
381
+ "id": 5,
382
+ "class_id": 1,
383
+ "country": "DE",
384
+ "state": "",
385
+ "postcode": "",
386
+ "city": "",
387
+ "rate": "19.0000",
388
+ "name": "DE Standard Tax",
389
+ "group": "EU",
390
+ "priority": 1,
391
+ "is_compound": 0,
392
+ "for_shipping": null,
393
+ "for_order": 0,
394
+ "formatted_state": ""
395
+ }
396
+ ],
397
+ "settings": {
398
+ "hidden": ["city", "zip", "state"]
399
+ },
400
+ "tax_enabled": true
401
+ }
402
+ ```
403
+
404
+ | Field | Type | Description |
405
+ | --- | --- | --- |
406
+ | `tax_rates` | array | Tax rate rows for the country |
407
+ | `settings` | object/null | Country-level form configuration from the built-in tax config. `hidden` lists address fields hidden in the rate form. Falls back to the continent configuration (e.g., `EU`); `null` when neither defines one |
408
+ | `tax_enabled` | boolean | Whether tax collection is enabled for this country (default: `true`) |
409
+
410
+ ### Example
411
+
412
+ ```
413
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/rates/country/rates/DE" \
414
+ -u "username:app_password"
415
+ ```
416
+
417
+ ---
418
+
419
+ ### Update Country Tax Status
420
+
421
+ POST `/fluent-cart/v2/tax/country-status/{country_code}`
422
+
423
+ Enable or disable tax collection for a specific country. Accepts an ISO country code or the special code `EU` to toggle the whole EU group. By default every country is enabled; disabling stores a flag in the `fct_meta` table.
424
+
425
+ ### Parameters
426
+
427
+ | Parameter | Type | Location | Required | Description |
428
+ | --- | --- | --- | --- | --- |
429
+ | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`) or `EU` for the EU group |
430
+ | `enabled` | integer | body | Yes | `1` to enable tax for the country, `0` to disable |
431
+
432
+ ### Response
433
+
434
+ ```
435
+ {
436
+ "enabled": true,
437
+ "message": "Tax has been enabled successfully"
438
+ }
439
+ ```
440
+
441
+ ### Error Response (422)
442
+
443
+ ```
444
+ {
445
+ "message": "Invalid country code"
446
+ }
447
+ ```
448
+
449
+ ### Example
450
+
451
+ ```
452
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/country-status/DE" \
453
+ -u "username:app_password" \
454
+ -H "Content-Type: application/json" \
455
+ -d '{"enabled": 0}'
456
+ ```
457
+
458
+ ---
459
+
460
+ ### Create Tax Rate
461
+
462
+ POST `/fluent-cart/v2/tax/country/rate`
463
+
464
+ Create a new tax rate entry for a country.
465
+
466
+ ### Parameters
467
+
468
+ | Parameter | Type | Location | Required | Description |
469
+ | --- | --- | --- | --- | --- |
470
+ | `class_id` | integer | body | Yes | ID of the tax class this rate belongs to |
471
+ | `country` | string | body | No | ISO 3166-1 alpha-2 country code (max 45 characters) |
472
+ | `state` | string | body | No | State/province code (max 45 characters) |
473
+ | `postcode` | string | body | No | Postcode/ZIP code (max 45 characters) |
474
+ | `city` | string | body | No | City name (max 45 characters) |
475
+ | `rate` | string | body | No | Tax rate percentage (e.g., `"19.0000"`, max 45 characters) |
476
+ | `name` | string | body | No | Display name for the tax rate (max 45 characters) |
477
+ | `group` | string | body | No | Geographic group/continent code, e.g., `EU`, `NA` (max 45 characters) |
478
+ | `priority` | integer | body | No | Priority for rate application order (min: 1) |
479
+ | `is_compound` | integer | body | No | Whether this rate is compound (applied on top of other taxes). `0` or `1` (default: `0`) |
480
+ | `for_shipping` | integer | body | No | Shipping tax override rate. `null` means no override |
481
+ | `for_order` | integer | body | No | Whether this rate applies at order level. `0` or `1` (default: `0`) |
482
+
483
+ ### Validation Rules
484
+
485
+ | Field | Rules |
486
+ | --- | --- |
487
+ | `class_id` | Required, minimum 0 |
488
+ | `country` | Nullable, sanitized text, max 45 characters |
489
+ | `state` | Nullable, sanitized text, max 45 characters |
490
+ | `postcode` | Nullable, sanitized text, max 45 characters |
491
+ | `city` | Nullable, sanitized text, max 45 characters |
492
+ | `rate` | Nullable, sanitized text, max 45 characters |
493
+ | `name` | Nullable, sanitized text, max 45 characters |
494
+ | `group` | Nullable, sanitized text, max 45 characters |
495
+ | `priority` | Nullable, numeric, minimum 1 |
496
+ | `is_compound` | Nullable, numeric, minimum 0 |
497
+ | `for_shipping` | Nullable, numeric, minimum 0 |
498
+ | `for_order` | Nullable, numeric, minimum 0 |
499
+
500
+ ### Response
501
+
502
+ ```
503
+ {
504
+ "tax_rate": {
505
+ "id": 10,
506
+ "class_id": 1,
507
+ "country": "FR",
508
+ "state": "",
509
+ "postcode": "",
510
+ "city": "",
511
+ "rate": "20.0000",
512
+ "name": "FR Standard Tax",
513
+ "group": "EU",
514
+ "priority": 1,
515
+ "is_compound": 0,
516
+ "for_shipping": null,
517
+ "for_order": 0,
518
+ "formatted_state": "",
519
+ "tax_class": {
520
+ "id": 1,
521
+ "title": "Standard"
522
+ }
523
+ },
524
+ "message": "Tax rate has been created successfully"
525
+ }
526
+ ```
527
+
528
+ ### Error Response
529
+
530
+ ```
531
+ {
532
+ "message": "Tax class is required"
533
+ }
534
+ ```
535
+
536
+ ### Example
537
+
538
+ ```
539
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/country/rate" \
540
+ -u "username:app_password" \
541
+ -H "Content-Type: application/json" \
542
+ -d '{
543
+ "class_id": 1,
544
+ "country": "FR",
545
+ "rate": "20.0000",
546
+ "name": "FR Standard Tax",
547
+ "group": "EU",
548
+ "priority": 1
549
+ }'
550
+ ```
551
+
552
+ ---
553
+
554
+ ### Update Tax Rate
555
+
556
+ PUT `/fluent-cart/v2/tax/country/rate/{id}`
557
+
558
+ Update an existing tax rate.
559
+
560
+ ### Parameters
561
+
562
+ | Parameter | Type | Location | Required | Description |
563
+ | --- | --- | --- | --- | --- |
564
+ | `id` | integer | path | Yes | Tax rate ID |
565
+ | `class_id` | integer | body | Yes | ID of the tax class this rate belongs to |
566
+ | `country` | string | body | No | ISO 3166-1 alpha-2 country code (max 45 characters) |
567
+ | `state` | string | body | No | State/province code (max 45 characters) |
568
+ | `postcode` | string | body | No | Postcode/ZIP code (max 45 characters) |
569
+ | `city` | string | body | No | City name (max 45 characters) |
570
+ | `rate` | string | body | No | Tax rate percentage (e.g., `"19.0000"`) |
571
+ | `name` | string | body | No | Display name for the tax rate (max 45 characters) |
572
+ | `group` | string | body | No | Geographic group/continent code (max 45 characters) |
573
+ | `priority` | integer | body | No | Priority for rate application order (min: 1) |
574
+ | `is_compound` | integer | body | No | Whether this rate is compound. `0` or `1` |
575
+ | `for_shipping` | integer | body | No | Shipping tax override rate |
576
+ | `for_order` | integer | body | No | Whether this rate applies at order level. `0` or `1` |
577
+
578
+ ### Response
579
+
580
+ ```
581
+ {
582
+ "tax_rate": {
583
+ "id": 10,
584
+ "class_id": 1,
585
+ "country": "FR",
586
+ "state": "",
587
+ "postcode": "",
588
+ "city": "",
589
+ "rate": "20.0000",
590
+ "name": "FR Standard Tax",
591
+ "group": "EU",
592
+ "priority": 1,
593
+ "is_compound": 0,
594
+ "for_shipping": null,
595
+ "for_order": 0,
596
+ "formatted_state": "",
597
+ "tax_class": {
598
+ "id": 1,
599
+ "title": "Standard"
600
+ }
601
+ },
602
+ "message": "Tax rate has been updated successfully"
603
+ }
604
+ ```
605
+
606
+ ### Example
607
+
608
+ ```
609
+ curl -X PUT "https://example.com/wp-json/fluent-cart/v2/tax/country/rate/10" \
610
+ -u "username:app_password" \
611
+ -H "Content-Type: application/json" \
612
+ -d '{
613
+ "class_id": 1,
614
+ "rate": "21.0000",
615
+ "name": "FR Standard Tax (Updated)"
616
+ }'
617
+ ```
618
+
619
+ ---
620
+
621
+ ### Delete Tax Rate
622
+
623
+ DELETE `/fluent-cart/v2/tax/country/rate/{id}`
624
+
625
+ Delete a single tax rate by ID.
626
+
627
+ ### Parameters
628
+
629
+ | Parameter | Type | Location | Required | Description |
630
+ | --- | --- | --- | --- | --- |
631
+ | `id` | integer | path | Yes | Tax rate ID |
632
+
633
+ ### Response
634
+
635
+ ```
636
+ {
637
+ "message": "Tax rate has been deleted successfully"
638
+ }
639
+ ```
640
+
641
+ ### Example
642
+
643
+ ```
644
+ curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/country/rate/10" \
645
+ -u "username:app_password"
646
+ ```
647
+
648
+ ---
649
+
650
+ ### Save Shipping Tax Override
651
+
652
+ POST `/fluent-cart/v2/tax/rates/country/override`
653
+
654
+ Set a shipping-specific tax override on an existing tax rate. This allows a different tax rate to be applied for shipping calculations.
655
+
656
+ ### Parameters
657
+
658
+ | Parameter | Type | Location | Required | Description |
659
+ | --- | --- | --- | --- | --- |
660
+ | `id` | integer | body | Yes | Tax rate ID to apply the shipping override to |
661
+ | `override_tax_rate` | integer | body | Yes | The override tax rate value to use for shipping |
662
+
663
+ ### Response
664
+
665
+ ```
666
+ {
667
+ "message": "Tax override has been saved successfully"
668
+ }
669
+ ```
670
+
671
+ ### Error Response
672
+
673
+ ```
674
+ {
675
+ "message": "Tax rate not found"
676
+ }
677
+ ```
678
+
679
+ ### Example
680
+
681
+ ```
682
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/rates/country/override" \
683
+ -u "username:app_password" \
684
+ -H "Content-Type: application/json" \
685
+ -d '{
686
+ "id": 5,
687
+ "override_tax_rate": 7
688
+ }'
689
+ ```
690
+
691
+ ---
692
+
693
+ ### Delete Shipping Tax Override
694
+
695
+ DELETE `/fluent-cart/v2/tax/rates/country/override/{id}`
696
+
697
+ Remove the shipping tax override from a tax rate, resetting `for_shipping` to `null`.
698
+
699
+ ### Parameters
700
+
701
+ | Parameter | Type | Location | Required | Description |
702
+ | --- | --- | --- | --- | --- |
703
+ | `id` | integer | path | Yes | Tax rate ID to remove the shipping override from |
704
+
705
+ ### Response
706
+
707
+ ```
708
+ {
709
+ "message": "Shipping override has been deleted successfully"
710
+ }
711
+ ```
712
+
713
+ ### Example
714
+
715
+ ```
716
+ curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/rates/country/override/5" \
717
+ -u "username:app_password"
718
+ ```
719
+
720
+ ---
721
+
722
+ ### Get Product Category Tax Overrides
723
+
724
+ GET `/fluent-cart/v2/tax/product-overrides/{country_code}`
725
+
726
+ Retrieve all product category tax overrides for a specific country. Each override is a meta row whose `meta_value` holds the location, category, rate, and tax class data; `class_id` and `class_label` are appended for convenience.
727
+
728
+ ### Parameters
729
+
730
+ | Parameter | Type | Location | Required | Description |
731
+ | --- | --- | --- | --- | --- |
732
+ | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`) |
733
+
734
+ ### Response
735
+
736
+ ```
737
+ {
738
+ "overrides": [
739
+ {
740
+ "id": 12,
741
+ "object_type": "tax_override",
742
+ "object_id": 15,
743
+ "meta_key": "product_category_override",
744
+ "meta_value": {
745
+ "country": "DE",
746
+ "state": "",
747
+ "city": "",
748
+ "postcode": "",
749
+ "category_id": 15,
750
+ "category_name": "Books",
751
+ "tax_label": "Reduced VAT",
752
+ "override_state_tax": "no",
753
+ "rate": 7,
754
+ "class_id": 1
755
+ },
756
+ "class_id": 1,
757
+ "class_label": "Standard",
758
+ "created_at": "2025-06-01 12:00:00",
759
+ "updated_at": "2025-06-01 12:00:00"
760
+ }
761
+ ]
762
+ }
763
+ ```
764
+
765
+ ### Example
766
+
767
+ ```
768
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/product-overrides/DE" \
769
+ -u "username:app_password"
770
+ ```
771
+
772
+ ---
773
+
774
+ ### Save Product Category Tax Override
775
+
776
+ POST `/fluent-cart/v2/tax/product-overrides`
777
+
778
+ Create or update a product category tax override. Pass `id` to update an existing override. Without `id`, an existing override matching the same category, location, and tax class is updated in place; otherwise a new override is created.
779
+
780
+ Pass `source_type` `"shipping"` together with `source_id` (a tax rate ID) to convert an existing shipping tax override into a product override — the shipping override is removed on success.
781
+
782
+ ### Parameters
783
+
784
+ | Parameter | Type | Location | Required | Description |
785
+ | --- | --- | --- | --- | --- |
786
+ | `country` | string | body | Yes | ISO 3166-1 alpha-2 country code |
787
+ | `category_id` | integer | body | Yes | Product category (`product-categories` term) ID |
788
+ | `id` | integer | body | No | Existing override ID to update |
789
+ | `state` | string | body | No | State/province code |
790
+ | `city` | string | body | No | City name (max 45 characters) |
791
+ | `postcode` | string | body | No | Postcode/ZIP code |
792
+ | `tax_label` | string | body | No | Display label for the override tax |
793
+ | `override_state_tax` | string | body | No | `"yes"` or `"no"` — whether the override replaces state-level tax (default: `"no"`) |
794
+ | `rate` | number | body | No | Override tax rate percentage (negative values are clamped to `0`) |
795
+ | `class_id` | integer | body | No | Tax class ID the override applies to (`0` = none; must exist when non-zero) |
796
+ | `source_type` | string | body | No | Set to `"shipping"` with `source_id` to convert a shipping override |
797
+ | `source_id` | integer | body | No | Tax rate ID of the shipping override being converted |
798
+
799
+ ### Response
800
+
801
+ ```
802
+ {
803
+ "override": {
804
+ "id": 12,
805
+ "object_type": "tax_override",
806
+ "object_id": 15,
807
+ "meta_key": "product_category_override",
808
+ "meta_value": {
809
+ "country": "DE",
810
+ "state": "",
811
+ "city": "",
812
+ "postcode": "",
813
+ "category_id": 15,
814
+ "category_name": "Books",
815
+ "tax_label": "Reduced VAT",
816
+ "override_state_tax": "no",
817
+ "rate": 7,
818
+ "class_id": 1
819
+ }
820
+ },
821
+ "message": "Product category tax override saved"
822
+ }
823
+ ```
824
+
825
+ ### Error Responses
826
+
827
+ | Status | Error |
828
+ | --- | --- |
829
+ | 422 | `"Country and category are required"` |
830
+ | 422 | `"Invalid country code"` |
831
+ | 422 | `"Invalid tax class"` |
832
+ | 422 | `"Invalid product category"` |
833
+ | 422 | `"An override already exists for the selected category, location, and tax class"` |
834
+ | 404 | `"Override not found"` (when `id` does not match an existing override) |
835
+
836
+ ### Example
837
+
838
+ ```
839
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/product-overrides" \
840
+ -u "username:app_password" \
841
+ -H "Content-Type: application/json" \
842
+ -d '{
843
+ "country": "DE",
844
+ "category_id": 15,
845
+ "tax_label": "Reduced VAT",
846
+ "override_state_tax": "no",
847
+ "rate": 7,
848
+ "class_id": 1
849
+ }'
850
+ ```
851
+
852
+ ---
853
+
854
+ ### Delete Product Category Tax Override
855
+
856
+ DELETE `/fluent-cart/v2/tax/product-overrides/{id}`
857
+
858
+ Delete a product category tax override by its ID.
859
+
860
+ ### Parameters
861
+
862
+ | Parameter | Type | Location | Required | Description |
863
+ | --- | --- | --- | --- | --- |
864
+ | `id` | integer | path | Yes | Override (meta row) ID |
865
+
866
+ ### Response
867
+
868
+ ```
869
+ {
870
+ "message": "Product category tax override deleted"
871
+ }
872
+ ```
873
+
874
+ ### Error Response (422)
875
+
876
+ ```
877
+ {
878
+ "message": "Override not found"
879
+ }
880
+ ```
881
+
882
+ ### Example
883
+
884
+ ```
885
+ curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/product-overrides/12" \
886
+ -u "username:app_password"
887
+ ```
888
+
889
+ ---
890
+
891
+ ### Get Country Tax ID
892
+
893
+ GET `/fluent-cart/v2/tax/country-tax-id/{country_code}`
894
+
895
+ Retrieve the store's tax identification number (VAT/GST/EIN) for a specific country. This is stored in the `fct_meta` table.
896
+
897
+ ### Parameters
898
+
899
+ | Parameter | Type | Location | Required | Description |
900
+ | --- | --- | --- | --- | --- |
901
+ | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`) |
902
+
903
+ ### Response
904
+
905
+ When a tax ID exists:
906
+
907
+ ```
908
+ {
909
+ "tax_data": {
910
+ "tax_id": "DE123456789"
911
+ }
912
+ }
913
+ ```
914
+
915
+ When no tax ID is set:
916
+
917
+ ```
918
+ {
919
+ "tax_data": {
920
+ "tax_id": ""
921
+ }
922
+ }
923
+ ```
924
+
925
+ ### Example
926
+
927
+ ```
928
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/country-tax-id/DE" \
929
+ -u "username:app_password"
930
+ ```
931
+
932
+ ---
933
+
934
+ ### Save Country Tax ID
935
+
936
+ POST `/fluent-cart/v2/tax/country-tax-id/{country_code}`
937
+
938
+ Save or update the store's tax identification number for a specific country. Creates a new meta entry if one does not exist, or updates the existing one.
939
+
940
+ ### Parameters
941
+
942
+ | Parameter | Type | Location | Required | Description |
943
+ | --- | --- | --- | --- | --- |
944
+ | `country_code` | string | path | Yes | ISO 3166-1 alpha-2 country code (e.g., `US`, `DE`) |
945
+ | `tax_id` | string | body | Yes | The tax identification number (e.g., VAT number, EIN, GST number) |
946
+
947
+ ### Response
948
+
949
+ ```
950
+ {
951
+ "message": "Tax ID has been saved successfully"
952
+ }
953
+ ```
954
+
955
+ ### Example
956
+
957
+ ```
958
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/country-tax-id/DE" \
959
+ -u "username:app_password" \
960
+ -H "Content-Type: application/json" \
961
+ -d '{"tax_id": "DE123456789"}'
962
+ ```
963
+
964
+ ---
965
+
966
+ ## Tax Configuration
967
+
968
+ Manage global tax settings including enabling/disabling tax, inclusion/exclusion behavior, calculation basis, and rounding.
969
+
970
+ **Prefix:** `/fluent-cart/v2/tax/configuration`**Policy:** `StoreSettingsPolicy`
971
+
972
+ ---
973
+
974
+ ### Get Preconfigured Tax Rates
975
+
976
+ GET `/fluent-cart/v2/tax/configuration/rates`
977
+
978
+ Retrieve the full list of preconfigured tax rates from the built-in tax rates data file (`tax.php`). These are the default rates organized by continent/region and country that can be used when initially setting up tax for a country.
979
+
980
+ ### Parameters
981
+
982
+ No query parameters required.
983
+
984
+ ### Response
985
+
986
+ Returns tax rate data grouped by geographic region, including all rate types (standard, reduced, zero) for each country.
987
+
988
+ ```
989
+ {
990
+ "tax_rates": {
991
+ "EU": {
992
+ "group_name": "European Union",
993
+ "group_code": "EU",
994
+ "countries": [
995
+ {
996
+ "country_code": "DE",
997
+ "country_name": "Germany",
998
+ "total_rates": 3,
999
+ "rates": {
1000
+ "standard": {
1001
+ "rate": 19,
1002
+ "name": "DE Standard Tax",
1003
+ "type": "standard",
1004
+ "compound": false,
1005
+ "shipping": false
1006
+ },
1007
+ "reduced": {
1008
+ "rate": 7,
1009
+ "name": "DE Reduced Tax",
1010
+ "type": "reduced",
1011
+ "compound": false,
1012
+ "shipping": false
1013
+ },
1014
+ "zero": {
1015
+ "rate": 0,
1016
+ "name": "DE Zero Tax",
1017
+ "type": "zero",
1018
+ "compound": false,
1019
+ "shipping": false
1020
+ }
1021
+ }
1022
+ }
1023
+ ],
1024
+ "total_countries": 27
1025
+ },
1026
+ "NA": {
1027
+ "group_name": "North America",
1028
+ "group_code": "NA",
1029
+ "countries": [],
1030
+ "total_countries": 0
1031
+ }
1032
+ }
1033
+ }
1034
+ ```
1035
+
1036
+ ### Example
1037
+
1038
+ ```
1039
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/rates" \
1040
+ -u "username:app_password"
1041
+ ```
1042
+
1043
+ ---
1044
+
1045
+ ### Save Configured Countries
1046
+
1047
+ POST `/fluent-cart/v2/tax/configuration/countries`
1048
+
1049
+ Generate tax classes and import tax rates for the specified countries from the built-in rates data. This creates the standard tax class structure (Standard, Reduced, Zero) and populates rates for each selected country. Countries that already have rates in the database are skipped.
1050
+
1051
+ ### Parameters
1052
+
1053
+ | Parameter | Type | Location | Required | Description |
1054
+ | --- | --- | --- | --- | --- |
1055
+ | `countries` | array of strings | body | Yes | Array of ISO 3166-1 alpha-2 country codes to configure (e.g., `["DE", "FR", "US"]`) |
1056
+
1057
+ ### Response
1058
+
1059
+ ```
1060
+ {
1061
+ "message": "Countries saved successfully"
1062
+ }
1063
+ ```
1064
+
1065
+ ### Example
1066
+
1067
+ ```
1068
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/countries" \
1069
+ -u "username:app_password" \
1070
+ -H "Content-Type: application/json" \
1071
+ -d '{"countries": ["DE", "FR", "IT", "ES"]}'
1072
+ ```
1073
+
1074
+ ---
1075
+
1076
+ ### Get Tax Settings
1077
+
1078
+ GET `/fluent-cart/v2/tax/configuration/settings`
1079
+
1080
+ Retrieve the current global tax configuration settings along with the store country.
1081
+
1082
+ ### Parameters
1083
+
1084
+ No query parameters required.
1085
+
1086
+ ### Response
1087
+
1088
+ ```
1089
+ {
1090
+ "settings": {
1091
+ "tax_inclusion": "included",
1092
+ "tax_calculation_basis": "shipping",
1093
+ "tax_rounding": "item",
1094
+ "checkout_tax_breakdown_display": "itemized",
1095
+ "tax_display_label": "Tax",
1096
+ "enable_tax": "yes",
1097
+ "price_suffix_included": "",
1098
+ "price_suffix_excluded": "",
1099
+ "eu_vat_settings": {
1100
+ "require_vat_number": "no",
1101
+ "local_reverse_charge": "yes",
1102
+ "reverse_charge_price_mode": "fixed",
1103
+ "vat_reverse_excluded_categories": [],
1104
+ "method": "oss",
1105
+ "oss_country": "DE",
1106
+ "oss_vat": "DE123456789",
1107
+ "country_wise_vat": [],
1108
+ "country_registrations": [
1109
+ {
1110
+ "country": "DE",
1111
+ "vat": "DE123456789",
1112
+ "rate": 19,
1113
+ "rates": {
1114
+ "standard": {"rate": 19, "label": "VAT"},
1115
+ "reduced": {"rate": 7, "label": "Reduced VAT"}
1116
+ },
1117
+ "tax_label": "VAT"
1118
+ }
1119
+ ]
1120
+ }
1121
+ },
1122
+ "store_country": "DE"
1123
+ }
1124
+ ```
1125
+
1126
+ ### Settings Fields Reference
1127
+
1128
+ | Field | Type | Values | Description |
1129
+ | --- | --- | --- | --- |
1130
+ | `enable_tax` | string | `"yes"`, `"no"` | Whether tax calculation is enabled |
1131
+ | `tax_inclusion` | string | `"included"`, `"excluded"` | Whether product prices include tax |
1132
+ | `tax_calculation_basis` | string | `"shipping"`, `"billing"`, `"store"` | Address used for tax calculation |
1133
+ | `tax_rounding` | string | `"item"`, `"total"`, `"subtotal"` | Where tax rounding is applied |
1134
+ | `checkout_tax_breakdown_display` | string | `"itemized"`, `"simplified"` | How the tax breakdown is displayed at checkout |
1135
+ | `tax_display_label` | string | any | Label used when displaying tax amounts (default: `"Tax"`) |
1136
+ | `price_suffix_included` | string | any | Text appended after prices that include tax (e.g., "incl. VAT") |
1137
+ | `price_suffix_excluded` | string | any | Text appended after prices that exclude tax (e.g., "excl. VAT") |
1138
+ | `eu_vat_settings` | object | see below | EU VAT-specific configuration |
1139
+
1140
+ The top-level `store_country` key holds the store country code from store settings (empty string when unset).
1141
+
1142
+ ### EU VAT Settings Object
1143
+
1144
+ | Field | Type | Description |
1145
+ | --- | --- | --- |
1146
+ | `require_vat_number` | string | `"yes"` or `"no"` -- whether EU VAT number field is shown at checkout |
1147
+ | `local_reverse_charge` | string | `"yes"` or `"no"` -- whether reverse charge applies for domestic B2B |
1148
+ | `reverse_charge_price_mode` | string | `"fixed"` (default) or `"dynamic"` -- how reverse-charged prices are displayed: `fixed` keeps the tax-inclusive price, `dynamic` removes the VAT amount |
1149
+ | `vat_reverse_excluded_categories` | array of integers | Product category IDs excluded from VAT reverse charge |
1150
+ | `method` | string | Cross-border method: `"oss"`, `"home"`, or `"specific"` |
1151
+ | `oss_country` | string | Country of OSS registration (when method is `"oss"`) |
1152
+ | `oss_vat` | string | OSS VAT number (when method is `"oss"`) |
1153
+ | `home_country` | string | Home country (when method is `"home"`) |
1154
+ | `home_vat` | string | Home VAT number (when method is `"home"`) |
1155
+ | `country_wise_vat` | array | Country-specific VAT settings (when method is `"specific"`) |
1156
+ | `country_registrations` | array | Per-country EU VAT registrations (`{country, vat, rate, rates, tax_label}`), stored in `fct_meta` and injected into GET responses only |
1157
+
1158
+ ### Example
1159
+
1160
+ ```
1161
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings" \
1162
+ -u "username:app_password"
1163
+ ```
1164
+
1165
+ ---
1166
+
1167
+ ### Save Tax Settings
1168
+
1169
+ POST `/fluent-cart/v2/tax/configuration/settings`
1170
+
1171
+ Save the global tax configuration settings. Invalid enum values are silently replaced with their defaults. If tax is enabled, initial tax classes are automatically created.
1172
+
1173
+ ### Parameters
1174
+
1175
+ | Parameter | Type | Location | Required | Description |
1176
+ | --- | --- | --- | --- | --- |
1177
+ | `settings` | object | body | Yes | Tax settings object (see fields below) |
1178
+ | `settings.enable_tax` | string | body | No | `"yes"` or `"no"` to enable/disable tax |
1179
+ | `settings.tax_inclusion` | string | body | No | `"included"` or `"excluded"` -- whether prices include tax |
1180
+ | `settings.tax_calculation_basis` | string | body | No | `"shipping"`, `"billing"`, or `"store"` -- address basis for tax |
1181
+ | `settings.tax_rounding` | string | body | No | `"item"`, `"total"`, or `"subtotal"` -- where rounding is applied |
1182
+ | `settings.checkout_tax_breakdown_display` | string | body | No | `"itemized"` or `"simplified"` -- how the tax breakdown is displayed at checkout |
1183
+ | `settings.tax_display_label` | string | body | No | Label used when displaying tax amounts |
1184
+ | `settings.price_suffix_included` | string | body | No | Text appended after prices that include tax |
1185
+ | `settings.price_suffix_excluded` | string | body | No | Text appended after prices that exclude tax |
1186
+ | `settings.eu_vat_settings` | object | body | No | EU VAT configuration object (see EU VAT Settings Object above). `reverse_charge_price_mode` accepts `"fixed"` or `"dynamic"` (invalid values become `"fixed"`) |
1187
+
1188
+ ### Response
1189
+
1190
+ ```
1191
+ {
1192
+ "message": "Settings saved successfully"
1193
+ }
1194
+ ```
1195
+
1196
+ ### Example
1197
+
1198
+ ```
1199
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings" \
1200
+ -u "username:app_password" \
1201
+ -H "Content-Type: application/json" \
1202
+ -d '{
1203
+ "settings": {
1204
+ "enable_tax": "yes",
1205
+ "tax_inclusion": "excluded",
1206
+ "tax_calculation_basis": "billing",
1207
+ "tax_rounding": "subtotal",
1208
+ "checkout_tax_breakdown_display": "itemized",
1209
+ "tax_display_label": "VAT",
1210
+ "price_suffix_included": "incl. VAT",
1211
+ "price_suffix_excluded": "excl. VAT",
1212
+ "eu_vat_settings": {
1213
+ "require_vat_number": "yes",
1214
+ "local_reverse_charge": "yes",
1215
+ "reverse_charge_price_mode": "fixed",
1216
+ "vat_reverse_excluded_categories": [12, 15]
1217
+ }
1218
+ }
1219
+ }'
1220
+ ```
1221
+
1222
+ ---
1223
+
1224
+ ## EU VAT
1225
+
1226
+ Manage European Union VAT settings, OSS (One-Stop Shop) compliance, and cross-border tax configurations.
1227
+
1228
+ **Prefix:** `/fluent-cart/v2/tax/configuration/settings/eu-vat`**Policy:** `StoreSettingsPolicy`
1229
+
1230
+ ---
1231
+
1232
+ ### Save EU VAT Cross-Border Settings
1233
+
1234
+ POST `/fluent-cart/v2/tax/configuration/settings/eu-vat`
1235
+
1236
+ Multi-action endpoint for EU VAT settings, dispatched by the `action` field:
1237
+
1238
+ | Action | Purpose |
1239
+ | --- | --- |
1240
+ | `euCrossBorderSettings` | Save the cross-border registration configuration (OSS, home country, or specific country registrations) |
1241
+ | `saveCountryRegistration` | Create or update a per-country VAT registration with per-class rates |
1242
+ | `deleteCountryRegistration` | Remove a per-country VAT registration |
1243
+
1244
+ ### Parameters — `euCrossBorderSettings`
1245
+
1246
+ | Parameter | Type | Location | Required | Description |
1247
+ | --- | --- | --- | --- | --- |
1248
+ | `action` | string | body | Yes | `"euCrossBorderSettings"` |
1249
+ | `eu_vat_settings` | object | body | Yes | EU VAT configuration object (merged into the stored settings) |
1250
+ | `eu_vat_settings.method` | string | body | Yes | Cross-border method: `"oss"`, `"home"`, or `"specific"` |
1251
+ | `eu_vat_settings.oss_country` | string | body | Conditional | Country of OSS registration (required when method is `"oss"`; must be an EU VAT country) |
1252
+ | `eu_vat_settings.oss_vat` | string | body | No | OSS VAT number |
1253
+ | `eu_vat_settings.home_country` | string | body | Conditional | Home country code (required when method is `"home"`; must be an EU VAT country) |
1254
+ | `eu_vat_settings.home_vat` | string | body | No | Home VAT number |
1255
+ | `reset_registration` | string | body | No | Set to `"yes"` to clear the current method (reset registration) |
1256
+
1257
+ ### Parameters — `saveCountryRegistration`
1258
+
1259
+ | Parameter | Type | Location | Required | Description |
1260
+ | --- | --- | --- | --- | --- |
1261
+ | `action` | string | body | Yes | `"saveCountryRegistration"` |
1262
+ | `country` | string | body | Yes | ISO 3166-1 alpha-2 code of an EU VAT country |
1263
+ | `vat` | string | body | No | VAT registration number (max 50 characters) |
1264
+ | `rates` | object | body | Yes | Per-class rates keyed by tax class slug: `{"standard": {"rate": 19, "label": "VAT"}}`. At least one rate must be greater than `0` and every slug must reference an existing tax class |
1265
+
1266
+ ### Parameters — `deleteCountryRegistration`
1267
+
1268
+ | Parameter | Type | Location | Required | Description |
1269
+ | --- | --- | --- | --- | --- |
1270
+ | `action` | string | body | Yes | `"deleteCountryRegistration"` |
1271
+ | `country` | string | body | Yes | ISO 3166-1 alpha-2 code of an EU VAT country |
1272
+
1273
+ ### Validation
1274
+
1275
+ | Condition | Error |
1276
+ | --- | --- |
1277
+ | Unknown `action` | `"Invalid method"` (HTTP 422) |
1278
+ | `method` not one of `oss`, `home`, `specific` | `"Select a cross-border registration type"` |
1279
+ | `method` is `oss` and `oss_country` is empty or not an EU VAT country | `"Select country of OSS registration"` / `"Select a valid EU VAT country"` |
1280
+ | `method` is `home` and `home_country` is empty or not an EU VAT country | `"Select home country of registration"` / `"Select a valid EU VAT country"` |
1281
+ | `country` missing or not an EU VAT country | `"Select a registration country"` / `"Select a valid EU VAT registration country"` |
1282
+ | `vat` longer than 50 characters | `"VAT number is too long"` |
1283
+ | No rate greater than 0 | `"At least one tax rate must be greater than 0%"` |
1284
+ | Rate slug references a missing tax class | `"Tax class \"{slug}\" could not be found. Create the class first and try again."` |
1285
+
1286
+ ### Response
1287
+
1288
+ Depending on the action, `message` is `"EU VAT settings saved successfully"`, `"Country VAT registration saved successfully"`, or `"Country registration removed successfully"`.
1289
+
1290
+ ```
1291
+ {
1292
+ "message": "EU VAT settings saved successfully"
1293
+ }
1294
+ ```
1295
+
1296
+ ### Error Response (422)
1297
+
1298
+ ```
1299
+ {
1300
+ "message": "Validation failed for EU VAT settings",
1301
+ "errors": {
1302
+ "method": "Select a cross-border registration type"
1303
+ }
1304
+ }
1305
+ ```
1306
+
1307
+ ### Examples
1308
+
1309
+ ```
1310
+ # Save cross-border configuration
1311
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat" \
1312
+ -u "username:app_password" \
1313
+ -H "Content-Type: application/json" \
1314
+ -d '{
1315
+ "action": "euCrossBorderSettings",
1316
+ "eu_vat_settings": {
1317
+ "method": "oss",
1318
+ "oss_country": "DE",
1319
+ "oss_vat": "DE123456789"
1320
+ }
1321
+ }'
1322
+
1323
+ # Save a per-country VAT registration
1324
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat" \
1325
+ -u "username:app_password" \
1326
+ -H "Content-Type: application/json" \
1327
+ -d '{
1328
+ "action": "saveCountryRegistration",
1329
+ "country": "DE",
1330
+ "vat": "DE123456789",
1331
+ "rates": {
1332
+ "standard": {"rate": 19, "label": "VAT"},
1333
+ "reduced": {"rate": 7, "label": "Reduced VAT"}
1334
+ }
1335
+ }'
1336
+
1337
+ # Delete a per-country VAT registration
1338
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat" \
1339
+ -u "username:app_password" \
1340
+ -H "Content-Type: application/json" \
1341
+ -d '{"action": "deleteCountryRegistration", "country": "DE"}'
1342
+ ```
1343
+
1344
+ ---
1345
+
1346
+ ### Reset EU VAT Rates
1347
+
1348
+ POST `/fluent-cart/v2/tax/configuration/settings/eu-vat/reset-rates`
1349
+
1350
+ Reset all country-level EU standard VAT rates back to the built-in defaults. Custom rate values and auto-generated labels are overwritten; state-specific entries and shipping overrides on the rows are preserved.
1351
+
1352
+ ### Parameters
1353
+
1354
+ No request body required.
1355
+
1356
+ ### Response
1357
+
1358
+ ```
1359
+ {
1360
+ "message": "EU tax rates have been reset to defaults"
1361
+ }
1362
+ ```
1363
+
1364
+ ### Example
1365
+
1366
+ ```
1367
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/reset-rates" \
1368
+ -u "username:app_password"
1369
+ ```
1370
+
1371
+ ---
1372
+
1373
+ ### Get EU VAT Product Overrides
1374
+
1375
+ GET `/fluent-cart/v2/tax/configuration/settings/eu-vat/product-overrides`
1376
+
1377
+ Retrieve product category tax overrides for all EU countries, plus every EU tax rate that has a shipping tax override set. `class_id` and `class_label` are appended to each row for convenience.
1378
+
1379
+ ### Parameters
1380
+
1381
+ No query parameters required.
1382
+
1383
+ ### Response
1384
+
1385
+ ```
1386
+ {
1387
+ "overrides": [
1388
+ {
1389
+ "id": 12,
1390
+ "object_type": "tax_override",
1391
+ "object_id": 15,
1392
+ "meta_key": "product_category_override",
1393
+ "meta_value": {
1394
+ "country": "DE",
1395
+ "state": "",
1396
+ "city": "",
1397
+ "postcode": "",
1398
+ "category_id": 15,
1399
+ "category_name": "Books",
1400
+ "tax_label": "Reduced VAT",
1401
+ "override_state_tax": "no",
1402
+ "rate": 7,
1403
+ "class_id": 1
1404
+ },
1405
+ "class_id": 1,
1406
+ "class_label": "Standard",
1407
+ "created_at": "2025-06-01 12:00:00",
1408
+ "updated_at": "2025-06-01 12:00:00"
1409
+ }
1410
+ ],
1411
+ "shipping_overrides": [
1412
+ {
1413
+ "id": 8,
1414
+ "class_id": 1,
1415
+ "country": "DE",
1416
+ "state": "",
1417
+ "postcode": "",
1418
+ "city": "",
1419
+ "rate": "19.0000",
1420
+ "name": "DE Standard Tax",
1421
+ "group": "EU",
1422
+ "priority": 1,
1423
+ "is_compound": 0,
1424
+ "for_shipping": "7.0000",
1425
+ "for_order": 0,
1426
+ "class_label": "Standard"
1427
+ }
1428
+ ]
1429
+ }
1430
+ ```
1431
+
1432
+ ### Example
1433
+
1434
+ ```
1435
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/product-overrides" \
1436
+ -u "username:app_password"
1437
+ ```
1438
+
1439
+ ---
1440
+
1441
+ ### Get OSS Country Rates
1442
+
1443
+ GET `/fluent-cart/v2/tax/configuration/settings/eu-vat/oss-rates`
1444
+
1445
+ Retrieve per-country EU VAT rates for every tax class. Each country entry includes the effective rate per class (custom database value or built-in default), plus top-level standard-class values for backward compatibility, and the list of tax classes.
1446
+
1447
+ ### Parameters
1448
+
1449
+ No query parameters required.
1450
+
1451
+ ### Response
1452
+
1453
+ ```
1454
+ {
1455
+ "rates": [
1456
+ {
1457
+ "country": "DE",
1458
+ "label": "Germany",
1459
+ "rate": 19,
1460
+ "tax_label": "VAT",
1461
+ "default_rate": 19,
1462
+ "has_custom": true,
1463
+ "class_rates": {
1464
+ "standard": {"rate": 19, "default_rate": 19, "has_custom": true, "label": ""},
1465
+ "reduced": {"rate": 7, "default_rate": 7, "has_custom": true, "label": ""},
1466
+ "zero": {"rate": 0, "default_rate": 0, "has_custom": false, "label": ""}
1467
+ }
1468
+ }
1469
+ ],
1470
+ "classes": [
1471
+ {"slug": "standard", "title": "Standard", "id": 1},
1472
+ {"slug": "reduced", "title": "Reduced", "id": 2},
1473
+ {"slug": "zero", "title": "Zero", "id": 3}
1474
+ ]
1475
+ }
1476
+ ```
1477
+
1478
+ | Field | Type | Description |
1479
+ | --- | --- | --- |
1480
+ | `rates[].country` | string | ISO 3166-1 alpha-2 country code |
1481
+ | `rates[].label` | string | Country display name |
1482
+ | `rates[].rate` | number | Standard-class effective rate (backward compatibility) |
1483
+ | `rates[].tax_label` | string | Standard-class label, defaults to `"VAT"` |
1484
+ | `rates[].default_rate` | number | Built-in default standard rate |
1485
+ | `rates[].has_custom` | boolean | Whether the standard class has a custom rate row |
1486
+ | `rates[].class_rates` | object | Per-class rates keyed by tax class slug: `{rate, default_rate, has_custom, label}` |
1487
+ | `classes` | array | All tax classes: `{slug, title, id}` |
1488
+
1489
+ ### Example
1490
+
1491
+ ```
1492
+ curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss-rates" \
1493
+ -u "username:app_password"
1494
+ ```
1495
+
1496
+ ---
1497
+
1498
+ ### Save OSS Country Rates
1499
+
1500
+ POST `/fluent-cart/v2/tax/configuration/settings/eu-vat/oss-rates`
1501
+
1502
+ Save per-country EU VAT rates. Each entry may provide `class_rates` keyed by tax class slug (`{rate, label}`); rates are upserted per country and class in the `EU` group. When `class_rates` is omitted, the single `rate` value is applied to the standard class (backward compatibility). Entries with unknown tax class slugs or without a country are skipped.
1503
+
1504
+ ### Parameters
1505
+
1506
+ | Parameter | Type | Location | Required | Description |
1507
+ | --- | --- | --- | --- | --- |
1508
+ | `rates` | array | body | Yes | Array of country rate entries |
1509
+ | `rates[].country` | string | body | Yes | ISO 3166-1 alpha-2 code of an EU VAT country |
1510
+ | `rates[].tax_label` | string | body | No | Shared label fallback for classes without their own label |
1511
+ | `rates[].rate` | number | body | No | Standard-class rate (used only when `class_rates` is omitted) |
1512
+ | `rates[].class_rates` | object | body | No | Per-class rates keyed by tax class slug: `{"standard": {"rate": 19, "label": "VAT"}}` |
1513
+
1514
+ ### Response
1515
+
1516
+ ```
1517
+ {
1518
+ "message": "OSS country rates saved successfully"
1519
+ }
1520
+ ```
1521
+
1522
+ ### Error Response (422)
1523
+
1524
+ ```
1525
+ {
1526
+ "message": "Validation failed for OSS country rates",
1527
+ "errors": {
1528
+ "rates.0.country": "Select a valid EU VAT country"
1529
+ }
1530
+ }
1531
+ ```
1532
+
1533
+ ### Example
1534
+
1535
+ ```
1536
+ curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss-rates" \
1537
+ -u "username:app_password" \
1538
+ -H "Content-Type: application/json" \
1539
+ -d '{
1540
+ "rates": [
1541
+ {
1542
+ "country": "DE",
1543
+ "tax_label": "VAT",
1544
+ "class_rates": {
1545
+ "standard": {"rate": 19, "label": "VAT"},
1546
+ "reduced": {"rate": 7, "label": "Reduced VAT"}
1547
+ }
1548
+ }
1549
+ ]
1550
+ }'
1551
+ ```